/* ══════════════════════════════════════════════════════════════
   FB DESIGN SYSTEM v4.0 · CSS
   ──────────────────────────────────────────────────────────────
   Substitui uplift-monolito.css (Gestor) + uplift-perito.css (Perito)
   por uma camada ÚNICA. Mesmo arquivo, mesmas regras, mesmo visual
   nos dois monolitos e na SPA v2.

   Filosofia:
   • Aditivo · só estende, nunca remove (zero risco de regressão)
   • Mesmo seletor cobre Chart.js (.chart-wrap canvas) e SVG nativo
     (.chart-wrap path/rect/circle) — funciona nos dois charts
   • Drawers compartilham .drawer (Gestor) e .drawer-overlay (Perito)
     com classes paralelas — um sistema, dois nomes legados
   • Tudo respeita @prefers-reduced-motion
   ══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   1 · STAGGER REVEAL · entrada de seções
   ══════════════════════════════════════════════════════════════ */
.content > .view > *,         /* Gestor: .view dentro de .content */
.secao.ativa > *,             /* Perito: .secao.ativa */
.fb-stagger > * {              /* genérico */
  opacity: 0;
  animation: fbFadeUp .42s var(--ease-out) forwards;
}
.content > .view > *:nth-child(1),  .secao.ativa > *:nth-child(1),  .fb-stagger > *:nth-child(1)  { animation-delay:  20ms; }
.content > .view > *:nth-child(2),  .secao.ativa > *:nth-child(2),  .fb-stagger > *:nth-child(2)  { animation-delay:  60ms; }
.content > .view > *:nth-child(3),  .secao.ativa > *:nth-child(3),  .fb-stagger > *:nth-child(3)  { animation-delay: 100ms; }
.content > .view > *:nth-child(4),  .secao.ativa > *:nth-child(4),  .fb-stagger > *:nth-child(4)  { animation-delay: 140ms; }
.content > .view > *:nth-child(5),  .secao.ativa > *:nth-child(5),  .fb-stagger > *:nth-child(5)  { animation-delay: 180ms; }
.content > .view > *:nth-child(6),  .secao.ativa > *:nth-child(6),  .fb-stagger > *:nth-child(6)  { animation-delay: 220ms; }
.content > .view > *:nth-child(7),  .secao.ativa > *:nth-child(7),  .fb-stagger > *:nth-child(7)  { animation-delay: 260ms; }
.content > .view > *:nth-child(8),  .secao.ativa > *:nth-child(8),  .fb-stagger > *:nth-child(8)  { animation-delay: 300ms; }
.content > .view > *:nth-child(9),  .secao.ativa > *:nth-child(9),  .fb-stagger > *:nth-child(9)  { animation-delay: 340ms; }
.content > .view > *:nth-child(10), .secao.ativa > *:nth-child(10), .fb-stagger > *:nth-child(10) { animation-delay: 380ms; }
.content > .view > *:nth-child(11), .secao.ativa > *:nth-child(11), .fb-stagger > *:nth-child(11) { animation-delay: 420ms; }
.content > .view > *:nth-child(12), .secao.ativa > *:nth-child(12), .fb-stagger > *:nth-child(12) { animation-delay: 460ms; }

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


/* ══════════════════════════════════════════════════════════════
   2 · KPI CARDS · accent line top + lift
   Cobre 3 namings legados: .kpi-card (Perito), .portal-card (Gestor), .kpi (SPA)
   ══════════════════════════════════════════════════════════════ */
.kpi-card,
.portal-card,
.kpi {
  position: relative;
  overflow: hidden;
  transition:
    transform   .25s var(--ease-out),
    box-shadow  .25s var(--ease-soft),
    border-color .15s ease;
}
.kpi-card::before,
.portal-card::before,
.kpi::before {
  content: '';
  position: absolute; inset: 0 auto auto 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .45s var(--ease-out);
  pointer-events: none;
}
.kpi-card:hover,
.portal-card:hover,
.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.kpi-card:hover::before,
.portal-card:hover::before,
.kpi:hover::before { width: 100%; }

/* Variantes severidade — accent line acompanha cor */
.kpi-card.crit::before, .portal-card.crit::before  { background: linear-gradient(90deg, var(--crit), #ef4444); }
.kpi-card.warn::before, .portal-card.warn::before  { background: linear-gradient(90deg, var(--warn), #f59e0b); }
.kpi-card.ok::before,   .portal-card.ok::before    { background: linear-gradient(90deg, var(--ok), #10b981); }
.kpi-card.info::before, .portal-card.info::before  { background: linear-gradient(90deg, var(--info), #2a5957); }

/* Pulse no ícone */
.kpi-card .pc-ico,
.portal-card .pc-ico,
.kpi-card .ico,
.portal-card .ico {
  transition: transform .25s var(--ease-back);
}
.kpi-card:hover .pc-ico, .portal-card:hover .pc-ico,
.kpi-card:hover .ico,    .portal-card:hover .ico { transform: scale(1.08) rotate(-3deg); }

/* Foco acessível */
.kpi-card:focus-visible,
.portal-card:focus-visible,
.kpi:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft);
}


/* ══════════════════════════════════════════════════════════════
   3 · SIDEBAR · nudge horizontal + ícone que gira
   Cobre .sidebar__item (SPA/Gestor) + .sb-item (Perito)
   ══════════════════════════════════════════════════════════════ */
.sidebar__item,
.sb-item {
  transition:
    background  .15s var(--ease-soft),
    color       .15s var(--ease-soft),
    border-color .15s var(--ease-soft),
    padding-left .18s var(--ease-out),
    transform   .18s var(--ease-out);
}
.sidebar__item:hover,
.sb-item:not(.soon):hover {
  padding-left: 24px;
}
.sidebar__item .sidebar__item__ico,
.sb-item .ico {
  display: inline-block;
  transition: transform .25s var(--ease-back);
}
.sidebar__item:hover .sidebar__item__ico,
.sb-item:not(.soon):hover .ico {
  transform: scale(1.1) rotate(-3deg);
}
.sidebar__item.is-active .sidebar__item__ico,
.sb-item.ativa .ico { transform: scale(1.05); }


/* ══════════════════════════════════════════════════════════════
   4 · CHARTS · animações de entrada
   Funciona em DOIS sistemas:
   • SVG nativo do Gestor (.chart-wrap path.line-stroke etc.)
   • Chart.js do Perito — animação nativa do Chart.js já fluida,
     então aqui só refinamos tooltip + grid.
   ══════════════════════════════════════════════════════════════ */

/* — SVG: linha que se desenha — */
.chart-wrap .line-stroke {
  stroke-dasharray: var(--line-len, 1000);
  stroke-dashoffset: var(--line-len, 1000);
  animation: fbLineDraw 1.1s var(--ease-out) forwards;
}
.chart-wrap .line-area {
  fill-opacity: 0;
  animation: fbAreaFade .8s var(--ease-out) .8s forwards;
}
@keyframes fbLineDraw { to { stroke-dashoffset: 0; } }
@keyframes fbAreaFade { to { fill-opacity: .12; } }

/* — Dots da linha · pop staggered — */
.chart-wrap .dot {
  opacity: 0;
  transform-origin: center;
  animation: fbDotPop .25s var(--ease-back) forwards;
  animation-delay: calc(.7s + var(--dot-i, 0) * 30ms);
  transition: r .15s var(--ease-out);
}
@keyframes fbDotPop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

/* — Bars horizontais (Gestor) · scaleX da esquerda — */
.chart-wrap .bar-rect {
  transform-origin: left center;
  transform: scaleX(0);
  animation: fbBarGrowH .65s var(--ease-out) forwards;
  animation-delay: calc(var(--bar-i, 0) * 60ms);
}
@keyframes fbBarGrowH { to { transform: scaleX(1); } }

/* — Bars verticais · scaleY de baixo — */
.chart-wrap .bar-rect-v {
  cursor: pointer;
  transform-origin: bottom center;
  transform: scaleY(0);
  animation: fbBarGrowV .65s var(--ease-out) forwards;
  animation-delay: calc(var(--bar-i, 0) * 60ms);
  transition: filter .15s ease;
}
.chart-wrap .bar-rect-v:hover { filter: brightness(.92); }
@keyframes fbBarGrowV { to { transform: scaleY(1); } }

/* — Labels fade-in atrasado — */
.chart-wrap .bar-label {
  opacity: 0;
  animation: fbLblFade .4s var(--ease-out) forwards;
  animation-delay: calc(.5s + var(--bar-i, 0) * 60ms);
}
@keyframes fbLblFade { to { opacity: 1; } }

/* — Grid pontilhado discreto (SVG) — */
.chart-wrap .grid-line {
  stroke: var(--borda-soft) !important;
  stroke-dasharray: 2 3;
}

/* — Tooltip universal · cobre .chart-tt (Gestor) e .fb-chart-tip (genérico) — */
.chart-tt,
.fb-chart-tip {
  position: absolute;
  pointer-events: none;
  z-index: var(--z-tooltip);
  background: rgba(20, 32, 32, .94);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(209, 169, 80, .25);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  line-height: 1.4;
  min-width: 120px;
  max-width: 280px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s var(--ease-soft), transform .2s var(--ease-out);
}
.chart-tt.is-visible,
.fb-chart-tip.show { opacity: 1; transform: translateY(0); }

.chart-tt .tt-val,
.fb-chart-tip__value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
  color: var(--gold);
  letter-spacing: -0.005em;
}
.fb-chart-tip__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 6px;
  font-weight: 600;
}
.fb-chart-tip__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-top: 4px;
}


/* ══════════════════════════════════════════════════════════════
   5 · DRAWER UNIFICADO
   Cobre 3 namings:
   • .drawer (Gestor v3) com .drawer__panel + .drawer__overlay
   • .drawer-overlay + .drawer (Perito legado, panel é o próprio .drawer)
   • .fb-drawer (novo, SPA v2)

   Animações de entrada universais. Stack manager (em fb-ds.js)
   aplica .is-stacked-below quando outro drawer abre por cima.
   ══════════════════════════════════════════════════════════════ */

/* Camadas por profundidade (data-depth setado pelo stack manager) */
.drawer[data-depth="1"], .fb-drawer[data-depth="1"] { z-index: var(--z-drawer); }
.drawer[data-depth="2"], .fb-drawer[data-depth="2"] { z-index: calc(var(--z-drawer) + 10); }
.drawer[data-depth="3"], .fb-drawer[data-depth="3"] { z-index: calc(var(--z-drawer) + 20); }
.drawer[data-depth="4"], .fb-drawer[data-depth="4"] { z-index: calc(var(--z-drawer) + 30); }

/* Overlay com blur ambiente */
.drawer-overlay,
.drawer__overlay,
.fb-drawer__overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity .25s var(--ease-soft);
}
.drawer-overlay.show,
.drawer.is-open .drawer__overlay,
.fb-drawer.is-open .fb-drawer__overlay {
  animation: fbDrawerOverlayIn .25s var(--ease-out);
}
@keyframes fbDrawerOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Panel slide-in da direita */
.drawer.is-open .drawer__panel,
.fb-drawer.is-open .fb-drawer__panel {
  animation: fbDrawerSlideIn .35s var(--ease-out);
}
@keyframes fbDrawerSlideIn {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* Empilhamento · drawer abaixo do topo recua + escurece */
.drawer.is-stacked-below .drawer__panel,
.fb-drawer.is-stacked-below .fb-drawer__panel {
  transform: translateX(-30px) scale(.985);
  filter: brightness(.85);
  transition: transform .35s var(--ease-out), filter .25s ease;
  pointer-events: none;
}
/* Compat com perito-pneus (panel é o próprio .drawer) */
.drawer.is-stacked-below:not(:has(.drawer__panel)) {
  transform: translateX(calc(100% - 30px)) brightness(.85) !important;
  filter: brightness(.85);
  pointer-events: none;
}

/* Glow ambiente dourado no header (atmosfera "premium") */
.drawer__header,
.drawer-head,
.fb-drawer__header {
  position: relative;
  overflow: hidden;
}
.drawer__header > *,
.drawer-head > *,
.fb-drawer__header > * { position: relative; z-index: 1; }
.drawer__header::before,
.drawer-head::after,
.fb-drawer__header::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Botão fechar gira no hover */
.drawer__close,
.drawer-close,
.fb-drawer__close {
  transition: all .2s var(--ease-out);
}
.drawer__close:hover,
.drawer-close:hover,
.fb-drawer__close:hover { transform: rotate(90deg); }

/* Breadcrumb "Voltar a..." injetado pelo DrawerStack quando há drawer empilhado */
.drawer__breadcrumb,
.fb-drawer__breadcrumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, .65);
}
.drawer__breadcrumb-back,
.fb-drawer__breadcrumb-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .85);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease-out);
}
.drawer__breadcrumb-back:hover,
.fb-drawer__breadcrumb-back:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .3);
  transform: translateX(-2px);
}
.drawer__breadcrumb-trail,
.fb-drawer__breadcrumb-trail {
  color: rgba(255, 255, 255, .5);
  font-style: italic;
}

/* Compat: breadcrumb no header escuro do Perito (drawer-back-crumb legacy) */
.drawer-back-crumb {
  display: inline-flex; align-items: center; gap: 4px;
  margin-right: 8px; padding: 4px 10px;
  font-size: 12px; color: var(--gold);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s var(--ease-soft), transform .18s var(--ease-out);
}
.drawer-back-crumb:hover {
  background: rgba(255, 255, 255, .15);
  transform: translateX(-2px);
}
.drawer-back-crumb::before { content: "←"; font-weight: 700; }


/* ══════════════════════════════════════════════════════════════
   6 · FB-DRAWER · novo padrão (SPA v2)
   Estrutura limpa, com header + KPI strip opcional + tabs opcionais.
   Pode ser nested (até 4 níveis) graças ao DrawerStack.
   ══════════════════════════════════════════════════════════════ */
.fb-drawer {
  position: fixed; inset: 0;
  z-index: var(--z-drawer);
  display: none;
}
.fb-drawer.is-open { display: block; }

.fb-drawer__overlay {
  position: absolute; inset: 0;
  background: rgba(15, 32, 32, .45);
}

.fb-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(880px, 92vw);
  background: var(--bg);
  box-shadow: -8px 0 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column;
}
/* Variante "wide" — drawer mais largo (drill-downs com tabela densa) */
.fb-drawer--wide .fb-drawer__panel { width: min(1080px, 95vw); }
/* Variante "narrow" — drawer pra detalhe simples (form ou view) */
.fb-drawer--narrow .fb-drawer__panel { width: min(520px, 92vw); }

.fb-drawer__header {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5957 100%);
  color: #fff;
  padding: 22px 28px 18px;
  flex-shrink: 0;
}
.fb-drawer__header .eyebrow {
  font-size: 11px; color: #a7c4c3;
  letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 6px;
}
.fb-drawer__header h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  margin: 0; line-height: 1.2; color: #fff;
}
.fb-drawer__header .meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: #c8dbda;
  margin-top: 8px;
}
.fb-drawer__header .meta b { color: #fff; font-weight: 600; }

.fb-drawer__close {
  position: absolute; top: 14px; right: 16px;
  background: rgba(255, 255, 255, .12);
  color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.fb-drawer__close:hover { background: rgba(255, 255, 255, .22); }

/* KPI strip dentro do drawer (após header) */
.fb-drawer__kpis {
  background: #fff;
  border-bottom: 1px solid var(--borda);
  padding: 14px 28px;
  flex-shrink: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
}
.fb-drawer__kpis .kp { display: flex; flex-direction: column; }
.fb-drawer__kpis .kp .v {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--primary); line-height: 1;
}
.fb-drawer__kpis .kp .v.warn { color: var(--warn); }
.fb-drawer__kpis .kp .v.crit { color: var(--crit); }
.fb-drawer__kpis .kp .v.ok   { color: var(--accent); }
.fb-drawer__kpis .kp .l {
  font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; color: var(--sub);
  font-weight: 600; margin-top: 4px;
}

/* Tabs dentro do drawer (após KPI strip) */
.fb-drawer__tabs {
  background: #fff;
  border-bottom: 1px solid var(--borda);
  padding: 0 28px;
  flex-shrink: 0;
  display: flex; gap: 0;
  overflow-x: auto;
}
.fb-drawer__tab {
  background: transparent; border: none;
  color: var(--sub);
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  letter-spacing: .3px;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.fb-drawer__tab:hover { color: var(--primary); }
.fb-drawer__tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.fb-drawer__tab .cnt {
  margin-left: 6px;
  background: var(--bg);
  color: var(--sub);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 700;
}
.fb-drawer__tab.is-active .cnt {
  background: var(--accent); color: #fff;
}

.fb-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 28px;
}


/* ══════════════════════════════════════════════════════════════
   7 · MODAL · backdrop blur + entrada smooth
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity .25s var(--ease-soft);
}
.modal-overlay.show .modal {
  animation: fbModalIn .28s var(--ease-out);
}
@keyframes fbModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ══════════════════════════════════════════════════════════════
   8 · BOTÕES · feedback de press + focus ring
   ══════════════════════════════════════════════════════════════ */
button {
  transition:
    transform   .12s var(--ease-out),
    box-shadow  .18s var(--ease-soft),
    background  .18s var(--ease-soft),
    color       .18s var(--ease-soft),
    border-color .18s var(--ease-soft);
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
.sidebar__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-radius: var(--radius-sm);
}


/* ══════════════════════════════════════════════════════════════
   9 · SCROLLBAR REFINADA
   ══════════════════════════════════════════════════════════════ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 29, 84, .25) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(56, 29, 84, .2);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  transition: background .2s var(--ease-soft);
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 29, 84, .45);
  background-clip: padding-box;
}


/* ══════════════════════════════════════════════════════════════
   10 · TOAST · refinamento sutil
   ══════════════════════════════════════════════════════════════ */
.toast-stack, #toasts { z-index: var(--z-toast); }
.toast {
  box-shadow: var(--shadow-md);
  animation: fbToastIn .35s var(--ease-out);
}
@keyframes fbToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ══════════════════════════════════════════════════════════════
   11 · SKELETON LOADING · shimmer
   Padrão único que substitui spinner em loadings demorados.
   ══════════════════════════════════════════════════════════════ */
.skeleton, .fb-skeleton {
  background: linear-gradient(90deg, var(--neutral-bg) 0%, #f9fafb 50%, var(--neutral-bg) 100%);
  background-size: 200% 100%;
  animation: fbShimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  pointer-events: none;
}
@keyframes fbShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Skeleton-table genérico (usado em loadings de listas) */
.fb-skel-table {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.fb-skel-row {
  display: grid;
  grid-template-columns: 100px 130px 1fr 120px 120px 100px 90px;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--borda-soft);
  opacity: 0;
  animation: fbFadeUp .35s var(--ease-out) forwards;
}
.fb-skel-row .skeleton, .fb-skel-row .fb-skeleton { height: 13px; border-radius: 4px; }
.fb-skel-row:nth-child(1) { animation-delay: 0ms; }
.fb-skel-row:nth-child(2) { animation-delay: 30ms; }
.fb-skel-row:nth-child(3) { animation-delay: 60ms; }
.fb-skel-row:nth-child(4) { animation-delay: 90ms; }
.fb-skel-row:nth-child(5) { animation-delay: 120ms; }
.fb-skel-row:nth-child(6) { animation-delay: 150ms; }
.fb-skel-row:nth-child(7) { animation-delay: 180ms; }
.fb-skel-row:nth-child(8) { animation-delay: 210ms; opacity: .85; }
.fb-skel-row:nth-child(9) { animation-delay: 240ms; opacity: .7; }
.fb-skel-row:nth-child(10){ animation-delay: 270ms; opacity: .55; }


/* ══════════════════════════════════════════════════════════════
   12 · PROGRESS BAR · barra de carregamento real (não fake)
   ══════════════════════════════════════════════════════════════ */
.fb-progress {
  display: flex; flex-direction: column; gap: 4px;
}
.fb-progress__bar {
  height: 6px;
  background: var(--borda-soft);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.fb-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 99px;
  width: 0%;
  transition: width .25s var(--ease-out);
  position: relative;
}
.fb-progress__fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  animation: fbProgShine 1.6s linear infinite;
}
@keyframes fbProgShine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.fb-progress__meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--sub);
  font-variant-numeric: tabular-nums;
}
.fb-progress__meta b { color: var(--txt); font-weight: 700; }


/* ══════════════════════════════════════════════════════════════
   13 · TABELAS · zebra sutil + linha clicável com indicador
   ══════════════════════════════════════════════════════════════ */
.data-tbl tbody tr.row-clickable,
.data-tbl tbody tr.linha-clicavel {
  cursor: pointer;
  transition: background .12s var(--ease-soft), box-shadow .12s var(--ease-soft);
}
.data-tbl tbody tr.row-clickable:hover,
.data-tbl tbody tr.linha-clicavel:hover {
  box-shadow: inset 3px 0 0 var(--accent);
  background: var(--bg);
}


/* ══════════════════════════════════════════════════════════════
   14 · HERO (cabeçalho de cliente/dashboard) · glow ambiente
   ══════════════════════════════════════════════════════════════ */
.dash-hero,
.cli-hero {
  position: relative;
  overflow: hidden;
}
.dash-hero > *,
.cli-hero > * { position: relative; z-index: 1; }
.dash-hero::before,
.cli-hero::before {
  content: '';
  position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}


/* ══════════════════════════════════════════════════════════════
   15 · LOADING SPINNER REFINADO
   ══════════════════════════════════════════════════════════════ */
.loading-spin,
.ui-loader__spin {
  animation-timing-function: linear !important;
}


/* ══════════════════════════════════════════════════════════════
   16 · UTILITÁRIOS NOVOS
   ══════════════════════════════════════════════════════════════ */
.fb-tabular { font-variant-numeric: tabular-nums; }
.fb-mono    { font-family: var(--font-mono); font-size: 12px; }
.fb-eyebrow {
  font-size: 11px; font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* Badges semânticas (alinha .badge--ok/--warn/--err já existentes) */
.fb-badge,
.bdg {
  display: inline-flex;
  align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--sub);
  font-variant-numeric: tabular-nums;
}
.fb-badge--ok,   .bdg.ok   { background: var(--ok-bg);   color: var(--ok); }
.fb-badge--warn, .bdg.warn { background: var(--warn-bg); color: var(--warn); }
.fb-badge--crit, .bdg.crit, .bdg.err { background: var(--crit-bg); color: var(--crit); }
.fb-badge--info, .bdg.info { background: var(--info-bg); color: var(--info); }


/* ══════════════════════════════════════════════════════════════
   FIM · FB DESIGN SYSTEM v4.0
   ══════════════════════════════════════════════════════════════ */
