/* ===================================================================
   USABILITY.CSS — Canal de Denúncias
   Camada de melhorias focada em UX, acessibilidade e intuitividade.
   Depende dos tokens definidos em base.css — carregar APÓS base.css.
   =================================================================== */

/* ===================================================================
   ÍNDICE
   1.  Acessibilidade base (skip-link, focus, reduced motion)
   2.  Touch targets e áreas clicáveis
   3.  Scrollbar refinada e scroll suave
   4.  Skeletons e estados de carregamento
   5.  Spinners e indicadores de progresso
   6.  Feedback de formulário (helper, erro, sucesso)
   7.  Validação visual e contador de caracteres
   8.  Tooltips acessíveis
   9.  Breadcrumbs
   10. Tabs (abas) com indicador animado
   11. Stepper / wizard (fluxo de denúncia)
   12. Botões avançados (loading, icon, grupo, split, FAB)
   13. Toasts empilhados com auto-dismiss
   14. Modais aprimorados (sizes, backdrop blur)
   15. Drawers laterais (filtros)
   16. Empty states ilustrados
   17. Tabelas responsivas (cards no mobile)
   18. Timeline de auditoria
   19. Upload com drag-and-drop e preview
   20. Chips e tags removíveis
   21. Segmented control
   22. Search com sugestões
   23. Paginação
   24. Pills de filtro ativo
   25. Menu mobile e sidebar colapsável
   26. Copy-to-clipboard com feedback
   27. Keyboard shortcuts (kbd)
   28. Badges enriquecidos e dot indicators
   29. Utility helpers
   30. Animações de entrada/saída
   31. Print styles
   32. Responsive breakpoints finais
   =================================================================== */

/* ───────────────────────────────────────────────────────────────────
   1. ACESSIBILIDADE BASE
   ___________________________________________________________________ */

/* Skip link — aparece ao focar com Tab para pular direto ao conteúdo */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: top 0.2s var(--ease-smooth);
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Screen-reader only — conteúdo invisível visualmente mas lido por leitores */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static !important;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus-visible reforçado — contorno mais claro em todos os interativos */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.18);
}

/* Respeitar preferência de movimento reduzido do sistema operacional */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Preferência por alto contraste */
@media (prefers-contrast: more) {
  :root {
    --border: #6B7280;
    --text-muted: #D1D5DB;
    --text-subtle: #9CA3AF;
  }
  .btn,
  .input,
  .card {
    border-width: 2px;
  }
}

/* Destaque de seleção de texto */
::selection {
  background: rgba(37, 99, 235, 0.4);
  color: #fff;
  text-shadow: none;
}
::-moz-selection {
  background: rgba(37, 99, 235, 0.4);
  color: #fff;
}

/* Melhor legibilidade em foco dentro de links longos */
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ───────────────────────────────────────────────────────────────────
   2. TOUCH TARGETS E ÁREAS CLICÁVEIS (mínimo 44x44 WCAG AAA)
   ___________________________________________________________________ */

@media (pointer: coarse) {
  button,
  a.btn,
  .btn,
  input[type="checkbox"],
  input[type="radio"],
  .icon-btn,
  .tab,
  .chip {
    min-height: 44px;
    min-width: 44px;
  }
  .pagination button,
  .pagination a {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
  }
}

/* Área clicável expandida para elementos pequenos */
.clickable-expand {
  position: relative;
}
.clickable-expand::before {
  content: '';
  position: absolute;
  inset: -8px;
  z-index: 1;
}

/* ───────────────────────────────────────────────────────────────────
   3. SCROLLBAR REFINADA E SCROLL SUAVE
   ___________________________________________________________________ */

html {
  scroll-padding-top: calc(var(--topbar-height) + 16px);
}

/* Scrollbar fina para áreas internas específicas */
.scroll-thin::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.scroll-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroll-hidden::-webkit-scrollbar {
  display: none;
}

/* Scroll horizontal com indicadores de gradiente */
.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.scroll-x > * {
  scroll-snap-align: start;
}

/* Sombra nas bordas quando há mais conteúdo para rolar */
.scroll-shadow {
  background:
    linear-gradient(to right, var(--surface), var(--surface)) left center/20px 100% no-repeat,
    linear-gradient(to right, var(--surface), var(--surface)) right center/20px 100% no-repeat,
    linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent) left center/10px 100% no-repeat,
    linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent) right center/10px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}

/* ───────────────────────────────────────────────────────────────────
   4. SKELETONS — ESTADOS DE CARREGAMENTO
   ___________________________________________________________________ */

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
    background-position: 0% 50%;
  }
  50% {
    opacity: 0.6;
    background-position: 100% 50%;
  }
}

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

.skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--surface-3) 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite linear;
  border-radius: var(--radius-sm);
  color: transparent;
  user-select: none;
  pointer-events: none;
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 3px;
}
.skeleton-text:last-child {
  margin-bottom: 0;
  width: 75%;
}
.skeleton-title {
  height: 20px;
  width: 45%;
  margin-bottom: 14px;
  border-radius: 4px;
}
.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.skeleton-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
}
.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: var(--radius);
}
.skeleton-card {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.skeleton-card .skeleton-content {
  flex: 1;
  min-width: 0;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.skeleton-row:last-child {
  border-bottom: none;
}

/* Skeleton para tabela inteira */
.skeleton-table {
  width: 100%;
  border-collapse: collapse;
}
.skeleton-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-light);
}
.skeleton-table .skeleton {
  height: 14px;
  border-radius: 3px;
}

/* Versão mais calma sem shimmer (reduced motion) */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: skeleton-pulse 2s ease-in-out infinite;
    background: var(--surface-2);
  }
}

/* ───────────────────────────────────────────────────────────────────
   5. SPINNERS E PROGRESSO
   ___________________________________________________________________ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}
.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
.spinner-xl {
  width: 56px;
  height: 56px;
  border-width: 4px;
}
.spinner-accent {
  border-top-color: var(--accent);
}
.spinner-success {
  border-top-color: var(--success);
}
.spinner-danger {
  border-top-color: var(--danger);
}

/* Spinner centralizado em container */
.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-5);
  min-height: 200px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Overlay global de loading */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}
.loading-overlay .spinner {
  width: 48px;
  height: 48px;
  border-width: 3px;
}
.loading-overlay .loading-text {
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 500;
}
.loading-overlay .loading-sub {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Barra de progresso linear */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-smooth);
  position: relative;
}
.progress-bar.striped .progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%
  );
  background-size: 16px 16px;
  animation: progress-stripe 1s linear infinite;
}

@keyframes progress-stripe {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 16px 0;
  }
}

.progress-bar.indeterminate .progress-fill {
  width: 35% !important;
  animation: progress-indeterminate 1.6s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% {
    margin-left: -35%;
  }
  100% {
    margin-left: 100%;
  }
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

/* Progresso circular */
.progress-circle {
  --progress: 0;
  --size: 56px;
  --track: var(--surface-2);
  --bar: var(--primary);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(
    var(--bar) calc(var(--progress) * 1%),
    var(--track) 0
  );
  display: inline-grid;
  place-items: center;
  position: relative;
}
.progress-circle::before {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--surface);
  border-radius: 50%;
}
.progress-circle .progress-value {
  position: relative;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text);
}

/* ───────────────────────────────────────────────────────────────────
   6. FEEDBACK DE FORMULÁRIO
   ___________________________________________________________________ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-5);
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.form-label .required {
  color: var(--danger);
  font-size: var(--text-md);
  line-height: 1;
}
.form-label .optional {
  color: var(--text-subtle);
  font-size: var(--text-xs);
  font-weight: 400;
  margin-left: auto;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.form-hint i {
  font-size: 12px;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: 4px;
  line-height: 1.5;
  animation: shake 0.4s var(--ease-smooth);
}
.form-error i {
  margin-top: 2px;
  flex-shrink: 0;
}
.form-group.has-error .form-error {
  display: flex;
}
.form-group.has-error .form-hint {
  display: none;
}

.form-success {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--success);
  margin-top: 4px;
}
.form-group.is-valid .form-success {
  display: flex;
}

/* Input estados visuais */
.form-group.has-error .input,
.form-group.has-error .form-control,
.input.is-invalid,
.form-control.is-invalid {
  border-color: var(--danger) !important;
  background: rgba(239, 68, 68, 0.05);
}
.form-group.has-error .input:focus,
.input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group.is-valid .input,
.form-group.is-valid .form-control,
.input.is-valid,
.form-control.is-valid {
  border-color: var(--success) !important;
}
.form-group.is-valid .input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Ícone de validação dentro do input */
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .input,
.input-icon-wrap .form-control {
  padding-right: 40px;
}
.input-icon-wrap .input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  color: var(--text-muted);
}
.form-group.has-error .input-icon {
  color: var(--danger);
}
.form-group.is-valid .input-icon {
  color: var(--success);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Input com prefixo/sufixo (ex: R$, %, @) */
.input-affix {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-affix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.input-affix .affix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  border-right: 1px solid var(--border);
}
.input-affix .affix.suffix {
  border-right: none;
  border-left: 1px solid var(--border);
}
.input-affix input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: var(--text-sm);
  outline: none;
  min-width: 0;
}

/* ───────────────────────────────────────────────────────────────────
   7. VALIDAÇÃO E CONTADOR DE CARACTERES
   ___________________________________________________________________ */

.char-counter {
  display: flex;
  justify-content: flex-end;
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.char-counter.warning {
  color: var(--warning);
}
.char-counter.danger {
  color: var(--danger);
  font-weight: 600;
}

/* Força de senha */
.password-strength {
  margin-top: 8px;
}
.password-strength .strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.password-strength .bar {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  transition: background 0.3s var(--ease-smooth);
}
.password-strength[data-level="1"] .bar:nth-child(-n+1) { background: var(--danger); }
.password-strength[data-level="2"] .bar:nth-child(-n+2) { background: var(--warning); }
.password-strength[data-level="3"] .bar:nth-child(-n+3) { background: var(--accent); }
.password-strength[data-level="4"] .bar:nth-child(-n+4) { background: var(--success); }
.password-strength .strength-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}
.password-strength[data-level="1"] .strength-label strong { color: var(--danger); }
.password-strength[data-level="2"] .strength-label strong { color: var(--warning); }
.password-strength[data-level="3"] .strength-label strong { color: var(--accent); }
.password-strength[data-level="4"] .strength-label strong { color: var(--success); }

/* Botão toggle mostrar/ocultar senha */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.password-toggle:hover {
  color: var(--text);
  background: var(--surface-3);
}

/* Checklist de requisitos (ex: senha) */
.requirements-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.requirements-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: color var(--transition);
}
.requirements-list li::before {
  content: '○';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  border-radius: 50%;
  transition: all var(--transition);
}
.requirements-list li.met {
  color: var(--success);
}
.requirements-list li.met::before {
  content: '✓';
  background: var(--success);
  color: #fff;
}

/* ───────────────────────────────────────────────────────────────────
   8. TOOLTIPS ACESSÍVEIS
   ___________________________________________________________________ */

[data-tooltip] {
  position: relative;
}
[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  padding: 6px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  max-width: 280px;
  line-height: 1.4;
}
[data-tooltip]::after {
  content: '';
  border: 5px solid transparent;
}

/* Default: top */
[data-tooltip]::before {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}
[data-tooltip]::after {
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-top-color: var(--border);
}
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Variantes direcionais */
[data-tooltip-pos="bottom"]::before {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="bottom"]::after {
  top: calc(100% + 3px);
  bottom: auto;
  border-top-color: transparent;
  border-bottom-color: var(--border);
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="right"]::before {
  top: 50%;
  left: calc(100% + 8px);
  bottom: auto;
  transform: translateY(-50%) translateX(-4px);
}
[data-tooltip-pos="right"]::after {
  top: 50%;
  left: calc(100% + 3px);
  bottom: auto;
  border-top-color: transparent;
  border-right-color: var(--border);
  transform: translateY(-50%) translateX(-4px);
}
[data-tooltip-pos="left"]::before {
  top: 50%;
  right: calc(100% + 8px);
  left: auto;
  bottom: auto;
  transform: translateY(-50%) translateX(4px);
}
[data-tooltip-pos="left"]::after {
  top: 50%;
  right: calc(100% + 3px);
  left: auto;
  bottom: auto;
  border-top-color: transparent;
  border-left-color: var(--border);
  transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="right"]:hover::before,
[data-tooltip-pos="right"]:hover::after,
[data-tooltip-pos="right"]:focus-visible::before,
[data-tooltip-pos="right"]:focus-visible::after {
  transform: translateY(-50%) translateX(0);
}
[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after,
[data-tooltip-pos="left"]:focus-visible::before,
[data-tooltip-pos="left"]:focus-visible::after {
  transform: translateY(-50%) translateX(0);
}

/* Tooltip com wrap para textos longos */
[data-tooltip-wrap]::before {
  white-space: normal;
  width: 240px;
  text-align: center;
}

/* ───────────────────────────────────────────────────────────────────
   9. BREADCRUMBS
   ___________________________________________________________________ */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-sm);
  margin-bottom: var(--sp-5);
  padding: 8px 0;
}
.breadcrumbs a,
.breadcrumbs .crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.breadcrumbs a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.breadcrumbs a i {
  font-size: 12px;
}
.breadcrumbs .separator {
  color: var(--text-subtle);
  font-size: 10px;
  user-select: none;
}
.breadcrumbs .current {
  color: var(--text);
  font-weight: 600;
  padding: 4px 8px;
}

/* Breadcrumbs compactos */
.breadcrumbs.compact {
  font-size: var(--text-xs);
  gap: 4px;
}
.breadcrumbs.compact a,
.breadcrumbs.compact .crumb,
.breadcrumbs.compact .current {
  padding: 2px 6px;
}

/* ───────────────────────────────────────────────────────────────────
   10. TABS COM INDICADOR ANIMADO
   ___________________________________________________________________ */

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs .tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition);
  border-radius: var(--radius) var(--radius) 0 0;
}
.tabs .tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.tabs .tab i {
  font-size: 14px;
}
.tabs .tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--surface-3);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tabs .tab.active {
  color: var(--primary);
}
.tabs .tab.active .tab-count {
  background: var(--primary-light);
  color: var(--primary);
}
.tabs .tab.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  animation: tab-indicator 0.3s var(--ease-smooth);
}

@keyframes tab-indicator {
  from {
    transform: scaleX(0.3);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Tabs pills (alternativa) */
.tabs-pills {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: var(--sp-5);
}
.tabs-pills .tab {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.tabs-pills .tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.tabs-pills .tab:not(.active):hover {
  background: var(--surface-3);
  color: var(--text);
}

/* Tab panels */
.tab-panel {
  display: none;
  animation: fade-in 0.3s var(--ease-smooth);
}
.tab-panel.active {
  display: block;
}

/* ───────────────────────────────────────────────────────────────────
   11. STEPPER / WIZARD (fluxo de denúncia)
   ___________________________________________________________________ */

.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: var(--sp-8);
  counter-reset: step;
}
.stepper .step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  counter-increment: step;
}
.stepper .step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  color: var(--text-muted);
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--text-sm);
  transition: all 0.3s var(--ease-smooth);
  z-index: 2;
  position: relative;
}
.stepper .step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.stepper .step .step-label {
  margin-top: 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  max-width: 140px;
  line-height: 1.3;
}
.stepper .step .step-desc {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-subtle);
}

.stepper .step.active::before {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 6px var(--primary-light);
}
.stepper .step.active .step-label {
  color: var(--primary);
}
.stepper .step.completed::before {
  content: '✓';
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.stepper .step.completed:not(:last-child)::after {
  background: var(--success);
}
.stepper .step.completed .step-label {
  color: var(--success);
}

/* Stepper vertical para mobile */
@media (max-width: 640px) {
  .stepper {
    flex-direction: column;
    align-items: flex-start;
  }
  .stepper .step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
    padding-bottom: 24px;
  }
  .stepper .step::before {
    flex-shrink: 0;
  }
  .stepper .step:not(:last-child)::after {
    top: 40px;
    left: 19px;
    right: auto;
    bottom: 0;
    width: 2px;
    height: auto;
  }
  .stepper .step .step-label {
    margin-top: 8px;
    max-width: none;
  }
}

/* Stepper simples numérico inline */
.stepper-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
}
.stepper-inline .current {
  color: var(--primary);
}

/* ───────────────────────────────────────────────────────────────────
   12. BOTÕES AVANÇADOS
   ___________________________________________________________________ */

/* Botão em estado de loading */
.btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading.btn-outline::after,
.btn.is-loading.btn-ghost::after {
  border-color: rgba(37, 99, 235, 0.25);
  border-top-color: var(--primary);
}

/* Icon button (só ícone, aspect 1:1) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.icon-btn:active {
  transform: scale(0.96);
}
.icon-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.icon-btn-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.icon-btn-lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

/* Icon button contextuais */
.icon-btn-danger:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}
.icon-btn-success:hover {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}
.icon-btn-warning:hover {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning);
}

/* Grupo de botões */
.btn-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.btn-group > .btn,
.btn-group > button {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border);
}
.btn-group > .btn:last-child,
.btn-group > button:last-child {
  border-right: none;
}
.btn-group > .btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Split button (ação principal + dropdown) */
.btn-split {
  display: inline-flex;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.btn-split > .btn-main {
  border-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-split > .btn-arrow {
  border-radius: 0;
  padding: 0 10px;
}

/* FAB — Floating Action Button (ideal em mobile para ação principal) */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  z-index: 900;
  transition: transform 0.25s var(--ease-bounce),
              box-shadow 0.25s var(--ease-smooth);
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.6);
}
.fab:active {
  transform: scale(0.98);
}
.fab.fab-extended {
  width: auto;
  padding: 0 24px;
  gap: 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
}
.fab-danger {
  background: var(--danger);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}
.fab-success {
  background: var(--success);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Botão com badge/contador */
.btn-badged {
  position: relative;
}
.btn-badged .badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  animation: pop-in 0.3s var(--ease-bounce);
}

@keyframes pop-in {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ───────────────────────────────────────────────────────────────────
   13. TOASTS EMPILHADOS
   ___________________________________________________________________ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}
.toast-container.top-left {
  right: auto;
  left: 24px;
}
.toast-container.bottom-right {
  top: auto;
  bottom: 24px;
}
.toast-container.bottom-left {
  top: auto;
  bottom: 24px;
  right: auto;
  left: 24px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: var(--text-sm);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s var(--ease-bounce),
              opacity 0.25s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}
.toast .toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary);
}
.toast .toast-content {
  flex: 1;
  min-width: 0;
}
.toast .toast-title {
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
}
.toast .toast-message {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.toast .toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.toast .toast-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.toast.toast-success {
  border-left-color: var(--success);
}
.toast.toast-success .toast-icon {
  color: var(--success);
}
.toast.toast-error {
  border-left-color: var(--danger);
}
.toast.toast-error .toast-icon {
  color: var(--danger);
}
.toast.toast-warning {
  border-left-color: var(--warning);
}
.toast.toast-warning .toast-icon {
  color: var(--warning);
}
.toast.toast-info {
  border-left-color: var(--accent);
}
.toast.toast-info .toast-icon {
  color: var(--accent);
}

/* Barra de progresso de auto-dismiss */
.toast .toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  animation: toast-progress 5s linear forwards;
}
.toast.toast-success .toast-progress {
  background: var(--success);
}
.toast.toast-error .toast-progress {
  background: var(--danger);
}
.toast.toast-warning .toast-progress {
  background: var(--warning);
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast com ações */
.toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.toast-actions button {
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.toast-actions button:hover {
  background: var(--surface-3);
}
.toast-actions button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Mobile: full width */
@media (max-width: 640px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
  .toast {
    transform: translateY(-120%);
  }
  .toast.show {
    transform: translateY(0);
  }
}

/* ───────────────────────────────────────────────────────────────────
   14. MODAIS APRIMORADOS
   ___________________________________________________________________ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-smooth),
              visibility 0.25s var(--ease-smooth);
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.3s var(--ease-bounce),
              opacity 0.25s var(--ease-smooth);
}
.modal-backdrop.open .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-dialog.modal-sm { max-width: 400px; }
.modal-dialog.modal-md { max-width: 560px; }
.modal-dialog.modal-lg { max-width: 800px; }
.modal-dialog.modal-xl { max-width: 1100px; }
.modal-dialog.modal-full {
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  width: calc(100vw - 40px);
  height: calc(100vh - 40px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.modal-header .modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header .modal-title i {
  color: var(--primary);
}
.modal-header .modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-header .modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  color: var(--text-muted);
  line-height: 1.6;
}
.modal-body strong,
.modal-body h3,
.modal-body h4 {
  color: var(--text);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.01);
}
.modal-footer.justify-between {
  justify-content: space-between;
}

/* Modal de confirmação */
.modal-confirm .modal-body {
  text-align: center;
  padding: 32px 24px 24px;
}
.modal-confirm .confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.modal-confirm .confirm-icon.danger {
  background: var(--danger-light);
  color: var(--danger);
}
.modal-confirm .confirm-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
}
.modal-confirm .confirm-icon.success {
  background: var(--success-light);
  color: var(--success);
}
.modal-confirm .confirm-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.modal-confirm .confirm-message {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Scroll lock no body */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

/* Modal mobile — full screen em telas pequenas */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal-dialog {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
  }
  .modal-backdrop.open .modal-dialog {
    transform: translateY(0);
  }
  .modal-dialog::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 0;
  }
}

/* ───────────────────────────────────────────────────────────────────
   15. DRAWERS LATERAIS
   ___________________________________________________________________ */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-smooth);
}
.drawer.open {
  transform: translateX(0);
}
.drawer.drawer-left {
  left: 0;
  right: auto;
  border-left: none;
  border-right: 1px solid var(--border);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(-100%);
}
.drawer.drawer-left.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.drawer-header .drawer-title {
  font-size: var(--text-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.drawer-footer .btn {
  flex: 1;
}

/* Drawer para filtros */
.filter-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.filter-section .section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.filter-section .filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-option:hover {
  background: var(--surface-3);
  border-color: var(--border);
}
.filter-option.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.filter-option .opt-label {
  font-size: var(--text-sm);
  font-weight: 500;
}
.filter-option .opt-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ───────────────────────────────────────────────────────────────────
   16. EMPTY STATES ILUSTRADOS
   ___________________________________________________________________ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
  min-height: 320px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 38px;
  color: var(--text-subtle);
  border: 2px dashed var(--border);
  position: relative;
}
.empty-state .empty-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-light), transparent 60%);
  opacity: 0.4;
  z-index: -1;
}
.empty-state .empty-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state .empty-desc {
  font-size: var(--text-sm);
  max-width: 380px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.empty-state .empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.empty-state.empty-sm {
  padding: var(--sp-8) var(--sp-5);
  min-height: 200px;
}
.empty-state.empty-sm .empty-icon {
  width: 64px;
  height: 64px;
  font-size: 24px;
  margin-bottom: 14px;
}
.empty-state.empty-sm .empty-title {
  font-size: var(--text-md);
}

/* Empty state para busca sem resultados */
.empty-state.search-empty .empty-icon {
  color: var(--accent);
  border-style: solid;
  background: var(--accent-light);
}

/* Empty state de erro */
.empty-state.error .empty-icon {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ───────────────────────────────────────────────────────────────────
   17. TABELAS RESPONSIVAS
   ___________________________________________________________________ */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--surface);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.table-wrap thead {
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-wrap thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.table-wrap thead th.sortable {
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.table-wrap thead th.sortable:hover {
  color: var(--text);
  background: var(--surface-3);
}
.table-wrap thead th.sortable::after {
  content: '⇅';
  margin-left: 6px;
  opacity: 0.4;
  font-size: 11px;
}
.table-wrap thead th.sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--primary);
}
.table-wrap thead th.sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--primary);
}

.table-wrap tbody tr {
  transition: background var(--transition);
}
.table-wrap tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.table-wrap tbody tr.selected {
  background: var(--primary-light);
}
.table-wrap tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: var(--text-sm);
  vertical-align: middle;
}
.table-wrap tbody tr:last-child td {
  border-bottom: none;
}

/* Zebra striping opcional */
.table-wrap.zebra tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

/* Compact */
.table-wrap.compact tbody td,
.table-wrap.compact thead th {
  padding: 8px 12px;
}

/* Células com ações no hover */
.table-wrap tbody tr .row-actions {
  opacity: 0;
  transition: opacity var(--transition);
  display: inline-flex;
  gap: 4px;
}
.table-wrap tbody tr:hover .row-actions,
.table-wrap tbody tr:focus-within .row-actions {
  opacity: 1;
}
@media (pointer: coarse) {
  .table-wrap tbody tr .row-actions {
    opacity: 1;
  }
}

/* Checkbox em tabela */
.table-wrap .row-checkbox {
  width: 40px;
  text-align: center;
}

/* Responsive: colapsa em cards no mobile */
@media (max-width: 768px) {
  .table-wrap.responsive thead {
    display: none;
  }
  .table-wrap.responsive tbody tr {
    display: block;
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
  }
  .table-wrap.responsive tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    text-align: right;
  }
  .table-wrap.responsive tbody td::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .table-wrap.responsive tbody td:first-child {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 8px;
  }
  .table-wrap.responsive tbody td:first-child::before {
    display: none;
  }
}

/* Linha expansível para detalhes */
.table-wrap tr.expandable {
  cursor: pointer;
}
.table-wrap tr.expand-row td {
  background: var(--surface-2);
  padding: 0;
}
.table-wrap tr.expand-row .expand-content {
  padding: 16px;
  animation: slide-down 0.25s var(--ease-smooth);
}

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

/* ───────────────────────────────────────────────────────────────────
   18. TIMELINE DE AUDITORIA
   ___________________________________________________________________ */

.timeline {
  position: relative;
  padding-left: 28px;
  margin: var(--sp-5) 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--border),
    var(--border) 90%,
    transparent
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.timeline-item.success::before {
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}
.timeline-item.warning::before {
  border-color: var(--warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}
.timeline-item.danger::before {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.timeline-item .timeline-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.timeline-item .timeline-date i {
  font-size: 11px;
}
.timeline-item .timeline-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.timeline-item .timeline-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}
.timeline-item .timeline-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.timeline-item .timeline-author .avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}

/* Timeline compacta */
.timeline.compact .timeline-item {
  padding-bottom: 14px;
}
.timeline.compact .timeline-item::before {
  width: 8px;
  height: 8px;
  left: -22px;
  top: 6px;
  border-width: 2px;
}

/* ───────────────────────────────────────────────────────────────────
   19. UPLOAD COM DRAG-AND-DROP
   ___________________________________________________________________ */

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover,
.upload-zone:focus-within {
  background: rgba(37, 99, 235, 0.04);
  border-color: var(--primary);
  color: var(--text);
}
.upload-zone.dragover {
  background: var(--primary-light);
  border-color: var(--primary);
  border-style: solid;
  color: var(--primary);
  transform: scale(1.01);
}
.upload-zone.dragover .upload-icon {
  animation: bounce-up 0.8s ease-in-out infinite;
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-zone .upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.upload-zone:hover .upload-icon,
.upload-zone.dragover .upload-icon {
  color: var(--primary);
}
.upload-zone .upload-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.upload-zone .upload-desc {
  font-size: var(--text-xs);
  max-width: 280px;
  line-height: 1.5;
}
.upload-zone .upload-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

@keyframes bounce-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Lista de arquivos carregados */
.upload-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  animation: slide-in-right 0.3s var(--ease-smooth);
}
.upload-item .file-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.upload-item.image .file-icon { color: var(--accent); }
.upload-item.video .file-icon { color: var(--warning); }
.upload-item.audio .file-icon { color: var(--success); }
.upload-item.doc .file-icon { color: var(--primary); }

.upload-item .file-info {
  flex: 1;
  min-width: 0;
}
.upload-item .file-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-item .file-meta {
  font-size: 11px;
  color: var(--text-subtle);
  display: flex;
  gap: 10px;
  margin-top: 2px;
}
.upload-item .file-progress {
  width: 100%;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.upload-item .file-progress > div {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s var(--ease-smooth);
}
.upload-item.uploaded .file-progress > div {
  background: var(--success);
  width: 100% !important;
}
.upload-item.error .file-progress > div {
  background: var(--danger);
}

.upload-item .file-actions {
  display: flex;
  gap: 4px;
}
.upload-item .file-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.upload-item .file-remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Preview de imagem em grid */
.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.upload-preview {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-preview .preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.upload-preview:hover .preview-remove {
  opacity: 1;
}

/* ───────────────────────────────────────────────────────────────────
   20. CHIPS E TAGS REMOVÍVEIS
   ___________________________________________________________________ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  max-width: 100%;
}
.chip:hover {
  background: var(--surface-3);
}
.chip .chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  margin-left: -4px;
}
.chip .chip-icon {
  font-size: 11px;
  color: var(--text-muted);
}
.chip .chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: all var(--transition);
  margin-right: -4px;
}
.chip .chip-remove:hover {
  background: var(--danger);
  color: #fff;
}

.chip-primary {
  background: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--primary);
}
.chip-primary .chip-icon {
  color: var(--primary);
}
.chip-success {
  background: var(--success-light);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}
.chip-warning {
  background: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning);
}
.chip-danger {
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.chip-accent {
  background: var(--accent-light);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent);
}

/* Chip group */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Input com chips (autocomplete) */
.chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 44px;
  cursor: text;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.chip-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.chip-input input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: var(--text-sm);
  outline: none;
}

/* ───────────────────────────────────────────────────────────────────
   21. SEGMENTED CONTROL
   ___________________________________________________________________ */

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  position: relative;
}
.segmented input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented label {
  position: relative;
  z-index: 2;
  padding: 7px 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.segmented label i {
  font-size: 12px;
}
.segmented input[type="radio"]:checked + label {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: var(--shadow-sm);
}
.segmented label:hover {
  color: var(--text);
}
.segmented input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.segmented.segmented-full {
  display: flex;
  width: 100%;
}
.segmented.segmented-full label {
  flex: 1;
  justify-content: center;
}

.segmented.segmented-lg label {
  padding: 10px 20px;
  font-size: var(--text-md);
}

/* ───────────────────────────────────────────────────────────────────
   22. SEARCH COM SUGESTÕES
   ___________________________________________________________________ */

.search-box {
  position: relative;
  width: 100%;
  max-width: 480px;
}
.search-box .search-input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-sm);
  transition: all var(--transition);
}
.search-box .search-input::placeholder {
  color: var(--text-subtle);
}
.search-box .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--surface);
}
.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.search-box .search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-3);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.search-box .search-clear:hover {
  background: var(--danger);
  color: #fff;
}
.search-box.has-value .search-clear {
  display: flex;
}
.search-box .search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

.search-box .search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  animation: fade-down 0.2s var(--ease-smooth);
}
.search-box.open .search-suggestions {
  display: block;
}

.suggestion-group {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.suggestion-group:last-child {
  border-bottom: none;
}
.suggestion-group-title {
  padding: 4px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.suggestion-item:hover,
.suggestion-item.active {
  background: var(--surface-2);
}
.suggestion-item .suggestion-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.suggestion-item .suggestion-main {
  flex: 1;
  min-width: 0;
}
.suggestion-item .suggestion-title {
  font-size: var(--text-sm);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggestion-item .suggestion-title mark {
  background: rgba(0, 212, 255, 0.25);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.suggestion-item .suggestion-desc {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.suggestion-item .suggestion-arrow {
  color: var(--text-subtle);
  font-size: 11px;
  opacity: 0;
  transition: opacity var(--transition);
}
.suggestion-item:hover .suggestion-arrow,
.suggestion-item.active .suggestion-arrow {
  opacity: 1;
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───────────────────────────────────────────────────────────────────
   23. PAGINAÇÃO
   ___________________________________________________________________ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.pagination .pagination-info {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.pagination .pagination-info strong {
  color: var(--text);
}
.pagination .pagination-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination .pagination-nav button,
.pagination .pagination-nav a {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.pagination .pagination-nav button:hover:not(:disabled),
.pagination .pagination-nav a:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border);
}
.pagination .pagination-nav button.active,
.pagination .pagination-nav a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.pagination .pagination-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination .pagination-nav .ellipsis {
  padding: 0 6px;
  color: var(--text-subtle);
  user-select: none;
}

.pagination .page-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.pagination .page-size select {
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  cursor: pointer;
}

/* Compact pagination (só prev/next) */
.pagination.compact {
  justify-content: center;
}
.pagination.compact .pagination-nav button {
  padding: 0 16px;
}

@media (max-width: 640px) {
  .pagination {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .pagination .pagination-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .pagination .pagination-info,
  .pagination .page-size {
    justify-content: center;
    text-align: center;
  }
}

/* ───────────────────────────────────────────────────────────────────
   24. PILLS DE FILTRO ATIVO
   ___________________________________________________________________ */

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-4);
  padding: 8px 0;
}
.active-filters .filter-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}
.active-filters .filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  animation: pop-in 0.25s var(--ease-bounce);
}
.active-filters .filter-pill strong {
  color: var(--text);
  font-weight: 600;
}
.active-filters .filter-pill .remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 10px;
  transition: all var(--transition);
}
.active-filters .filter-pill .remove:hover {
  background: var(--primary);
  color: #fff;
}
.active-filters .clear-all {
  background: none;
  border: none;
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  transition: background var(--transition);
}
.active-filters .clear-all:hover {
  background: var(--danger-light);
}

/* ───────────────────────────────────────────────────────────────────
   25. MENU MOBILE E SIDEBAR COLAPSÁVEL
   ___________________________________________________________________ */

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.mobile-menu-toggle:hover {
  background: var(--surface-2);
}
.mobile-menu-toggle .hamburger {
  position: relative;
  width: 18px;
  height: 14px;
}
.mobile-menu-toggle .hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s var(--ease-smooth);
}
.mobile-menu-toggle .hamburger span:nth-child(1) { top: 0; }
.mobile-menu-toggle .hamburger span:nth-child(2) { top: 6px; }
.mobile-menu-toggle .hamburger span:nth-child(3) { top: 12px; }
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.mobile-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .hamburger span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar colapsada — versão desktop (só ícones) */
.sidebar.collapsed {
  width: 72px;
}
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-footer {
  display: none;
}
.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 12px;
}
.sidebar.collapsed .nav-link i {
  margin: 0;
}

.sidebar-collapse-btn {
  position: absolute;
  top: 16px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 10;
  transition: all var(--transition);
}
.sidebar-collapse-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 999;
    transition: transform 0.3s var(--ease-smooth);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .main-content,
  .content-wrap {
    margin-left: 0 !important;
  }
}

/* ───────────────────────────────────────────────────────────────────
   26. COPY TO CLIPBOARD COM FEEDBACK
   ___________________________________________________________________ */

.copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  max-width: 100%;
}
.copy-wrap .copy-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.copy-wrap .copy-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition);
  position: relative;
}
.copy-wrap .copy-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.copy-wrap .copy-btn.copied {
  color: var(--success);
}
.copy-wrap .copy-btn.copied::after {
  content: 'Copiado!';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--success);
  color: #fff;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  animation: fade-up 0.3s var(--ease-bounce);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Bloco de código copiável */
.code-block {
  position: relative;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text);
  overflow-x: auto;
  line-height: 1.6;
}
.code-block .code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition);
}
.code-block:hover .code-copy {
  opacity: 1;
}
.code-block .code-copy:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ───────────────────────────────────────────────────────────────────
   27. KEYBOARD SHORTCUTS (kbd)
   ___________________________________________________________________ */

kbd,
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.kbd-combo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.kbd-combo .kbd-sep {
  color: var(--text-subtle);
  font-size: 10px;
  margin: 0 1px;
}

/* Painel de atalhos */
.shortcut-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  padding: var(--sp-4);
}
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.shortcut-item .shortcut-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex: 1;
}
.shortcut-item .shortcut-keys {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────────────
   28. BADGES ENRIQUECIDOS E DOT INDICATORS
   ___________________________________________________________________ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.3;
  white-space: nowrap;
}
.badge i {
  font-size: 10px;
}
.badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-primary {
  background: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--primary);
}
.badge-success {
  background: var(--success-light);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.badge-accent {
  background: var(--accent-light);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent);
}

.badge-outline {
  background: transparent;
}

.badge-solid-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.badge-solid-success { background: var(--success); color: #fff; border-color: var(--success); }
.badge-solid-danger  { background: var(--danger);  color: #fff; border-color: var(--danger); }
.badge-solid-warning { background: var(--warning); color: #fff; border-color: var(--warning); }

/* Badge pulsante (ao vivo / novos) */
.badge-live {
  position: relative;
  padding-left: 18px;
}
.badge-live::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 1.4s infinite;
}
.badge-live::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: pulse-ring 1.4s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-ring {
  0% {
    transform: translateY(-50%) scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-50%) scale(1.8);
    opacity: 0;
  }
}

/* Dot indicator (status online/offline) */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-subtle);
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
}
.status-dot.online { background: var(--success); }
.status-dot.online::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: pulse-ring 1.8s infinite;
}
.status-dot.offline { background: var(--text-subtle); }
.status-dot.busy { background: var(--danger); }
.status-dot.away { background: var(--warning); }

/* Severity badges (gravidade de denúncia) */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.severity-1 { background: rgba(16, 185, 129, 0.15); color: var(--n1); border: 1px solid rgba(16, 185, 129, 0.3); }
.severity-2 { background: rgba(245, 158, 11, 0.15); color: var(--n2); border: 1px solid rgba(245, 158, 11, 0.3); }
.severity-3 { background: rgba(249, 115, 22, 0.15); color: var(--n3); border: 1px solid rgba(249, 115, 22, 0.3); }
.severity-4 { background: rgba(239, 68, 68, 0.15);  color: var(--n4); border: 1px solid rgba(239, 68, 68, 0.3); }

.severity-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px currentColor;
  opacity: 0.3;
}

/* ───────────────────────────────────────────────────────────────────
   29. UTILITY HELPERS
   ___________________________________________________________________ */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flex helpers */
.flex-row { flex-direction: row !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-none { flex: none !important; }
.flex-grow { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* Justify */
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.justify-evenly { justify-content: space-evenly !important; }

/* Align */
.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }
.items-baseline { align-items: baseline !important; }

/* Self alignment */
.self-start { align-self: flex-start !important; }
.self-center { align-self: center !important; }
.self-end { align-self: flex-end !important; }
.self-stretch { align-self: stretch !important; }
.self-auto { align-self: auto !important; }

/* Gap */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
.gap-5 { gap: 20px !important; }
.gap-6 { gap: 24px !important; }
.gap-8 { gap: 32px !important; }

/* Margin helpers */
.m-0 { margin: 0 !important; }
.m-1 { margin: 4px !important; }
.m-2 { margin: 8px !important; }
.m-3 { margin: 12px !important; }
.m-4 { margin: 16px !important; }
.m-5 { margin: 20px !important; }
.m-6 { margin: 24px !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-5 { margin-top: 20px !important; }
.mt-6 { margin-top: 24px !important; }
.mt-8 { margin-top: 32px !important; }
.mt-auto { margin-top: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mb-8 { margin-bottom: 32px !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 4px !important; }
.ml-2 { margin-left: 8px !important; }
.ml-3 { margin-left: 12px !important; }
.ml-4 { margin-left: 16px !important; }
.ml-auto { margin-left: auto !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }
.mr-3 { margin-right: 12px !important; }
.mr-4 { margin-right: 16px !important; }
.mr-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* Padding helpers */
.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 12px !important; }
.p-4 { padding: 16px !important; }
.p-5 { padding: 20px !important; }
.p-6 { padding: 24px !important; }
.p-8 { padding: 32px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 4px !important; }
.pt-2 { padding-top: 8px !important; }
.pt-3 { padding-top: 12px !important; }
.pt-4 { padding-top: 16px !important; }
.pt-5 { padding-top: 20px !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 4px !important; }
.pb-2 { padding-bottom: 8px !important; }
.pb-3 { padding-bottom: 12px !important; }
.pb-4 { padding-bottom: 16px !important; }
.pb-5 { padding-bottom: 20px !important; }

.px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.px-4 { padding-left: 16px !important; padding-right: 16px !important; }
.px-5 { padding-left: 20px !important; padding-right: 20px !important; }

.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
.py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-5 { padding-top: 20px !important; padding-bottom: 20px !important; }

/* Text helpers */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-md { font-size: var(--text-md) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }

.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-subtle { color: var(--text-subtle) !important; }
.text-white { color: #fff !important; }

.uppercase { text-transform: uppercase !important; letter-spacing: 0.05em; }
.lowercase { text-transform: lowercase !important; }
.capitalize { text-transform: capitalize !important; }

.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.truncate-2,
.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.truncate-3,
.line-clamp-3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.break-words { word-break: break-word !important; overflow-wrap: break-word !important; }
.break-all { word-break: break-all !important; }
.whitespace-nowrap { white-space: nowrap !important; }
.whitespace-normal { white-space: normal !important; }

.tabular-nums { font-variant-numeric: tabular-nums !important; }

/* Backgrounds */
.bg-surface { background: var(--surface) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }
.bg-surface-3 { background: var(--surface-3) !important; }
.bg-primary { background: var(--primary) !important; }
.bg-transparent { background: transparent !important; }

/* Borders */
.border { border: 1px solid var(--border) !important; }
.border-light { border: 1px solid var(--border-light) !important; }
.border-t { border-top: 1px solid var(--border) !important; }
.border-b { border-bottom: 1px solid var(--border) !important; }
.border-l { border-left: 1px solid var(--border) !important; }
.border-r { border-right: 1px solid var(--border) !important; }
.border-0 { border: none !important; }

.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Width/height */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.w-fit { width: fit-content !important; }
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }
.min-w-0 { min-width: 0 !important; }
.max-w-sm { max-width: 384px !important; }
.max-w-md { max-width: 480px !important; }
.max-w-lg { max-width: 640px !important; }
.max-w-xl { max-width: 800px !important; }
.max-w-full { max-width: 100% !important; }

/* Position */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.sticky { position: sticky !important; }
.static { position: static !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }
.overflow-visible { overflow: visible !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-help { cursor: help !important; }
.cursor-text { cursor: text !important; }
.cursor-grab { cursor: grab !important; }

/* Opacity */
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Visibility */
.invisible { visibility: hidden !important; }
.visible { visibility: visible !important; }

/* Pointer events */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* User select */
.select-none { user-select: none !important; }
.select-text { user-select: text !important; }
.select-all { user-select: all !important; }

/* Z-index helpers */
.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-50 { z-index: 50 !important; }
.z-100 { z-index: 100 !important; }

/* ───────────────────────────────────────────────────────────────────
   30. ANIMAÇÕES DE ENTRADA/SAÍDA
   ___________________________________________________________________ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-up-bounce {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  70% {
    transform: translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in { animation: fade-in 0.3s var(--ease-smooth) both; }
.animate-fade-in-up { animation: fade-in-up 0.35s var(--ease-smooth) both; }
.animate-fade-in-down { animation: fade-in-down 0.35s var(--ease-smooth) both; }
.animate-fade-in-left { animation: fade-in-left 0.35s var(--ease-smooth) both; }
.animate-fade-in-right { animation: fade-in-right 0.35s var(--ease-smooth) both; }
.animate-scale-in { animation: scale-in 0.3s var(--ease-bounce) both; }
.animate-zoom-in { animation: zoom-in 0.35s var(--ease-bounce) both; }
.animate-slide-up { animation: slide-up-bounce 0.5s var(--ease-smooth) both; }

/* Delay helpers (stagger) */
.delay-75 { animation-delay: 75ms !important; }
.delay-100 { animation-delay: 100ms !important; }
.delay-150 { animation-delay: 150ms !important; }
.delay-200 { animation-delay: 200ms !important; }
.delay-300 { animation-delay: 300ms !important; }
.delay-500 { animation-delay: 500ms !important; }

/* Hover lift */
.hover-lift {
  transition: transform 0.25s var(--ease-smooth),
              box-shadow 0.25s var(--ease-smooth);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow 0.3s var(--ease-smooth);
}
.hover-glow:hover {
  box-shadow: 0 0 24px var(--primary-glow);
}

.hover-scale {
  transition: transform 0.25s var(--ease-smooth);
}
.hover-scale:hover {
  transform: scale(1.03);
}

/* Pulse attention */
@keyframes attention-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 0 10px transparent;
  }
}
.animate-attention {
  animation: attention-pulse 1.8s ease-in-out infinite;
}

/* Shake */
.animate-shake {
  animation: shake 0.4s var(--ease-smooth);
}

/* Staggered list animation */
.stagger-list > * {
  opacity: 0;
  animation: fade-in-up 0.4s var(--ease-smooth) both;
}
.stagger-list > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.30s; }
.stagger-list > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-list > *:nth-child(8) { animation-delay: 0.40s; }
.stagger-list > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-list > *:nth-child(10) { animation-delay: 0.50s; }

/* ───────────────────────────────────────────────────────────────────
   31. PRINT STYLES
   ___________________________________________________________________ */

@media print {
  /* Resetar cores escuras para economizar tinta */
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f3f4f6;
    --border: #d1d5db;
    --border-light: #e5e7eb;
    --text: #111827;
    --text-muted: #4b5563;
    --text-subtle: #6b7280;
  }
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 12pt;
    line-height: 1.5;
  }
  /* Ocultar elementos de navegação ao imprimir */
  .sidebar,
  .topbar,
  .mobile-menu-toggle,
  .sidebar-backdrop,
  .toast-container,
  .fab,
  .modal-backdrop,
  .drawer,
  .skip-link,
  .pagination,
  .search-box,
  .filter-drawer,
  .btn,
  .icon-btn,
  button,
  .no-print,
  nav {
    display: none !important;
  }
  .main-content,
  .content-wrap {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .page-header {
    border-bottom: 2px solid #111827 !important;
    padding-bottom: 12pt;
    margin-bottom: 16pt;
  }
  .card,
  .panel {
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    background: #ffffff !important;
    page-break-inside: avoid;
  }
  a {
    color: #111827 !important;
    text-decoration: underline;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #6b7280;
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: '';
  }
  /* Mostrar explicitamente conteúdo marcado para print */
  .print-only {
    display: block !important;
  }
  .screen-only {
    display: none !important;
  }
  /* Timeline em print */
  .timeline {
    padding-left: 20pt;
  }
  .timeline::before {
    background: #111827 !important;
  }
  .timeline-item::before {
    background: #ffffff !important;
    border-color: #111827 !important;
    box-shadow: none !important;
  }
  /* Quebras de página controladas */
  h1, h2, h3 {
    page-break-after: avoid;
  }
  table {
    page-break-inside: avoid;
  }
  .page-break {
    page-break-before: always;
  }
  /* Badges imprimíveis */
  .badge,
  .severity-badge {
    border: 1px solid currentColor !important;
    background: transparent !important;
  }
}

.print-only {
  display: none;
}

/* ───────────────────────────────────────────────────────────────────
   32. RESPONSIVE BREAKPOINTS FINAIS
   ___________________________________________________________________ */

/* xs — até 480px */
@media (max-width: 480px) {
  :root {
    --content-pad: 16px;
    --text-2xl: 1.25rem;
    --text-xl: 1.125rem;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-header .actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .page-header .actions .btn {
    flex: 1;
  }
  .hide-xs { display: none !important; }
}

/* sm — 481 a 640px */
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .stack-sm {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .stack-sm > * {
    width: 100%;
  }
  .card,
  .panel {
    padding: 16px !important;
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .btn {
    min-height: 42px;
  }
  h1 { font-size: var(--text-xl); }
}

/* md — 641 a 1024px */
@media (max-width: 1024px) {
  .hide-md { display: none !important; }
  :root {
    --content-pad: 20px;
  }
  .grid-2-md { grid-template-columns: 1fr !important; }
  .grid-3-md { grid-template-columns: 1fr 1fr !important; }
}

@media (min-width: 641px) {
  .show-xs-only { display: none !important; }
}
@media (min-width: 1025px) {
  .show-md-only { display: none !important; }
}

/* lg — acima de 1024px */
@media (min-width: 1024px) {
  .hide-lg { display: none !important; }
}

/* Tablet landscape / laptop pequeno */
@media (min-width: 768px) and (max-width: 1200px) {
  .stats-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Container queries onde suportado */
@supports (container-type: inline-size) {
  .card-container {
    container-type: inline-size;
  }
  @container (max-width: 400px) {
    .card-container .card-row {
      flex-direction: column;
      align-items: flex-start;
    }
  }
}

/* Dark mode overrides (base já é dark, mas previne flash em prefs claras) */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: dark;
  }
}

/* Orientação portrait em tablets */
@media (orientation: portrait) and (max-width: 900px) {
  .two-col-layout {
    grid-template-columns: 1fr !important;
  }
}

/* High-DPI (retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hairline {
    border-width: 0.5px;
  }
}

/* ───────────────────────────────────────────────────────────────────
   EXTRAS — MICRO-INTERAÇÕES E POLIMENTOS
   ___________________________________________________________________ */

/* Ripple effect para clicks em botões */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ease-smooth),
              height 0.5s var(--ease-smooth),
              opacity 0.5s;
  pointer-events: none;
}
.ripple:active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
  transition: 0s;
}

/* Cartões interativos */
.interactive-card {
  cursor: pointer;
  transition: transform 0.25s var(--ease-smooth),
              border-color 0.25s var(--ease-smooth),
              box-shadow 0.25s var(--ease-smooth);
}
.interactive-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}
.interactive-card:active {
  transform: translateY(0);
}
.interactive-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Radio cards (seleção visual) */
.radio-card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.radio-card {
  position: relative;
  padding: 16px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.radio-card:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card input[type="radio"]:checked + .radio-content {
  color: var(--text);
}
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.radio-card:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  animation: pop-in 0.3s var(--ease-bounce);
}
.radio-card .radio-icon {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 8px;
}
.radio-card .radio-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.radio-card .radio-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Switch toggle (alternativa a checkbox) */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: background 0.25s var(--ease-smooth);
}
.switch .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.25s var(--ease-bounce),
              background 0.25s var(--ease-smooth);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.switch input:checked + .slider {
  background: var(--primary);
  border-color: var(--primary);
}
.switch input:checked + .slider::before {
  transform: translateX(18px);
  background: #fff;
}
.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px var(--primary-light);
}
.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch-label .switch-text {
  font-size: var(--text-sm);
  color: var(--text);
}
.switch-label .switch-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Dropdown/menu contextual */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s var(--ease-smooth);
}
.dropdown-menu.left {
  right: auto;
  left: 0;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  text-align: left;
}
.dropdown-item:hover {
  background: var(--surface-2);
}
.dropdown-item i {
  color: var(--text-muted);
  width: 16px;
  font-size: 13px;
}
.dropdown-item.danger {
  color: var(--danger);
}
.dropdown-item.danger:hover {
  background: var(--danger-light);
}
.dropdown-item .shortcut {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}
.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}
.dropdown-header {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.accordion-item {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.accordion-item.open {
  border-color: var(--primary);
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: transparent;
  border: none;
  width: 100%;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.accordion-header:hover {
  background: var(--surface-3);
}
.accordion-header .accordion-icon {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.25s var(--ease-smooth);
}
.accordion-item.open .accordion-header .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-smooth);
}
.accordion-item.open .accordion-body {
  max-height: 1000px;
}
.accordion-body-inner {
  padding: 0 16px 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Banner/alert informativo */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
}
.alert .alert-icon {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--primary);
  margin-top: 1px;
}
.alert .alert-content {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}
.alert .alert-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.alert .alert-message {
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.alert .alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.alert .alert-close:hover {
  background: var(--surface-3);
  color: var(--text);
}
.alert-success {
  border-left-color: var(--success);
}
.alert-success .alert-icon { color: var(--success); }
.alert-danger {
  border-left-color: var(--danger);
}
.alert-danger .alert-icon { color: var(--danger); }
.alert-warning {
  border-left-color: var(--warning);
}
.alert-warning .alert-icon { color: var(--warning); }
.alert-info {
  border-left-color: var(--accent);
}
.alert-info .alert-icon { color: var(--accent); }

/* Divider com texto */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: var(--sp-5) 0;
  color: var(--text-subtle);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.divider-simple {
  height: 1px;
  background: var(--border-light);
  margin: var(--sp-5) 0;
  border: none;
}

/* Skeleton de card KPI */
.kpi-skeleton {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}
.kpi-skeleton .skeleton-label {
  width: 60%;
  height: 12px;
  margin-bottom: 10px;
}
.kpi-skeleton .skeleton-value {
  width: 40%;
  height: 28px;
  margin-bottom: 8px;
}
.kpi-skeleton .skeleton-trend {
  width: 30%;
  height: 10px;
}

/* Avatar group (empilhados) */
.avatar-group {
  display: inline-flex;
  align-items: center;
}
.avatar-group .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-left: -10px;
  transition: transform var(--transition);
  position: relative;
}
.avatar-group .avatar:first-child {
  margin-left: 0;
}
.avatar-group .avatar:hover {
  transform: translateY(-3px);
  z-index: 5;
}
.avatar-group .avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-group .avatar.more {
  background: var(--surface-3);
  color: var(--text);
}

.avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar-md { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 14px; }
.avatar-xl { width: 64px; height: 64px; font-size: 18px; }

/* Rating stars */
.rating {
  display: inline-flex;
  gap: 2px;
  color: var(--warning);
  font-size: 14px;
}
.rating .star {
  cursor: pointer;
  transition: transform var(--transition);
}
.rating .star:hover {
  transform: scale(1.2);
}
.rating .star.filled {
  color: var(--warning);
}
.rating .star.empty {
  color: var(--surface-3);
}
.rating-label {
  margin-left: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Reactive focus indicator for cards */
.focus-card {
  transition: all var(--transition);
}
.focus-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Status card com ícone grande */
.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.status-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.status-card .status-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.status-card.success .status-icon {
  background: var(--success-light);
  color: var(--success);
}
.status-card.warning .status-icon {
  background: var(--warning-light);
  color: var(--warning);
}
.status-card.danger .status-icon {
  background: var(--danger-light);
  color: var(--danger);
}
.status-card .status-body {
  flex: 1;
  min-width: 0;
}
.status-card .status-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.status-card .status-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Hover reveal (mostra ação ao passar o mouse) */
.hover-reveal {
  position: relative;
}
.hover-reveal .reveal-content {
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition);
  pointer-events: none;
}
.hover-reveal:hover .reveal-content,
.hover-reveal:focus-within .reveal-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--ease-smooth);
  z-index: 100;
  box-shadow: var(--shadow);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-4px);
}

/* Context menu (menu de clique direito) */
.context-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transform-origin: top left;
  transition: all 0.15s var(--ease-smooth);
}
.context-menu.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Split view resizer */
.split-view {
  display: flex;
  height: 100%;
  position: relative;
}
.split-view .split-pane {
  overflow: auto;
  min-width: 0;
}
.split-view .split-resizer {
  width: 4px;
  background: var(--border-light);
  cursor: col-resize;
  flex-shrink: 0;
  transition: background var(--transition);
}
.split-view .split-resizer:hover,
.split-view .split-resizer.dragging {
  background: var(--primary);
  width: 4px;
}

/* Diff view (comparação de alterações) */
.diff-line {
  display: flex;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.6;
}
.diff-line.added {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.diff-line.added::before {
  content: '+';
  margin-right: 8px;
  font-weight: 700;
}
.diff-line.removed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
}
.diff-line.removed::before {
  content: '-';
  margin-right: 8px;
  font-weight: 700;
}

/* Quote / testimonial */
.quote {
  position: relative;
  padding: 20px 24px 20px 48px;
  background: var(--surface-2);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
}
.quote::before {
  content: '"';
  position: absolute;
  left: 14px;
  top: 4px;
  font-size: 48px;
  color: var(--primary);
  font-family: Georgia, serif;
  line-height: 1;
  font-style: normal;
}
.quote .quote-author {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Card de métrica com sparkline */
.metric-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.metric-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metric-card .metric-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric-card .metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.metric-card .metric-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.metric-card .metric-trend.up { color: var(--success); }
.metric-card .metric-trend.down { color: var(--danger); }
.metric-card .metric-trend.neutral { color: var(--text-muted); }
.metric-card .metric-sparkline {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 40px;
  opacity: 0.6;
  pointer-events: none;
}

/* Helpers para cores de gravidade aplicadas ao texto/borda */
.text-n1 { color: var(--n1) !important; }
.text-n2 { color: var(--n2) !important; }
.text-n3 { color: var(--n3) !important; }
.text-n4 { color: var(--n4) !important; }
.bg-n1 { background: rgba(16, 185, 129, 0.15) !important; }
.bg-n2 { background: rgba(245, 158, 11, 0.15) !important; }
.bg-n3 { background: rgba(249, 115, 22, 0.15) !important; }
.bg-n4 { background: rgba(239, 68, 68, 0.15) !important; }
.border-n1 { border-color: var(--n1) !important; }
.border-n2 { border-color: var(--n2) !important; }
.border-n3 { border-color: var(--n3) !important; }
.border-n4 { border-color: var(--n4) !important; }

/* Confetti target area (celebração de ação concluída) */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 14px;
  top: -20px;
  pointer-events: none;
  animation: confetti-fall 3s linear forwards;
  z-index: 10000;
}

/* Check animado (sucesso) */
@keyframes check-draw {
  0% {
    stroke-dashoffset: 30;
  }
  100% {
    stroke-dashoffset: 0;
  }
}
.check-animated {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--success);
}
.check-animated svg {
  width: 24px;
  height: 24px;
  stroke: var(--success);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  animation: check-draw 0.5s var(--ease-smooth) 0.2s forwards;
  stroke-dashoffset: 30;
}

/* Loading dots (3 pontinhos animados) */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-bounce 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Counter animado */
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  animation: count-up 0.4s var(--ease-smooth);
}

/* Onboarding spotlight (destaque em tutorial) */
.tour-spotlight {
  position: relative;
  z-index: 1001;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.4),
    0 0 0 9999px rgba(10, 15, 30, 0.8);
  border-radius: var(--radius);
  animation: spotlight-pulse 2s ease-in-out infinite;
}
@keyframes spotlight-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(37, 99, 235, 0.4),
      0 0 0 9999px rgba(10, 15, 30, 0.8);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(37, 99, 235, 0.6),
      0 0 0 9999px rgba(10, 15, 30, 0.8);
  }
}

.tour-popover {
  position: absolute;
  z-index: 1002;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 320px;
  box-shadow: var(--shadow-xl);
  color: var(--text);
}
.tour-popover .tour-step {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}
.tour-popover .tour-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: 6px;
}
.tour-popover .tour-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.tour-popover .tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tour-popover .tour-progress {
  font-size: 11px;
  color: var(--text-subtle);
}

/* ───────────────────────────────────────────────────────────────────
   33. FULL-WIDTH OVERRIDE
   Força todas as páginas a ocupar 100% da viewport.
   Aplica-se aos containers, cards de conteúdo e áreas dos painéis.
   ___________________________________________________________________ */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
}

/* Painéis admin/super-admin já usam flex: 1 via .main/.content em base.css.
   Aqui reforçamos que nada interno limita a largura. */
.layout,
.main,
.content,
.content-wrap,
.page-wrap {
  width: 100%;
  max-width: 100%;
}

.content {
  box-sizing: border-box;
}

/* Sobrescreve .container genérico usado em páginas com styles inline */
.container {
  max-width: 100% !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
}

/* Wrapper do formulário público de denúncia */
.wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Grids internos: usar toda a largura disponível */
.stats-grid,
.kpi-grid,
.features-grid,
.pricing-grid,
.compliance-grid,
.card-grid,
.two-col-layout,
.three-col-layout,
.settings-grid {
  width: 100%;
  max-width: 100% !important;
}

/* Cards de conteúdo principal (não confundir com modais) */
.main .card,
.content .card,
.content > .panel,
.content > section {
  width: 100%;
}

/* Tabelas sempre ocupam a largura total */
.main .table-wrap,
.content .table-wrap,
table.full {
  width: 100%;
  max-width: 100%;
}

/* Topbar/header estende na largura total */
.topbar,
.page-header,
header.site-header,
nav.navbar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Seções da landing page — garantem que todo conteúdo use largura total */
.section,
section.section,
.hero,
.features,
.how-it-works,
.pricing,
.compliance,
.faq,
.cta-section,
.social-proof,
footer.site-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Remove qualquer centragem automática por margem em elementos de bloco dentro
   de áreas de conteúdo (menos para modais que são posicionados em overlay). */
.content > *,
.main > *:not(.topbar) {
  max-width: 100%;
}

/* Padding lateral responsivo para os containers full-width */
@media (max-width: 1024px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Garante que os modais continuam centralizados com max-width próprio
   (esses NÃO devem ser full-width). */
.modal-backdrop .modal-dialog,
.modal {
  max-width: 95vw;
}
.modal-dialog.modal-sm { max-width: 400px; }
.modal-dialog.modal-md { max-width: 560px; }
.modal-dialog.modal-lg { max-width: 900px; }
.modal-dialog.modal-xl { max-width: 1280px; }

/* Login pages — layout 50/50 full-width */
.login-left,
.login-right {
  flex: 1;
  min-width: 0;
}
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right {
    flex: 1;
    width: 100%;
    padding: 40px 24px !important;
  }
}

/* FIM — usability.css */
