/* ==========================================================================
   FinderPro · sistema visual da área interna (fp-app.css)
   Carregado POR ÚLTIMO nas bases. Manual vivo: /admin/design · Guia: SISTEMA.md
   Prefixo do sistema: fx- (classes) e --fx- (tokens). O prefixo fp- é LEGADO
   (prisma.css, fp-polish.css...) e não deve ser usado em tela nova.
   Índice: 1 tokens · 2 base · 3 casca · 4 menu · 5 componentes · 6 utilitários
           7 flutuantes · 8 compatibilidade com telas antigas · 9 responsivo
   ========================================================================== */

/* 1. TOKENS --------------------------------------------------------------- */
:root {
  /* letra: 2 famílias */
  --fx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fx-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  /* escala fechada: tamanho / altura de linha */
  --fx-fs-12: 12px; --fx-lh-12: 16px;   /* rótulo */
  --fx-fs-13: 13px; --fx-lh-13: 20px;   /* apoio */
  --fx-fs-14: 14px; --fx-lh-14: 20px;   /* corpo */
  --fx-fs-16: 16px; --fx-lh-16: 24px;   /* título de seção */
  --fx-fs-20: 20px; --fx-lh-20: 28px;
  --fx-fs-24: 24px; --fx-lh-24: 32px;   /* título de página, KPI */
  --fx-fs-30: 30px; --fx-lh-30: 36px;   /* KPI de destaque */
  /* espaço: grade de 4 */
  --fx-1: 4px; --fx-2: 8px; --fx-3: 12px; --fx-4: 16px; --fx-5: 20px;
  --fx-6: 24px; --fx-8: 32px; --fx-10: 40px; --fx-12: 48px;
  /* raio: escala fechada (card e ctl são os nomes de uso; sm/lg/pill para o resto) */
  --fx-r-sm: 4px; --fx-r-ctl: 6px; --fx-r-card: 10px; --fx-r-lg: 14px; --fx-r-pill: 999px;
  /* medidas da casca */
  --fx-side-w: 232px; --fx-side-w-min: 56px; --fx-top-h: 52px; --fx-content-max: 1560px;
  --fx-ctl-h: 36px; --fx-ctl-h-sm: 28px; --fx-ctl-h-lg: 44px; --fx-row-h: 40px;
  /* movimento: 3 durações + 2 curvas; reduced-motion zera as durações (fim do arquivo) */
  --fx-dur-fast: 90ms; --fx-dur: 140ms; --fx-dur-slow: 260ms;
  --fx-ease: cubic-bezier(.2, .8, .2, 1);          /* saída: entra rápido, assenta devagar */
  --fx-ease-inout: cubic-bezier(.65, 0, .35, 1);   /* troca de estado no mesmo lugar */
  /* camadas (z-index) */
  --fx-z-sticky: 50; --fx-z-side: 60; --fx-z-pop: 80; --fx-z-modal: 100; --fx-z-toast: 120;

  /* cor · tema escuro (padrão) */
  --fx-bg: #0A101C;            /* fundo único de todas as telas */
  --fx-side: #070C16;          /* menu lateral: uma camada abaixo do fundo */
  --fx-surface: #111A2B;       /* cartão, tabela */
  --fx-surface-2: #172236;     /* cabeçalho de tabela, hover, campo */
  --fx-surface-3: #1F2C44;     /* pressionado, selecionado */
  --fx-border: #223049;
  --fx-border-strong: #33435F;
  --fx-border-field: #5C6C89;  /* contorno de campo: 3:1 contra a superfície (WCAG 1.4.11) */
  --fx-text-strong: #F2F5FA;
  --fx-text: #C7D0DE;
  --fx-text-muted: #8F9CB2;
  --fx-brand: #2F6FEB;         /* ação primária (fundo com texto branco) */
  --fx-brand-hover: #2862D6;
  --fx-on-brand: #FFFFFF;
  --fx-link: #8AB4FF;          /* link e destaque de marca em texto */
  --fx-focus: #6AA2FF;
  --fx-ok: #3DD68C; --fx-warn: #F2B84B; --fx-danger: #FF8080; --fx-info: #8AB4FF; --fx-neutral: #A3AEC2;
  --fx-danger-solid: #C93636; --fx-danger-solid-hover: #B02C2C;
  --fx-tint: 14%;              /* força do fundo dos selos e avisos */
  --fx-shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  /* elevação: 0 plano · 1 cartão em repouso · 2 cartão em foco/arrasto · 3 = pop (menu, popover, modal) */
  --fx-elev-0: none;
  --fx-elev-1: 0 1px 2px rgba(0, 0, 0, .28);
  --fx-elev-2: 0 6px 16px -6px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3);
  --fx-elev-3: var(--fx-shadow-pop);
  --fx-backdrop: rgba(3, 6, 12, .66);

  /* ENTIDADE (grafo, dossiê, busca): cor de traço/ícone/selo. >= 3:1 sobre --fx-surface nos 2 temas.
     Nunca sozinha: sempre com ícone ou rótulo (WCAG 1.4.1). Ver docs/titan/tokens.md */
  --fx-ent-pessoa: #7CC4FA;    /* pessoa física */
  --fx-ent-empresa: #C9B6FF;   /* pessoa jurídica */
  --fx-ent-processo: #F5A3C7;  /* processo judicial / RJ / falência */
  --fx-ent-endereco: #94E2D5;
  --fx-ent-contato: #F9E2AF;   /* telefone, e-mail */
  --fx-ent-veiculo: #E0B077;
  --fx-ent-imovel: #B8D99A;
  --fx-ent-orgao: #A9B8D0;     /* órgão público, tribunal, cartório */
  --fx-ent-raiz: #E0F5AF;      /* alvo da investigação (nó central) */
  /* CLASSE DE EVIDÊNCIA (i360_evidence.CLASSES): cor + traço. O traço carrega a classe sem cor (daltonismo, impressão). */
  --fx-ev-documentado: #3DD68C; --fx-ev-documentado-dash: none;  /* registro oficial com proveniência */
  --fx-ev-provavel: #F2B84B;    --fx-ev-provavel-dash: 6 4;      /* correspondência forte sem selo */
  --fx-ev-hipotese: #C59BFF;    --fx-ev-hipotese-dash: 2 4;      /* hipótese do analista ou do Fred */
  --fx-ev-lacuna: #8F9CB2;      --fx-ev-lacuna-dash: 1 6;        /* fonte consultada sem dado: mostrar, nunca esconder */
  color-scheme: dark;
}

/* tema claro: só em tela já migrada (as telas antigas só existem em escuro) */
html[data-theme="light"]:has(body.fx-app:not(.fx-legado)) {
  --fx-bg: #F4F6F9; --fx-side: #EBEEF3; --fx-surface: #FFFFFF; --fx-surface-2: #F1F4F8; --fx-surface-3: #E6EAF1;
  --fx-border: #DCE2EB; --fx-border-strong: #C3CCD9; --fx-border-field: #8491A6;
  --fx-text-strong: #0E1A2B; --fx-text: #344256; --fx-text-muted: #5A6880;
  --fx-brand: #1F5FD8; --fx-brand-hover: #194FB8; --fx-link: #1A56C4; --fx-focus: #1F5FD8;
  --fx-ok: #0B7548; --fx-warn: #8A5600; --fx-danger: #BE2A2A; --fx-info: #1A56C4; --fx-neutral: #56637A;
  --fx-tint: 10%;
  --fx-shadow-pop: 0 12px 32px -10px rgba(15, 27, 45, .22), 0 2px 6px rgba(15, 27, 45, .08);
  --fx-elev-1: 0 1px 2px rgba(15, 27, 45, .08); --fx-elev-2: 0 6px 16px -6px rgba(15, 27, 45, .18), 0 1px 3px rgba(15, 27, 45, .08);
  --fx-backdrop: rgba(15, 27, 45, .42);
  --fx-ent-pessoa: #1D6FA5; --fx-ent-empresa: #6B4FC8; --fx-ent-processo: #B0306E; --fx-ent-endereco: #127566;
  --fx-ent-contato: #8A6200; --fx-ent-veiculo: #8A5A1C; --fx-ent-imovel: #4F6B2A; --fx-ent-orgao: #56637A; --fx-ent-raiz: #4E6B00;
  --fx-ev-documentado: #0B7548; --fx-ev-provavel: #8A5600; --fx-ev-hipotese: #7A3FC4; --fx-ev-lacuna: #5A6880;
  color-scheme: light;
}

/* 1b. ALIASES DOS PREFIXOS LEGADOS ----------------------------------------
   Fonte única: --fx-*. Os prefixos antigos (--fp, --hex, --ds, --rv, --color, --c, --studio) apontam para cá.
   :where(:root) tem especificidade zero: qualquer folha que ainda DEFINA a variável (tela legada, cor do cliente)
   continua valendo; onde ela não existe (tela migrada lendo nome antigo), cai no token fx. Não criar nome novo aqui. */
:where(:root) {
  /* cor de fundo e superfície */
  --fp-bg-0: var(--fx-bg); --fp-bg-1: var(--fx-surface); --fp-bg-2: var(--fx-surface-2); --fp-bg-3: var(--fx-surface-3); --fp-bg-inset: var(--fx-side);
  --hex-bg-primary: var(--fx-bg); --hex-bg-secondary: var(--fx-surface); --hex-bg-tertiary: var(--fx-surface-2);
  --ds-bg: var(--fx-bg); --ds-bg-1: var(--fx-surface); --ds-bg-2: var(--fx-surface); --ds-bg-3: var(--fx-surface-2);
  --rv-void: var(--fx-bg); --rv-obsidian: var(--fx-surface);
  --c-bg: var(--fx-bg); --c-surface: var(--fx-surface); --color-bg: var(--fx-bg); --color-surface: var(--fx-surface);
  /* texto */
  --fp-text: var(--fx-text); --fp-text-2: var(--fx-text); --fp-text-muted: var(--fx-text-muted); --fp-text-inv: var(--fx-on-brand);
  --hex-text-primary: var(--fx-text-strong); --hex-text-secondary: var(--fx-text); --hex-text-muted: var(--fx-text-muted);
  --ds-text: var(--fx-text-strong); --ds-text-2: var(--fx-text); --ds-text-3: var(--fx-text-muted);
  --c-text: var(--fx-text); --c-muted: var(--fx-text-muted); --color-text: var(--fx-text); --color-text-muted: var(--fx-text-muted);
  /* borda */
  --fp-border: var(--fx-border); --fp-border-subtle: var(--fx-border); --fp-border-strong: var(--fx-border-strong);
  --hex-border: var(--fx-border); --hex-border-light: var(--fx-border);
  --ds-line: var(--fx-border); --ds-line-2: var(--fx-border-strong);
  --c-border: var(--fx-border); --color-border: var(--fx-border);
  /* marca, link e foco */
  --fp-cyan-400: var(--fx-link); --fp-brand: var(--fx-brand); --fp-focus: var(--fx-focus);
  --hex-primary: var(--fx-brand); --hex-accent: var(--fx-brand); --hex-highlight: var(--fx-link);
  --ds-brand-500: var(--fx-brand); --ds-brand-600: var(--fx-brand-hover); --ds-focus: var(--fx-focus);
  --rv-electric: var(--fx-link);
  --c-primary: var(--fx-brand); --c-accent: var(--fx-link); --color-primary: var(--fx-brand); --color-accent: var(--fx-link);
  /* estado */
  --fp-ok: var(--fx-ok); --fp-warn: var(--fx-warn); --fp-bad: var(--fx-danger); --fp-info: var(--fx-info);
  --fp-ok-bg: color-mix(in srgb, var(--fx-ok) var(--fx-tint), transparent); --fp-warn-bg: color-mix(in srgb, var(--fx-warn) var(--fx-tint), transparent);
  --fp-bad-bg: color-mix(in srgb, var(--fx-danger) var(--fx-tint), transparent); --fp-info-bg: color-mix(in srgb, var(--fx-info) var(--fx-tint), transparent);
  --ds-ok: var(--fx-ok); --ds-warn: var(--fx-warn); --ds-bad: var(--fx-danger); --ds-info: var(--fx-info);
  /* letra */
  --fp-font: var(--fx-font); --fp-display: var(--fx-font); --fp-mono: var(--fx-mono);
  --hex-font-family: var(--fx-font); --hex-font-mono: var(--fx-mono);
  --ds-font: var(--fx-font); --ds-font-display: var(--fx-font); --ds-font-mono: var(--fx-mono);
  --rv-fd: var(--fx-font); --rv-fs: var(--fx-font); --rv-fm: var(--fx-mono);
  /* raio, espaço, movimento, sombra */
  --fp-r: var(--fx-r-ctl); --fp-r-card: var(--fx-r-card); --ds-radius: var(--fx-r-ctl);
  --ds-s1: var(--fx-1); --ds-s2: var(--fx-2); --ds-s3: var(--fx-3); --ds-s4: var(--fx-4); --ds-s5: var(--fx-5); --ds-s6: var(--fx-6);
  --studio-gap: var(--fx-4); --studio-pad: var(--fx-6);
  --fp-dur: var(--fx-dur); --hex-transition: var(--fx-dur) var(--fx-ease); --rv-ease: var(--fx-ease);
  --fp-sh: var(--fx-shadow-pop);
}

/* 2. BASE ----------------------------------------------------------------- */
html body.fx-app {
  margin: 0; min-height: 100vh;
  background: var(--fx-bg) !important; color: var(--fx-text);
  font-family: var(--fx-font); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14);
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.fx-app ::selection { background: color-mix(in srgb, var(--fx-brand) 45%, transparent); color: var(--fx-text-strong); }
.fx-app { scrollbar-color: var(--fx-border-strong) transparent; scrollbar-width: thin; caret-color: var(--fx-link); }
.fx-app :focus-visible { outline: 2px solid var(--fx-focus); outline-offset: 2px; border-radius: var(--fx-r-ctl); }
.fx-app [hidden] { display: none !important; }
.fx-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fx-skip { position: fixed; left: 8px; top: -60px; z-index: 300; padding: 8px 12px; background: var(--fx-brand); color: var(--fx-on-brand); border-radius: var(--fx-r-ctl); font-weight: 600; }
.fx-skip:focus { top: 8px; }

/* texto dentro do sistema novo (tudo que estiver em .fx-scope ou em tela migrada) */
.fx-app:not(.fx-legado) .fx-content :where(h1, h2, h3, h4, p, ul, ol, dl, figure) { margin: 0; }
.fx-app:not(.fx-legado) .fx-content :where(a) { color: var(--fx-link); text-decoration: none; }
.fx-app:not(.fx-legado) .fx-content :where(a:hover) { text-decoration: underline; text-underline-offset: 3px; }
.fx-app:not(.fx-legado) .fx-content :where(strong, b) { font-weight: 600; color: var(--fx-text-strong); }
.fx-h1 { font-size: var(--fx-fs-24); line-height: var(--fx-lh-24); font-weight: 600; letter-spacing: -.015em; color: var(--fx-text-strong); text-wrap: balance; }
.fx-h2 { font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; letter-spacing: -.005em; color: var(--fx-text-strong); }
.fx-h3 { font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); font-weight: 600; color: var(--fx-text-strong); }
.fx-body { font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); }
.fx-small { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.fx-label { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 500; color: var(--fx-text-muted); }
.fx-muted { color: var(--fx-text-muted); }
.fx-strong { color: var(--fx-text-strong); font-weight: 600; }
.fx-mono, .fx-num { font-family: var(--fx-mono); font-variant-numeric: tabular-nums; font-feature-settings: normal; }
.fx-num { text-align: right; white-space: nowrap; }
.fx-nowrap { white-space: nowrap; }
.fx-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fx-app :where(.fx-icon, [class^="fx-"] > svg.lucide, [class^="fx-"] > i[data-lucide]) { width: 16px; height: 16px; flex: none; stroke-width: 1.75; }

/* 3. CASCA ---------------------------------------------------------------- */
.fx-shell { display: grid; grid-template-columns: var(--fx-side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--fx-dur) var(--fx-ease); }
/* a coluna do menu vai até o fim da página (fundo e borda); o conteúdo dela fica preso à janela */
.fx-side { background: var(--fx-side); border-right: 1px solid var(--fx-border); z-index: 60; min-width: 0; }
.fx-side__inner { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.fx-side__head { display: flex; align-items: center; gap: var(--fx-2); height: var(--fx-top-h); padding: 0 var(--fx-2) 0 var(--fx-3); border-bottom: 1px solid var(--fx-border); flex: none; }
.fx-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--fx-text-strong); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); font-weight: 600; letter-spacing: -.01em; text-decoration: none; padding: 6px 4px; border-radius: var(--fx-r-ctl); }
.fx-brand img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; flex: none; }
.fx-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-side__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: var(--fx-3) var(--fx-2); overscroll-behavior: contain; }
.fx-side__foot { flex: none; border-top: 1px solid var(--fx-border); padding: var(--fx-2); display: grid; gap: 2px; }
.fx-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.fx-topbar { position: sticky; top: 0; z-index: 50; height: var(--fx-top-h); flex: none; display: flex; align-items: center; gap: var(--fx-3); padding: 0 var(--fx-6); background: color-mix(in srgb, var(--fx-bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--fx-border); }
.fx-topbar__left { display: flex; align-items: center; gap: var(--fx-2); min-width: 0; flex: 1; }
.fx-topbar__right { display: flex; align-items: center; gap: var(--fx-1); flex: none; }
.fx-topbar__menu { display: none; }
.fx-content { width: 100%; max-width: var(--fx-content-max); margin-inline: auto; padding: var(--fx-6) var(--fx-6) 96px; flex: 1; min-width: 0; }
.fx-banner { display: flex; align-items: center; gap: var(--fx-3); flex-wrap: wrap; padding: 10px var(--fx-6); border-bottom: 1px solid var(--fx-border); background: color-mix(in srgb, var(--fx-tone, var(--fx-info)) var(--fx-tint), var(--fx-bg)); color: var(--fx-text-strong); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.fx-banner > :first-child { flex: 1; min-width: 200px; }
.fx-flashes { display: grid; gap: var(--fx-2); padding: var(--fx-4) var(--fx-6) 0; width: 100%; max-width: var(--fx-content-max); margin-inline: auto; }
.fx-flashes:empty { display: none; }

details.fx-banner { display: block; }
details.fx-banner > summary { display: flex; align-items: center; gap: var(--fx-3); flex-wrap: wrap; cursor: pointer; list-style: none; }
details.fx-banner > summary::-webkit-details-marker { display: none; }
details.fx-banner > summary > :first-child { flex: 1; min-width: 200px; }
details.fx-banner > summary u { color: var(--fx-link); text-decoration: none; font-weight: 600; }
.fx-banner__list { list-style: none; margin: var(--fx-2) 0 0; padding: 0; display: grid; }
.fx-banner__list li { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); flex-wrap: wrap; padding: var(--fx-2) 0; border-top: 1px solid var(--fx-border); }
.fx-banner__list small { display: block; font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }

/* trilha (na barra superior e no cabeçalho de página) */
.fx-trail { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); list-style: none; margin: 0; padding: 0; }
.fx-trail > * { white-space: nowrap; }
.fx-trail a { color: var(--fx-text-muted) !important; text-decoration: none; border-radius: 4px; }
.fx-trail a:hover { color: var(--fx-text-strong) !important; text-decoration: none; }
.fx-trail > * + *::before { content: "/"; margin-right: 6px; color: var(--fx-border-strong); }
.fx-trail > :last-child { color: var(--fx-text-strong); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* 4. MENU LATERAL --------------------------------------------------------- */
.fx-nav { display: grid; gap: 2px; }
.fx-nav + .fx-nav, .fx-nav + .fx-nav-group { margin-top: var(--fx-3); }
.fx-nav-group + .fx-nav-group { margin-top: 2px; }
.fx-nav-link, .fx-nav-group > summary { position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 6px 10px; border-radius: var(--fx-r-ctl); color: var(--fx-text); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 500; text-decoration: none; cursor: pointer; user-select: none; transition: background var(--fx-dur) var(--fx-ease), color var(--fx-dur) var(--fx-ease); }
.fx-nav-link > span:first-of-type, .fx-nav-group > summary > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-nav-link svg, .fx-nav-link i, .fx-nav-group > summary svg, .fx-nav-group > summary i { width: 16px; height: 16px; flex: none; color: var(--fx-text-muted); stroke-width: 1.75; }
.fx-nav-link:hover, .fx-nav-group > summary:hover { background: var(--fx-surface-2); color: var(--fx-text-strong); }
.fx-nav-link[aria-current="page"] { background: var(--fx-surface-3); color: var(--fx-text-strong); font-weight: 600; }
.fx-nav-link[aria-current="page"] svg { color: var(--fx-link); }
.fx-nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--fx-brand); }
.fx-nav-group > summary { list-style: none; color: var(--fx-text-muted); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; min-height: 28px; }
.fx-nav-group > summary::-webkit-details-marker { display: none; }
.fx-nav-group > summary > svg:first-child, .fx-nav-group > summary > i:first-child { display: none; } /* ícone do grupo só aparece no menu recolhido */
.fx-nav-group > summary::after { content: ""; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--fx-dur) var(--fx-ease); flex: none; }
.fx-nav-group[open] > summary::after { transform: rotate(45deg); }
.fx-nav-group__items { display: grid; gap: 2px; margin-top: 2px; }
.fx-nav-count { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fx-danger-solid); color: #fff; font-size: var(--fx-fs-12); line-height: 18px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.fx-side-user { display: flex; align-items: center; gap: var(--fx-2); padding: 6px 4px 6px 10px; min-width: 0; }
.fx-side-user__id { flex: 1; min-width: 0; }
.fx-side-user__name { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 600; color: var(--fx-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-side-user__meta { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* menu recolhido (só desktop) */
@media (min-width: 901px) {
  html.fx-nav-min .fx-shell { grid-template-columns: var(--fx-side-w-min) minmax(0, 1fr); }
  html.fx-nav-min .fx-side__head { padding: 0; justify-content: center; }
  html.fx-nav-min .fx-brand, html.fx-nav-min .fx-side-user__id, html.fx-nav-min .fx-nav-count,
  html.fx-nav-min .fx-nav-link > span, html.fx-nav-min .fx-nav-group > summary > span, html.fx-nav-min .fx-nav-group > summary::after { display: none; }
  html.fx-nav-min .fx-nav-link, html.fx-nav-min .fx-nav-group > summary { justify-content: center; padding: 6px; }
  html.fx-nav-min .fx-nav-group > summary > svg:first-child, html.fx-nav-min .fx-nav-group > summary > i:first-child { display: block; }
  html.fx-nav-min .fx-nav-group:not([open]) > summary { color: var(--fx-text); }
  html.fx-nav-min .fx-nav-group[open] > summary { display: none; }
  html.fx-nav-min .fx-nav-group[open] { border-top: 1px solid var(--fx-border); padding-top: var(--fx-2); }
  html.fx-nav-min .fx-side-user { padding: 0; justify-content: center; }
  html.fx-nav-min .fx-nav-link[aria-current="page"]::before { left: -8px; }
}

/* 5. COMPONENTES ---------------------------------------------------------- */
/* 5.1 cabeçalho de página */
.fx-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fx-4) var(--fx-6); flex-wrap: wrap; margin-bottom: var(--fx-6); }
.fx-page-header__main { min-width: 0; flex: 1 1 320px; }
.fx-page-header__title { display: flex; align-items: center; gap: var(--fx-3); flex-wrap: wrap; }
.fx-page-header__desc { margin-top: var(--fx-1) !important; font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text-muted); max-width: 75ch; }
.fx-page-header__actions { display: flex; align-items: center; gap: var(--fx-2); flex-wrap: wrap; }
.fx-page-header .fx-trail { margin-bottom: var(--fx-2); }

/* 5.2 botão: 4 variantes × 3 tamanhos */
.fx-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--fx-2); height: var(--fx-ctl-h); padding: 0 var(--fx-3); border: 1px solid transparent; border-radius: var(--fx-r-ctl); background: transparent; color: var(--fx-text-strong); font-family: var(--fx-font); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 600; white-space: nowrap; text-decoration: none !important; cursor: pointer; user-select: none; transition: background var(--fx-dur) var(--fx-ease), border-color var(--fx-dur) var(--fx-ease), color var(--fx-dur) var(--fx-ease); }
.fx-btn svg, .fx-btn i { width: 16px; height: 16px; flex: none; stroke-width: 1.75; }
.fx-btn--primary { background: var(--fx-brand); color: var(--fx-on-brand) !important; }
.fx-btn--primary:hover { background: var(--fx-brand-hover); }
.fx-btn--secondary { background: var(--fx-surface-2); border-color: var(--fx-border-strong); color: var(--fx-text-strong) !important; }
.fx-btn--secondary:hover { background: var(--fx-surface-3); }
.fx-btn--ghost { color: var(--fx-text) !important; }
.fx-btn--ghost:hover { background: var(--fx-surface-2); color: var(--fx-text-strong) !important; }
.fx-btn--danger { background: var(--fx-danger-solid); color: #fff !important; }
.fx-btn--danger:hover { background: var(--fx-danger-solid-hover); }
.fx-btn--sm { height: var(--fx-ctl-h-sm); padding: 0 10px; font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); gap: 6px; }
.fx-btn--sm svg, .fx-btn--sm i { width: 14px; height: 14px; }
.fx-btn--lg { height: var(--fx-ctl-h-lg); padding: 0 var(--fx-5); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); }
.fx-btn--icon { width: var(--fx-ctl-h); padding: 0; }
.fx-btn--icon.fx-btn--sm { width: var(--fx-ctl-h-sm); }
.fx-btn--block { width: 100%; }
.fx-btn--fixed { min-width: 104px; justify-content: flex-start; } /* ação de linha que troca de rótulo (Ativar/Desativar): mantém a coluna alinhada */
.fx-btn:active:not(:disabled) { transform: translateY(1px); }
.fx-btn:disabled, .fx-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.fx-btn[aria-busy="true"] { pointer-events: none; color: transparent !important; position: relative; }
.fx-btn[aria-busy="true"]::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--fx-text-strong); border-right-color: transparent; animation: fx-spin .7s linear infinite; }
.fx-btn--primary[aria-busy="true"]::after, .fx-btn--danger[aria-busy="true"]::after { border-color: #fff; border-right-color: transparent; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--fx-border-strong); border-radius: 4px; font-family: var(--fx-mono); font-size: var(--fx-fs-12); line-height: 1; color: var(--fx-text-muted); background: var(--fx-surface); }

/* 5.3 campo, seletor, checkbox, switch */
.fx-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.fx-field__label { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 500; color: var(--fx-text-strong); }
.fx-field__label em { font-style: normal; color: var(--fx-danger); }
.fx-field__hint { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-field__error { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-danger); font-weight: 500; }
.fx-input, .fx-select, .fx-textarea { width: 100%; height: var(--fx-ctl-h); padding: 0 var(--fx-3); border: 1px solid var(--fx-border-field) !important; border-radius: var(--fx-r-ctl) !important; background: var(--fx-surface) !important; color: var(--fx-text-strong) !important; font-family: var(--fx-font) !important; font-size: var(--fx-fs-14) !important; line-height: var(--fx-lh-14); box-shadow: none !important; transition: border-color var(--fx-dur) var(--fx-ease); appearance: none; }
.fx-textarea { height: auto; min-height: 88px; padding: var(--fx-2) var(--fx-3); resize: vertical; }
.fx-input::placeholder, .fx-textarea::placeholder { color: var(--fx-text-muted) !important; opacity: 1; }
.fx-input:hover, .fx-select:hover, .fx-textarea:hover { border-color: var(--fx-text-muted) !important; }
.fx-input:focus, .fx-select:focus, .fx-textarea:focus { outline: 2px solid var(--fx-focus); outline-offset: 0; border-color: var(--fx-focus) !important; }
.fx-input:disabled, .fx-select:disabled, .fx-textarea:disabled { opacity: .55; cursor: not-allowed; }
.fx-input[aria-invalid="true"], .fx-select[aria-invalid="true"], .fx-textarea[aria-invalid="true"] { border-color: var(--fx-danger) !important; }
.fx-select { padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238F9CB2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; }
.fx-select option { background: var(--fx-surface); color: var(--fx-text-strong); }
.fx-input--sm, .fx-select--sm { height: var(--fx-ctl-h-sm); font-size: var(--fx-fs-13) !important; padding-inline: 10px; }
.fx-input-wrap { position: relative; display: block; }
.fx-input-wrap > svg, .fx-input-wrap > i { position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--fx-text-muted); pointer-events: none; }
.fx-input-wrap > .fx-input { padding-left: 34px; }
.fx-check { display: inline-flex; align-items: flex-start; gap: var(--fx-2); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text); cursor: pointer; }
.fx-check input { appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--fx-border-field); border-radius: 4px; background: var(--fx-surface); cursor: pointer; display: grid; place-content: center; transition: background var(--fx-dur) var(--fx-ease), border-color var(--fx-dur) var(--fx-ease); }
.fx-check input[type="radio"] { border-radius: 50%; }
.fx-check input:checked { background: var(--fx-brand); border-color: var(--fx-brand); }
.fx-check input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.fx-check input[type="radio"]:checked::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.fx-switch { display: inline-flex; align-items: center; gap: var(--fx-2); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text); cursor: pointer; }
.fx-switch input { appearance: none; flex: none; position: relative; width: 32px; height: 18px; margin: 0; border-radius: 9px; background: var(--fx-border-field); cursor: pointer; transition: background var(--fx-dur) var(--fx-ease); }
.fx-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform var(--fx-dur) var(--fx-ease); }
.fx-switch input:checked { background: var(--fx-brand); }
.fx-switch input:checked::after { transform: translateX(14px); }
.fx-check input:disabled, .fx-switch input:disabled { opacity: .5; cursor: not-allowed; }
.fx-form { display: grid; gap: var(--fx-4); }
.fx-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--fx-4); }
.fx-form-actions { display: flex; justify-content: flex-end; gap: var(--fx-2); flex-wrap: wrap; }

/* 5.4 cartão e cartão de KPI */
.fx-card { background: var(--fx-surface); border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); min-width: 0; }
.fx-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); flex-wrap: wrap; min-height: 52px; padding: var(--fx-3) var(--fx-4); border-bottom: 1px solid var(--fx-border); }
.fx-card__head > div:first-child { min-width: 0; }
.fx-card__title { font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; letter-spacing: -.005em; color: var(--fx-text-strong); margin: 0; }
.fx-card__sub, .fx-page-header__desc, .fx-alert__body { overflow-wrap: anywhere; }  /* texto sem espaco (lista de colunas, URL) nao alarga a tela */
.fx-card__sub { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); margin: 0; }
.fx-card__actions { display: flex; align-items: center; gap: var(--fx-2); flex-wrap: wrap; }
.fx-card__body { padding: var(--fx-4); }
.fx-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); flex-wrap: wrap; padding: var(--fx-3) var(--fx-4); border-top: 1px solid var(--fx-border); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); }
.fx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--fx-4); }
.fx-kpi { display: grid; gap: var(--fx-1); align-content: start; padding: var(--fx-4); background: var(--fx-surface); border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); min-width: 0; }
.fx-kpi__label { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 500; color: var(--fx-text-muted); }
.fx-kpi__value { font-size: var(--fx-fs-24); line-height: var(--fx-lh-24); font-weight: 600; letter-spacing: -.02em; color: var(--fx-text-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fx-kpi--lg .fx-kpi__value { font-size: var(--fx-fs-30); line-height: var(--fx-lh-30); }
.fx-kpi__hint { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-kpi__src { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); border-top: 1px dashed var(--fx-border); padding-top: var(--fx-1); margin-top: auto; }
.fx-kpi__delta { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-kpi__delta[data-tone="ok"], .fx-kpi__value[data-tone="ok"] { color: var(--fx-ok); }
.fx-kpi__delta[data-tone="danger"], .fx-kpi__value[data-tone="danger"] { color: var(--fx-danger); }
.fx-kpi__delta[data-tone="warn"], .fx-kpi__value[data-tone="warn"] { color: var(--fx-warn); }
.fx-kpi__row > .fx-kpi__value:not(:only-child) { flex: none; }
.fx-kpi__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--fx-3); min-width: 0; }
.fx-kpi__spark { display: block; flex: 1 1 0; max-width: 96px; min-width: 0; height: 28px; margin-bottom: 2px; overflow: visible; }
.fx-kpi__spark path { fill: none; stroke: var(--fx-link); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.fx-kpi__spark path.fx-area { stroke: none; fill: color-mix(in srgb, var(--fx-link) 12%, transparent); }

/* 5.5 tabela de dados */
.fx-table-wrap { background: var(--fx-surface); border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); min-width: 0; }
.fx-card > .fx-table-wrap { border: 0; border-radius: 0; background: none; }
.fx-table-scroll { overflow-x: auto; }
.fx-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text); }
.fx-table th { position: sticky; top: var(--fx-top-h); z-index: 2; height: 36px; padding: 0 var(--fx-3); background: var(--fx-surface-2) !important; border-bottom: 1px solid var(--fx-border); color: var(--fx-text-muted) !important; font-family: var(--fx-font) !important; font-size: var(--fx-fs-12) !important; line-height: var(--fx-lh-12); font-weight: 600 !important; text-align: left; white-space: nowrap; letter-spacing: 0 !important; text-transform: none !important; }
.fx-table-scroll .fx-table th, .fx-modal .fx-table th { top: 0; }
.fx-table-wrap > .fx-table thead tr:first-child th:first-child, .fx-table-wrap > .fx-table-scroll:first-child th:first-child { border-top-left-radius: calc(var(--fx-r-card) - 1px); }
.fx-table-wrap > .fx-table thead tr:first-child th:last-child, .fx-table-wrap > .fx-table-scroll:first-child th:last-child { border-top-right-radius: calc(var(--fx-r-card) - 1px); }
.fx-table td { height: var(--fx-row-h); padding: 6px var(--fx-3); border-bottom: 1px solid var(--fx-border); vertical-align: middle; background: transparent; }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-table tbody tr:hover td { background: color-mix(in srgb, var(--fx-surface-2) 60%, transparent); }
.fx-table tbody tr[aria-selected="true"] td { background: color-mix(in srgb, var(--fx-brand) 12%, transparent); }
.fx-table th.fx-num, .fx-table td.fx-num { text-align: right; }
.fx-table td.fx-num { font-size: var(--fx-fs-13); color: var(--fx-text-strong); }
.fx-table .fx-col-actions { text-align: right; white-space: nowrap; width: 1%; }
.fx-table .fx-col-check { width: 36px; padding-right: 0; }
.fx-cell-main { display: block; color: var(--fx-text-strong); font-weight: 500; }
.fx-cell-main:is(a) { color: var(--fx-text-strong) !important; }
.fx-cell-main:is(a):hover { color: var(--fx-link) !important; text-decoration: none !important; }
.fx-cell-sub { display: block; font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-row-actions { display: inline-flex; align-items: center; gap: var(--fx-1); }
.fx-row-actions form { display: contents; }
.fx-th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; margin: 0; border: 0; background: none; color: inherit !important; font: inherit; cursor: pointer; text-decoration: none !important; border-radius: 4px; }
.fx-th-sort:hover { color: var(--fx-text-strong) !important; }
.fx-th-sort::after { content: ""; width: 8px; height: 10px; flex: none; opacity: .45; background: currentColor; clip-path: polygon(50% 0, 100% 40%, 0 40%, 0 60%, 100% 60%, 50% 100%, 0 60%, 0 40%); }
th[aria-sort="ascending"] .fx-th-sort, th[aria-sort="descending"] .fx-th-sort { color: var(--fx-text-strong) !important; }
th[aria-sort="ascending"] .fx-th-sort::after { opacity: 1; clip-path: polygon(50% 0, 100% 60%, 0 60%); }
th[aria-sort="descending"] .fx-th-sort::after { opacity: 1; clip-path: polygon(0 40%, 100% 40%, 50% 100%); }
.fx-th-sort[data-dir="right"] { flex-direction: row-reverse; }
.fx-table-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); flex-wrap: wrap; padding: var(--fx-2) var(--fx-3); border-top: 1px solid var(--fx-border); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); }
.fx-pagination { display: flex; align-items: center; gap: var(--fx-1); }
.fx-pagination__page { min-width: var(--fx-ctl-h-sm); height: var(--fx-ctl-h-sm); padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--fx-r-ctl); color: var(--fx-text) !important; font-size: var(--fx-fs-13); line-height: 1; font-variant-numeric: tabular-nums; text-decoration: none !important; }
.fx-pagination__page:hover { background: var(--fx-surface-2); color: var(--fx-text-strong) !important; }
.fx-pagination__page[aria-current="page"] { background: var(--fx-surface-3); color: var(--fx-text-strong) !important; font-weight: 600; }
.fx-pagination__page[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.fx-pagination__gap { color: var(--fx-text-muted); padding: 0 2px; }

/* 5.6 abas */
.fx-tabs { display: flex; gap: var(--fx-1); border-bottom: 1px solid var(--fx-border); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--fx-4); }
.fx-tab { position: relative; display: inline-flex; align-items: center; gap: var(--fx-2); height: 36px; padding: 0 var(--fx-3); border: 0; background: none; color: var(--fx-text-muted) !important; font-family: var(--fx-font); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 500; white-space: nowrap; text-decoration: none !important; cursor: pointer; border-radius: var(--fx-r-ctl) var(--fx-r-ctl) 0 0; }
.fx-tab:hover { color: var(--fx-text-strong) !important; }
.fx-tab[aria-selected="true"], .fx-tab[aria-current="page"] { color: var(--fx-text-strong) !important; font-weight: 600; }
.fx-tab[aria-selected="true"]::after, .fx-tab[aria-current="page"]::after { content: ""; position: absolute; left: var(--fx-3); right: var(--fx-3); bottom: -1px; height: 2px; background: var(--fx-brand); border-radius: 2px 2px 0 0; }
.fx-tab__count { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); padding: 0 6px; border-radius: 8px; background: var(--fx-surface-3); color: var(--fx-text); font-variant-numeric: tabular-nums; }

/* 5.7 selo de estado (um mapa só: ver macro status em components/fp/ui.html) */
.fx-badge { --fx-tone: var(--fx-neutral); display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--fx-2); border-radius: var(--fx-r-ctl); background: color-mix(in srgb, var(--fx-tone) var(--fx-tint), transparent); color: var(--fx-tone); font-family: var(--fx-font); font-size: var(--fx-fs-12); line-height: 1; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.fx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fx-badge--plain::before { display: none; }


/* 5.8 barra de filtros */
.fx-filters { display: flex; align-items: flex-end; gap: var(--fx-3); flex-wrap: wrap; margin-bottom: var(--fx-4); }
.fx-filters > .fx-field { flex: 0 1 200px; }
.fx-filters > .fx-field--grow { flex: 1 1 280px; max-width: 480px; }
.fx-filters__actions { display: flex; gap: var(--fx-2); }
.fx-filters__meta { margin-left: auto; align-self: flex-end; padding-bottom: var(--fx-2); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); }

/* 5.9 estado vazio, erro, esqueleto */
.fx-empty { display: grid; justify-items: center; gap: var(--fx-2); padding: var(--fx-10) var(--fx-6); text-align: center; }
.fx-empty > svg, .fx-empty > i { width: 24px; height: 24px; color: var(--fx-text-muted); stroke-width: 1.5; margin-bottom: var(--fx-1); }
.fx-empty__title { font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); font-weight: 600; color: var(--fx-text-strong); margin: 0; }
.fx-empty__text { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); max-width: 52ch; margin: 0; }
.fx-empty__actions { display: flex; gap: var(--fx-2); margin-top: var(--fx-2); flex-wrap: wrap; justify-content: center; }
.fx-empty--error > svg, .fx-empty--error > i { color: var(--fx-danger); }
.fx-empty--compact { padding: var(--fx-6) var(--fx-4); }
.fx-empty--denied > svg, .fx-empty--denied > i { color: var(--fx-warn); }
.fx-partial { border-style: dashed; }
.fx-partial__fontes { margin: var(--fx-1) 0 0; font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-skeleton { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--fx-surface-2) 25%, var(--fx-surface-3) 37%, var(--fx-surface-2) 63%); background-size: 400% 100%; animation: fx-shimmer 1.4s ease infinite; }
.fx-skeleton + .fx-skeleton { margin-top: var(--fx-3); }
.fx-skeleton--title { height: 20px; width: 40%; }
.fx-skeleton--row { height: var(--fx-row-h); border-radius: 0; margin: 0 !important; border-bottom: 1px solid var(--fx-border); }
@keyframes fx-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* 5.10 aviso */
.fx-alert { --fx-tone: var(--fx-info); display: flex; align-items: flex-start; gap: var(--fx-3); padding: var(--fx-3) var(--fx-4); border: 1px solid color-mix(in srgb, var(--fx-tone) 35%, var(--fx-border)); border-radius: var(--fx-r-card); background: color-mix(in srgb, var(--fx-tone) var(--fx-tint), var(--fx-surface)); color: var(--fx-text); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.fx-alert > svg, .fx-alert > i { width: 16px; height: 16px; margin-top: 2px; color: var(--fx-tone); flex: none; }
.fx-alert__body { flex: 1; min-width: 0; }
.fx-alert__title { display: block; font-weight: 600; color: var(--fx-text-strong); }
.fx-alert__actions { display: flex; gap: var(--fx-2); margin-top: var(--fx-2); }
.fx-alert__close { flex: none; width: 24px; height: 24px; margin: -2px -6px 0 0; border: 0; border-radius: 4px; background: none; color: var(--fx-text-muted); cursor: pointer; display: grid; place-content: center; }
.fx-alert__close:hover { background: color-mix(in srgb, var(--fx-tone) 18%, transparent); color: var(--fx-text-strong); }
.fx-alert__close svg { width: 14px; height: 14px; }

/* 5.11 modal (elemento <dialog>) */
dialog.fx-modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--fx-border-strong); border-radius: var(--fx-r-card); background: var(--fx-surface); color: var(--fx-text); box-shadow: var(--fx-shadow-pop); font-family: var(--fx-font); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); overflow: hidden; }
dialog.fx-modal[open] { display: flex; flex-direction: column; animation: fx-pop var(--fx-dur) var(--fx-ease); }
dialog.fx-modal--lg { width: min(720px, calc(100vw - 32px)); }
dialog.fx-modal::backdrop { background: var(--fx-backdrop); }
.fx-modal > form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.fx-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); padding: var(--fx-3) var(--fx-3) var(--fx-3) var(--fx-4); border-bottom: 1px solid var(--fx-border); }
.fx-modal__title { font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; color: var(--fx-text-strong); margin: 0; }
.fx-modal__body { padding: var(--fx-4); overflow-y: auto; display: grid; gap: var(--fx-4); }
.fx-modal__foot { display: flex; justify-content: flex-end; gap: var(--fx-2); padding: var(--fx-3) var(--fx-4); border-top: 1px solid var(--fx-border); background: var(--fx-surface); }
@keyframes fx-pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }

/* 5.12 toast */
.fx-toasts { position: fixed; z-index: 400; right: var(--fx-4); bottom: var(--fx-4); display: grid; gap: var(--fx-2); width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.fx-toast { --fx-tone: var(--fx-info); pointer-events: auto; display: flex; align-items: flex-start; gap: var(--fx-3); padding: var(--fx-3) var(--fx-3) var(--fx-3) var(--fx-4); border: 1px solid var(--fx-border-strong); border-radius: var(--fx-r-card); background: var(--fx-surface-2); color: var(--fx-text-strong); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); box-shadow: var(--fx-shadow-pop); animation: fx-pop var(--fx-dur) var(--fx-ease); }
.fx-toast::before { content: ""; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--fx-tone); flex: none; }
.fx-toast > span { flex: 1; min-width: 0; }

/* 5.13 barra de progresso */
.fx-progress { display: grid; gap: 6px; min-width: 0; }
.fx-progress__meta { display: flex; justify-content: space-between; gap: var(--fx-3); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); font-variant-numeric: tabular-nums; }
.fx-progress__meta b { color: var(--fx-text-strong); font-weight: 600; }
.fx-progress__track { height: 6px; border-radius: 3px; background: var(--fx-surface-3); overflow: hidden; }
.fx-progress__bar { display: block; height: 100%; width: calc(var(--fx-value, 0) * 1%); border-radius: 3px; background: var(--fx-tone, var(--fx-brand)); transition: width 200ms var(--fx-ease); }
.fx-progress[data-tone="ok"] { --fx-tone: var(--fx-ok); } .fx-progress[data-tone="warn"] { --fx-tone: var(--fx-warn); } .fx-progress[data-tone="danger"] { --fx-tone: var(--fx-danger); } .fx-progress[data-tone="info"] { --fx-tone: var(--fx-info); }
.fx-progress--indeterminate .fx-progress__bar { width: 35%; animation: fx-slide 1.2s ease-in-out infinite; }
@keyframes fx-slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }

/* 5.14 área de upload */
.fx-upload { position: relative; display: grid; justify-items: center; gap: var(--fx-1); padding: var(--fx-8) var(--fx-6); border: 1px dashed var(--fx-border-strong); border-radius: var(--fx-r-card); background: var(--fx-surface); text-align: center; cursor: pointer; transition: border-color var(--fx-dur) var(--fx-ease), background var(--fx-dur) var(--fx-ease); }
.fx-upload:hover, .fx-upload.is-over, .fx-upload:focus-within { border-color: var(--fx-focus); background: color-mix(in srgb, var(--fx-brand) 8%, var(--fx-surface)); }
.fx-upload input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fx-upload > svg, .fx-upload > i { width: 24px; height: 24px; color: var(--fx-text-muted); margin-bottom: var(--fx-1); }
.fx-upload__title { font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); font-weight: 600; color: var(--fx-text-strong); }
.fx-upload__title u { color: var(--fx-link); text-decoration: none; }
.fx-upload__hint { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-upload__file { font-family: var(--fx-mono); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-ok); }

/* 5.15 lista de definição (rótulo: valor) */
.fx-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--fx-4) var(--fx-6); margin: 0; }
.fx-dl > div { min-width: 0; }
.fx-dl dt { font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 500; color: var(--fx-text-muted); margin-bottom: 2px; }
.fx-dl dd { margin: 0; font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text-strong); overflow-wrap: anywhere; }
.fx-dl--rows { grid-template-columns: 1fr; gap: 0; }
.fx-dl--rows > div { display: flex; justify-content: space-between; gap: var(--fx-4); padding: 10px 0; border-bottom: 1px solid var(--fx-border); }
.fx-dl--rows > div:last-child { border-bottom: 0; }
.fx-dl--rows dt { font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); margin: 0; }
.fx-dl--rows dd { text-align: right; }

/* 5.16 busca rápida (tecla /) */
dialog.fx-cmdk { width: min(560px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; border: 1px solid var(--fx-border-strong); border-radius: var(--fx-r-card); background: var(--fx-surface); color: var(--fx-text); box-shadow: var(--fx-shadow-pop); font-family: var(--fx-font); overflow: hidden; }
dialog.fx-cmdk::backdrop { background: var(--fx-backdrop); }
.fx-cmdk__bar { display: flex; align-items: center; gap: var(--fx-2); padding: var(--fx-2) var(--fx-3); border-bottom: 1px solid var(--fx-border); }
.fx-cmdk__bar svg { width: 16px; height: 16px; color: var(--fx-text-muted); flex: none; }
.fx-cmdk__input { flex: 1; height: 36px; border: 0 !important; outline: 0 !important; background: none !important; color: var(--fx-text-strong) !important; font-family: var(--fx-font) !important; font-size: var(--fx-fs-14) !important; box-shadow: none !important; padding: 0 !important; }
.fx-cmdk__list { list-style: none; margin: 0; padding: var(--fx-2); max-height: 50vh; overflow-y: auto; }
.fx-cmdk__list a { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-3); padding: var(--fx-2) var(--fx-3); border-radius: var(--fx-r-ctl); color: var(--fx-text); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); text-decoration: none; }
.fx-cmdk__list a small { color: var(--fx-text-muted); font-size: var(--fx-fs-12); }
.fx-cmdk__list a.is-active, .fx-cmdk__list a:hover { background: var(--fx-surface-3); color: var(--fx-text-strong); }
.fx-cmdk__empty { padding: var(--fx-6); text-align: center; color: var(--fx-text-muted); font-size: var(--fx-fs-13); margin: 0; }
.fx-cmdk__list a { justify-content: flex-start; }
.fx-cmdk__list a svg { width: 15px; height: 15px; flex: none; color: var(--fx-text-muted); }
.fx-cmdk__list a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-cmdk__list a small { margin-left: auto; padding-left: var(--fx-3); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.fx-cmdk__list a.is-active svg, .fx-cmdk__list a:hover svg { color: var(--fx-link); }
.fx-cmdk__group { padding: var(--fx-3) var(--fx-3) var(--fx-1); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; color: var(--fx-text-muted); }
.fx-cmdk__group:first-child { padding-top: var(--fx-1); }
.fx-cmdk__note { padding: var(--fx-1) var(--fx-3) var(--fx-2); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-cmdk__foot { display: flex; justify-content: space-between; gap: var(--fx-3); margin: 0; padding: var(--fx-2) var(--fx-3); border-top: 1px solid var(--fx-border); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); color: var(--fx-text-muted); }
.fx-cmdk__foot .fx-kbd { min-width: 18px; height: 18px; margin-right: 2px; }
@media (max-width: 640px) { .fx-cmdk__foot > :first-child { display: none; } .fx-cmdk__list a small { display: none; } }

/* 5.16b favorito e estado das fontes (barra superior) */
.fx-fav[aria-pressed="true"] svg { color: var(--fx-warn); fill: currentColor; }
.fx-fontes { gap: 6px; }
.fx-fontes__dot { width: 8px; height: 8px; border-radius: var(--fx-r-pill); background: var(--fx-neutral); flex: none; }
.fx-fontes[data-estado="operando"] .fx-fontes__dot { background: var(--fx-ok); }
.fx-fontes[data-estado="instavel"] .fx-fontes__dot { background: var(--fx-warn); }
.fx-fontes[data-estado="fora"] .fx-fontes__dot { background: var(--fx-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-danger) 25%, transparent); }
.fx-fontes-pop { position: fixed; inset: auto; top: calc(var(--fx-top-h) + 4px); right: var(--fx-4); left: auto; margin: 0; width: min(340px, calc(100vw - 24px)); padding: var(--fx-4); border: 1px solid var(--fx-border-strong); border-radius: var(--fx-r-card); background: var(--fx-surface); color: var(--fx-text); box-shadow: var(--fx-elev-3); font-family: var(--fx-font); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.fx-fontes-pop p { margin: 0; }
.fx-fontes-pop__t { font-weight: 600; color: var(--fx-text-strong); }
.fx-fontes__resumo { margin-top: var(--fx-1) !important; color: var(--fx-text-muted); }
.fx-fontes__lista { list-style: none; margin: var(--fx-3) 0 0; padding: 0; max-height: 40vh; overflow-y: auto; border-top: 1px solid var(--fx-border); }
.fx-fontes__lista li { display: flex; justify-content: space-between; gap: var(--fx-3); padding: 6px 0; border-bottom: 1px solid var(--fx-border); }
.fx-fontes__lista small { color: var(--fx-text-muted); white-space: nowrap; }
.fx-fontes__lista li[data-estado="fora"] small { color: var(--fx-danger); }
.fx-fontes__lista li[data-estado="instavel"] small { color: var(--fx-warn); }
.fx-fontes__lista li[data-estado="operando"] small { color: var(--fx-ok); }
.fx-fontes-pop__nota { margin-top: var(--fx-3) !important; font-size: var(--fx-fs-12); color: var(--fx-text-muted); }
.fx-fontes-pop__nota a { color: var(--fx-link); }
@media (max-width: 640px) { .fx-fontes__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* tons (depois de todos os componentes que usam --fx-tone, para vencer o padrão de cada um) */
.fx-badge--ok, .fx-alert--ok, .fx-toast--ok, .fx-banner--ok { --fx-tone: var(--fx-ok); }
.fx-badge--warn, .fx-alert--warn, .fx-toast--warn, .fx-banner--warn { --fx-tone: var(--fx-warn); }
.fx-badge--danger, .fx-alert--danger, .fx-toast--danger, .fx-banner--danger { --fx-tone: var(--fx-danger); }
.fx-badge--info, .fx-alert--info, .fx-toast--info, .fx-banner--info { --fx-tone: var(--fx-info); }
.fx-badge--neutral { --fx-tone: var(--fx-neutral); }

/* 6. UTILITÁRIOS DE LAYOUT (só estes; o resto é componente) ---------------- */
.fx-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fx-6); min-width: 0; }
.fx-stack--sm { gap: var(--fx-3); } .fx-stack--md { gap: var(--fx-4); }
.fx-row { display: flex; align-items: center; gap: var(--fx-2); flex-wrap: wrap; }
.fx-row--between { justify-content: space-between; }
.fx-grid { display: grid; gap: var(--fx-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); min-width: 0; }
.fx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-grid--main-aside { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }

/* 6b. Layout de formulário e colunas (promovido das áreas Integrações e Vendas, que tinham cópias idênticas) */
.fx-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fx-6); align-items: start; }
.fx-chips { display: flex; flex-wrap: wrap; gap: var(--fx-1) var(--fx-2); }
.fx-checks { display: flex; flex-wrap: wrap; gap: var(--fx-3) var(--fx-6); }
.fx-inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--fx-3); }
.fx-inline-form .fx-field { min-width: 0; }
.fx-fsec { display: grid; gap: var(--fx-4); padding: 0; margin: 0; border: 0; min-width: 0; }
.fx-fsec + .fx-fsec { padding-top: var(--fx-5); border-top: 1px solid var(--fx-border); margin-top: var(--fx-5); }
.fx-fsec > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--fx-1); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fx-text-muted); }
.fx-fsec > legend + * { clear: both; }
@media (max-width: 900px) { .fx-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .fx-inline-form .fx-field, .fx-inline-form .fx-btn { flex: 1 1 100%; } }
.fx-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fx-3); flex-wrap: wrap; margin-bottom: var(--fx-3); }
.fx-section-title > .fx-tabs, .fx-row > .fx-tabs { margin-bottom: 0; flex: 0 0 auto; max-width: 100%; } /* abas de período ao lado do título; quebram para baixo no celular */

/* 7. ASSISTENTE E SINO (injetados em toda página logada pelo servidor) -------
   O assistente deixa de flutuar sobre o conteúdo: vira o item "Fred, assistente" no rodapé do menu
   (data-fx-assistant, na casca). O botão flutuante original fica escondido; o painel abre igual. */
.fx-app #fred-launcher { display: none !important; }
.fx-app #fred-cta, .fx-app #fred-cta b, .fx-app #fred-panel, .fx-app #fred-panel :is(b, small, div, span, button, input, textarea, a, p, h3, h4, label) { font-family: var(--fx-font) !important; }
.fx-app #fred-panel :is(small, .fred-atalho, .fred-step, .fred-ctx, .fred-tts, .fred-card-hot, [style*="font-size:10px"], [style*="font-size:11px"]) { font-size: var(--fx-fs-12) !important; }
.fx-app #fred-panel :is(b, strong, .fred-card-hot) { font-weight: 600 !important; }
.fx-app #fred-panel:not(.open) { box-shadow: none !important; }
.fx-app #ref-bell-wrap { top: 8px !important; right: 12px !important; z-index: 55 !important; }
.fx-app #ref-bell { width: 36px !important; height: 36px !important; border-radius: var(--fx-r-ctl) !important; background: var(--fx-surface-2) !important; border: 1px solid var(--fx-border-strong) !important; box-shadow: none !important; backdrop-filter: none !important; }
.fx-app:has(#ref-bell[style*="flex"]) .fx-topbar { padding-right: 60px; }
.fx-app #ref-bell-badge { font: 600 12px/18px var(--fx-font) !important; }
button.fx-nav-link { width: 100%; border: 0; background: none; font-family: var(--fx-font); text-align: left; }

/* 8. COMPATIBILIDADE COM TELAS AINDA NÃO MIGRADAS (body.fx-legado) ---------
   A tela antiga continua com as folhas dela; aqui só se neutraliza o que briga
   com a casca nova: família de letra, fundo e margens. Some quando a tela migra
   ({% block fx_legado %}{% endblock %} vazio no template). */
html body.fx-app.fx-legado, html body.fx-app.fx-legado[data-fp-console] {
  --fp-font: var(--fx-font); --fp-display: var(--fx-font); --fp-mono: var(--fx-mono);
  --hex-font-family: var(--fx-font); --hex-font-mono: var(--fx-mono);
  --rv-fd: var(--fx-font); --rv-fs: var(--fx-font); --rv-fm: var(--fx-mono);
  --ds-font: var(--fx-font); --ds-font-display: var(--fx-font); --ds-font-mono: var(--fx-mono);
  font-family: var(--fx-font) !important;
}
html body.fx-app.fx-legado .fx-content { max-width: var(--fx-content-max) !important; padding: var(--fx-6) var(--fx-6) 96px !important; background: none !important; }
html body.fx-app.fx-legado :is(.fx-side, .fx-topbar) :is(a, span, div, button, summary) { font-family: var(--fx-font) !important; letter-spacing: normal; }
html body.fx-app.fx-legado .fx-content > * { animation: none !important; }
html body.fx-app.fx-legado .fx-side :is(details, summary) { border: 0 !important; background-image: none !important; box-shadow: none !important; padding-block: 0; }
html body.fx-app.fx-legado .fx-side summary { padding: 6px 10px !important; margin: 0 !important; background-color: transparent; min-height: 28px !important; }
html body.fx-app.fx-legado .fx-side .fx-nav-link { min-height: 32px !important; }
html body.fx-app.fx-legado .fx-side summary:hover { background-color: var(--fx-surface-2); }
html body.fx-app.fx-legado .fx-side .fx-nav-group { padding: 0 !important; }
html body.fx-app.fx-legado .fx-side .fx-nav-group + .fx-nav-group { margin: 2px 0 0 !important; }
html body.fx-app.fx-legado .fx-side .fx-nav + .fx-nav-group { margin: var(--fx-3) 0 0 !important; }
html body.fx-app.fx-legado .fx-side a { text-decoration: none !important; }
html body.fx-app.fx-legado .fx-btn { border-radius: var(--fx-r-ctl) !important; font-family: var(--fx-font) !important; }

/* 9. RESPONSIVO, MOVIMENTO, IMPRESSÃO ------------------------------------- */
.fx-side-backdrop { display: none; }
@media (max-width: 1100px) {
  .fx-grid--main-aside, .fx-grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .fx-shell { grid-template-columns: minmax(0, 1fr); }
  .fx-side__inner { height: 100%; }
  .fx-side { position: fixed; inset: 0 auto 0 0; width: min(288px, 86vw); transform: translateX(-102%); transition: transform 200ms var(--fx-ease); box-shadow: var(--fx-shadow-pop); z-index: 210; }
  html.fx-nav-open .fx-side { transform: none; }
  html.fx-nav-open .fx-side-backdrop { display: block; position: fixed; inset: 0; z-index: 200; background: var(--fx-backdrop); border: 0; padding: 0; }
  html.fx-nav-open { overflow: hidden; }
  .fx-topbar__menu { display: inline-flex; }
  .fx-side__collapse { display: none; }
  .fx-topbar { padding: 0 var(--fx-3); }
  .fx-content, html body.fx-app.fx-legado .fx-content { padding: var(--fx-4) var(--fx-4) 96px !important; }
  .fx-flashes { padding: var(--fx-3) var(--fx-4) 0; }
  .fx-banner { padding: 10px var(--fx-4); }
  .fx-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .fx-table-wrap { overflow-x: auto; }
  .fx-table th { top: 0; }
  .fx-table th, .fx-table td { white-space: nowrap; }
  .fx-nav-link, .fx-nav-group > summary { min-height: 44px; font-size: var(--fx-fs-14); }
  html body.fx-app.fx-legado .fx-side summary, html body.fx-app.fx-legado .fx-side .fx-nav-link { min-height: 44px !important; }
  .fx-btn, .fx-input, .fx-select, .fx-tab { min-height: 44px; }
  .fx-btn--icon { min-width: 44px; }
  .fx-pagination__page { min-width: 44px; height: 44px; }
  .fx-th-sort { min-height: 44px; min-width: 44px; }  /* alvo de toque; so em tela estreita, a tabela do desktop nao muda */
  .fx-alert__close { width: 44px; height: 44px; margin: -10px -12px -10px 0; }
  .fx-filters > .fx-field, .fx-filters > .fx-field--grow { flex: 1 1 100%; max-width: none; }
  .fx-filters__meta { margin-left: 0; }
  .fx-page-header__actions { width: 100%; }
  .fx-cmdk-trigger span, .fx-cmdk-trigger .fx-kbd { display: none; }
  .fx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fx-3); }
  .fx-dl--rows > div { flex-direction: column; gap: 2px; } .fx-dl--rows dd { text-align: left; }
}
@media (max-width: 420px) { .fx-trail > :not(:last-child) { display: none; } .fx-trail > :last-child::before { display: none; } }
@media (prefers-reduced-motion: reduce) {
  :root { --fx-dur-fast: 0ms; --fx-dur: 0ms; --fx-dur-slow: 0ms; }
  .fx-app *, .fx-app *::before, .fx-app *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .fx-side, .fx-topbar, .fx-toasts, .fx-skip, #fred-launcher, #fred-panel, #ref-bell-wrap, .fx-page-header__actions, .fx-filters { display: none !important; }
  .fx-shell { display: block; } .fx-content { padding: 0; max-width: none; }
  html body.fx-app { background: #fff !important; color: #000; }
}

/* menu: corpo em coluna para o rodapé de links (documentação, notificações) descer */
.fx-side__body { display: flex; flex-direction: column; }
.fx-nav--foot { margin-top: auto !important; padding-top: var(--fx-4); }

/* código (manual /admin/design e telas de API) */
.fx-code { display: block; margin: 0; padding: var(--fx-3) var(--fx-4); border-radius: var(--fx-r-ctl); background: var(--fx-bg); border: 1px solid var(--fx-border); color: var(--fx-text); font-family: var(--fx-mono); font-size: var(--fx-fs-12); line-height: 20px; white-space: pre; overflow-x: auto; tab-size: 2; }
:not(pre) > code.fx-code-inline, .fx-code-inline { font-family: var(--fx-mono); font-size: var(--fx-fs-12); padding: 1px 5px; border-radius: 4px; background: var(--fx-surface-2); color: var(--fx-text-strong); white-space: nowrap; }
/* a11y 23/11: anel de foco visível (token --fx-focus) onde o outline foi zerado sem substituto */
.fx-cmdk__input:focus-visible { outline: 2px solid var(--fx-focus) !important; outline-offset: 2px; }

/* Início personalizável (components/fp/painel.html) */
.cc-grupo { border: 0; margin: 0 0 var(--fx-4); padding: 0; min-width: 0; }
.cc-grupo legend { font-weight: 600; color: var(--fx-text-strong); margin-bottom: var(--fx-2); }
.cc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fx-1); }
.cc-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-2); padding: var(--fx-1) var(--fx-2); border: 1px solid var(--fx-border); border-radius: var(--fx-r-ctl); background: var(--fx-surface); }
.cc-move { display: inline-flex; gap: 2px; flex: none; }
