/* Focinho KYC 1.0.0 — produção. Carregue depois de tokens.css. */
/* Focinho KYC — bundle.css
   Carregue depois de tokens.css. Só classes fk-*, sem estilo embutido (CSP estrita).
   Responsivo por container: envolva a aplicação em .fk-viewport (container "fk");
   abaixo de 820px o menu vira gaveta e as tabelas escondem .fk-col-sec. */

/* ---------- base ---------- */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font-family: var(--font-sans); font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding-left: 20px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* link “Pular para o conteúdo”: primeiro item da página, aparece só com o foco */
.fk-skip { position: fixed; left: var(--space-3); top: var(--space-3); z-index: var(--z-toast); padding: 10px 16px; border-radius: var(--radius-btn);
  background: var(--card); color: var(--tx); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-pop); transform: translateY(-300%); }
.fk-skip:focus { transform: none; }
[hidden] { display: none !important; }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
.fk-viewport { container-type: inline-size; container-name: fk; }
.fk-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- texto ---------- */
.fk-muted { color: var(--mut); }
.fk-small { font-size: 13px; line-height: 18px; }
.fk-strong { font-weight: 600; }
.fk-num { font-variant-numeric: tabular-nums; }
.fk-mono { font-family: var(--font-mono); font-size: 13px; line-height: 20px; }
.fk-nowrap { white-space: nowrap; }
.fk-ok { color: var(--ok); }
.fk-rev { color: var(--rev); }
.fk-rep { color: var(--rep); }
.fk-eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }

/* ---------- ícones ---------- */
[data-fk-icon] { display: inline-flex; flex: none; line-height: 0; }
.fk-icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.fk-spin .fk-icon, .fk-icon.fk-spin, .fk-spin.fk-icon { animation: fk-spin 0.9s linear infinite; }
@keyframes fk-spin { to { transform: rotate(360deg); } }

/* ---------- estrutura ---------- */
.fk-stack { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.fk-stack--xs { gap: var(--space-1); }
.fk-stack--sm { gap: var(--space-2); }
.fk-stack--lg { gap: var(--space-6); }
.fk-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.fk-row--lg { gap: var(--space-4); }
.fk-row--between { justify-content: space-between; }
.fk-row--top { align-items: flex-start; }
.fk-grow { flex: 1 1 auto; min-width: 0; }
.fk-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fk-grid--sm { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }
.fk-cols { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); align-items: start; }
@container fk (min-width: 1100px) {
  .fk-cols--main-side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .fk-cols--half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@container fk (min-width: 820px) {
  .fk-cols--md-half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.fk-divider { height: 1px; border: 0; margin: 0; background: var(--bd); }

/* ---------- cartão ---------- */
.fk-card {
  background: var(--card); border: 1px solid var(--bd); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: var(--space-5); min-width: 0;
}
.fk-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-4); }
.fk-card__title { font-size: 1.1rem; line-height: 1.35; font-weight: 700; display: flex; align-items: center; gap: var(--space-2); }
.fk-card__title .fk-icon { color: var(--mut); }
.fk-card__sub { font-size: 13px; line-height: 18px; color: var(--mut); margin-top: 2px; }
.fk-card--flush { padding: 0; overflow: hidden; }
.fk-card--flush > .fk-card__head { padding: var(--space-4) var(--space-5) 0; }
.fk-card--sunk { background: var(--sunk); box-shadow: none; }
.fk-card__foot { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--bd); }
@container fk (max-width: 819.98px) {
  .fk-card { padding: var(--space-4); }
  .fk-card--flush { padding: 0; }
  .fk-card--flush > .fk-card__head { padding: var(--space-4) var(--space-4) 0; }
  .fk-card__foot { padding: var(--space-3) var(--space-4); }
}

/* ---------- página ---------- */
.fk-page { display: flex; flex-direction: column; gap: var(--space-6); width: 100%; max-width: var(--size-content); margin: 0 auto; padding: var(--space-6); }
.fk-page--narrow { max-width: 760px; }
.fk-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-4); }
.fk-pagehead__title { font-size: 1.4rem; line-height: 1.3; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.fk-pagehead__sub { color: var(--mut); margin-top: var(--space-1); }
.fk-back { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--size-touch); color: var(--pri-tx); font-weight: 600; text-decoration: none; margin: calc(var(--space-2) * -1) 0 calc(var(--space-2) * -1) -4px; }
.fk-back:hover { text-decoration: underline; }
.fk-section { display: flex; flex-direction: column; gap: var(--space-3); }
.fk-section__title { font-size: 1.1rem; line-height: 1.35; font-weight: 700; }
@container fk (max-width: 819.98px) {
  .fk-page { padding: var(--space-4); gap: var(--space-4); }
}

/* ---------- dados rotulados ---------- */
.fk-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-5); align-items: baseline; }
.fk-kv dt { font-size: 13px; line-height: 22px; font-weight: 600; color: var(--mut); }
.fk-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.fk-kv--cols { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.fk-kv--cols > div { display: flex; flex-direction: column; gap: 2px; }
@container fk (max-width: 819.98px) {
  .fk-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fk-kv dd { margin-bottom: var(--space-2); }
  .fk-kv--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
}

/* ---------- botões ---------- */
.fk-btn {
  --fk-btn-bg: var(--card); --fk-btn-bd: var(--bd-ctl); --fk-btn-tx: var(--tx);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--size-control); padding: 0 var(--space-4); border: 1px solid var(--fk-btn-bd); border-radius: var(--radius-btn);
  background: var(--fk-btn-bg); color: var(--fk-btn-tx); font-size: 15px; line-height: 20px; font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fk-btn:hover { --fk-btn-bg: var(--hover); }
.fk-btn .fk-icon { width: 20px; height: 20px; }
.fk-btn--primary { --fk-btn-bg: var(--pri); --fk-btn-bd: var(--pri); --fk-btn-tx: var(--on-pri); }
.fk-btn--primary:hover { --fk-btn-bg: var(--pri-hover); --fk-btn-bd: var(--pri-hover); }
.fk-btn--danger { --fk-btn-bg: var(--rep); --fk-btn-bd: var(--rep); --fk-btn-tx: var(--on-rep); }
.fk-btn--danger:hover { --fk-btn-bg: var(--rep); filter: brightness(0.92); }
.fk-btn--ghost { --fk-btn-bg: transparent; --fk-btn-bd: transparent; --fk-btn-tx: var(--pri-tx); padding: 0 var(--space-3); }
.fk-btn--ghost:hover { --fk-btn-bg: var(--pri-bg); }
.fk-btn--danger-ghost { --fk-btn-bg: transparent; --fk-btn-bd: transparent; --fk-btn-tx: var(--rep); padding: 0 var(--space-3); }
.fk-btn--danger-ghost:hover { --fk-btn-bg: var(--rep-bg); }
.fk-btn--lg { min-height: var(--size-control-lg); padding: 0 var(--space-5); font-size: 16px; }
.fk-btn--sm { min-height: var(--size-control-sm); padding: 0 var(--space-3); font-size: 14px; }
.fk-btn--block { display: flex; width: 100%; }
.fk-btn:disabled, .fk-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; filter: none; }
.fk-btn:disabled:hover { --fk-btn-bg: inherit; }
.fk-btn--primary:disabled:hover { --fk-btn-bg: var(--pri); }
.fk-btn.is-loading { cursor: progress; }
.fk-btn.is-loading .fk-icon { animation: fk-spin 0.9s linear infinite; }
.fk-btn.is-done { --fk-btn-tx: var(--ok); }
.fk-btn--primary.is-done { --fk-btn-tx: var(--on-pri); }
.fk-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--size-touch); height: var(--size-touch); padding: 0; border: 1px solid transparent; border-radius: var(--radius-btn);
  background: transparent; color: var(--tx); cursor: pointer;
}
.fk-iconbtn:hover { background: var(--hover); }
.fk-iconbtn--bordered { border-color: var(--bd-ctl); background: var(--card); }
.fk-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.fk-btnrow--end { justify-content: flex-end; }
@container fk (max-width: 819.98px) {
  .fk-btn--sm { min-height: var(--size-touch); }
  .fk-btnrow--stack { flex-direction: column; align-items: stretch; }
  .fk-btnrow--stack > .fk-btn { width: 100%; }
}

/* ---------- selos ---------- */
.fk-badge {
  --fk-b-bg: var(--neu-bg); --fk-b-tx: var(--neu);
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; padding: 3px 10px;
  border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--fk-b-bg); color: var(--fk-b-tx);
  font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; vertical-align: middle;
}
.fk-badge .fk-icon { width: 14px; height: 14px; }
.fk-badge--ok { --fk-b-bg: var(--ok-bg); --fk-b-tx: var(--ok); }
.fk-badge--rev { --fk-b-bg: var(--rev-bg); --fk-b-tx: var(--rev); }
.fk-badge--rep { --fk-b-bg: var(--rep-bg); --fk-b-tx: var(--rep); }
.fk-badge--pri { --fk-b-bg: var(--pri-bg); --fk-b-tx: var(--pri-tx); }
.fk-badge--outline { background: transparent; border-color: currentColor; }
.fk-badge--lg { min-height: 30px; padding: 5px 12px; font-size: 13px; line-height: 18px; }
.fk-badge--lg .fk-icon { width: 16px; height: 16px; }
.fk-badge__note { display: block; font-weight: 600; }
.fk-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: var(--radius-pill); background: var(--neu-bg); color: var(--neu); font-size: 12px; line-height: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fk-count--rev { background: var(--rev-bg); color: var(--rev); }
.fk-count--rep { background: var(--rep-bg); color: var(--rep); }
.fk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mut); flex: none; }
.fk-dot--ok { background: var(--ok); }
.fk-dot--rev { background: var(--rev); }
.fk-dot--rep { background: var(--rep); }
.fk-dot--pri { background: var(--pri); }

/* ---------- campos ---------- */
.fk-form { display: flex; flex-direction: column; gap: var(--space-4); max-width: var(--size-form); }
.fk-form--wide { max-width: none; }
.fk-form__row { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@container fk (min-width: 820px) {
  .fk-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fk-form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.fk-form__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-1); }
.fk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fk-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tx); }
.fk-req { font-weight: 400; color: var(--mut); }
.fk-input, .fk-select, .fk-textarea {
  width: 100%; min-height: var(--size-control); padding: 10px 12px; border: 1px solid var(--bd-ctl); border-radius: var(--radius-btn);
  background: var(--card); color: var(--tx); font-size: 16px; line-height: 22px;
}
.fk-input::placeholder, .fk-textarea::placeholder { color: var(--mut); opacity: 1; }
.fk-input:focus-visible, .fk-select:focus-visible, .fk-textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.fk-input[readonly], .fk-input:disabled, .fk-select:disabled, .fk-textarea:disabled { background: var(--sunk); color: var(--mut); }
.fk-input--mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.fk-textarea { min-height: 112px; resize: vertical; }
.fk-select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.fk-select-wrap { position: relative; }
.fk-select-wrap > [data-fk-icon] { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; }
.fk-search { position: relative; }
.fk-search > [data-fk-icon] { position: absolute; left: 12px; top: 12px; color: var(--mut); pointer-events: none; }
.fk-search > .fk-input { padding-left: 42px; }
.fk-inputgroup { position: relative; }
.fk-inputgroup > .fk-input { padding-right: 52px; }
.fk-inputgroup > .fk-iconbtn { position: absolute; top: 0; right: 0; }
.fk-hint { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-msg { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; }
.fk-msg:empty { display: none; }
.fk-msg .fk-icon { width: 16px; height: 16px; margin-top: 1px; }
.fk-msg a { font-weight: 600; }
.fk-field.is-valid .fk-msg, .fk-msg--ok { color: var(--ok); }
.fk-field.is-invalid .fk-msg, .fk-msg--rep { color: var(--rep); }
.fk-field.is-valid .fk-input { border-color: var(--ok); }
.fk-field.is-invalid .fk-input, .fk-field.is-invalid .fk-textarea { border-color: var(--rep); box-shadow: inset 0 0 0 1px var(--rep); }
.fk-chipinfo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tx); }
.fk-chipinfo .fk-icon { width: 16px; height: 16px; color: var(--mut); }
.fk-counter { font-size: 13px; line-height: 18px; color: var(--mut); font-variant-numeric: tabular-nums; }

/* caixa de seleção */
.fk-check { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--size-touch); padding: 10px 0; cursor: pointer; }
.fk-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--pri); cursor: pointer; }
.fk-check__text { display: flex; flex-direction: column; gap: 2px; }
.fk-check__text small { font-size: 13px; line-height: 18px; color: var(--mut); }

/* escolha em cartões (radio) */
.fk-choices { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.fk-choices > legend { padding: 0; margin-bottom: var(--space-2); font-size: 13px; line-height: 18px; font-weight: 600; }
.fk-choice {
  display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--size-touch); padding: 12px 14px;
  border: 1px solid var(--bd-ctl); border-radius: var(--radius-btn); background: var(--card); cursor: pointer;
}
.fk-choice:hover { background: var(--hover); }
.fk-choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--pri); cursor: pointer; }
.fk-choice__title { font-weight: 600; }
.fk-choice__desc { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-choice:has(input:checked) { border-color: var(--pri); box-shadow: inset 0 0 0 1px var(--pri); background: var(--pri-bg); }
.fk-choice--ok:has(input:checked) { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); background: var(--ok-bg); }
.fk-choice--ok input { accent-color: var(--ok); }
.fk-choice--rep:has(input:checked) { border-color: var(--rep); box-shadow: inset 0 0 0 1px var(--rep); background: var(--rep-bg); }
.fk-choice--rep input { accent-color: var(--rep); }
.fk-choice--rev:has(input:checked) { border-color: var(--rev); box-shadow: inset 0 0 0 1px var(--rev); background: var(--rev-bg); }
.fk-choice--rev input { accent-color: var(--rev); }
.fk-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* controle segmentado (Espécie, filtro de biometria, modo da verificação) */
.fk-seg { display: inline-flex; align-self: flex-start; gap: 2px; margin: 0; padding: 3px; border: 0; border-radius: var(--radius-btn); background: var(--neu-bg); min-width: 0; max-width: 100%; }
.fk-seg > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fk-seg label { position: relative; display: flex; }
.fk-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fk-seg label > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border-radius: 7px; color: var(--neu); font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap;
}
.fk-seg label > span .fk-icon { width: 18px; height: 18px; }
.fk-seg input:checked + span { background: var(--card); color: var(--tx); box-shadow: 0 0 0 1px var(--bd-ctl); }
.fk-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.fk-seg--block { display: flex; align-self: stretch; width: 100%; }
.fk-seg--block label { flex: 1 1 0; min-width: 0; }
.fk-seg--block label > span { width: 100%; }

/* barra de filtros: uma linha acima do que ela filtra */
.fk-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.fk-filters > .fk-field { flex: 1 1 170px; max-width: 260px; }
.fk-filters > .fk-field--grow { flex: 2 1 260px; max-width: 420px; }
.fk-filters > .fk-field:has(.fk-seg) { flex: 0 0 auto; max-width: none; }
/* 6 filtros ou mais: cabem numa linha a partir de ~900px de conteúdo */
.fk-filters--dense > .fk-field { flex: 1 1 128px; max-width: 220px; }
.fk-filters--dense > .fk-field--grow { flex: 1.5 1 176px; max-width: 280px; }

/* ---------- avisos ---------- */
.fk-alert {
  --fk-a-bg: var(--pri-bg); --fk-a-ic: var(--pri-tx);
  display: flex; align-items: flex-start; gap: var(--space-3); padding: 12px 14px; border-radius: var(--radius-btn);
  background: var(--fk-a-bg); color: var(--tx);
}
.fk-alert > [data-fk-icon] { color: var(--fk-a-ic); margin-top: 1px; }
.fk-alert__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fk-alert__title { font-weight: 700; }
.fk-alert__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.fk-alert--ok { --fk-a-bg: var(--ok-bg); --fk-a-ic: var(--ok); }
.fk-alert--rev { --fk-a-bg: var(--rev-bg); --fk-a-ic: var(--rev); }
.fk-alert--rep { --fk-a-bg: var(--rep-bg); --fk-a-ic: var(--rep); }
.fk-alert--neu { --fk-a-bg: var(--sunk); --fk-a-ic: var(--mut); box-shadow: inset 0 0 0 1px var(--bd); }
.fk-alert--banner { border-radius: var(--radius-card); padding: 14px 16px; }
.fk-alert--banner .fk-alert__title { font-size: 16px; }

/* ---------- aviso flutuante ---------- */
.fk-toasts {
  position: fixed; left: 50%; bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.fk-toast {
  display: flex; align-items: center; gap: var(--space-2); padding: 12px 16px; border-radius: var(--radius-btn);
  background: var(--toast-bg); color: var(--toast-tx); box-shadow: var(--shadow-pop); font-weight: 600; pointer-events: auto;
  animation: fk-toast-in 0.2s ease-out;
}
.fk-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; }
.fk-toast--static { animation: none; align-self: flex-start; }
@keyframes fk-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- diálogo ---------- */
.fk-dialog {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--bd);
  border-radius: var(--radius-card); background: var(--card); color: var(--tx); box-shadow: var(--shadow-pop);
}
.fk-dialog::backdrop { background: var(--overlay); }
.fk-dialog__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); }
.fk-dialog__title { font-size: 1.1rem; line-height: 1.35; font-weight: 700; }
.fk-dialog__actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--bd); background: var(--sunk); border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.fk-dialog--inline { position: static; display: block; width: auto; max-width: 480px; max-height: none; margin: 0; }
@container fk (max-width: 819.98px) {
  .fk-dialog__actions { flex-direction: column-reverse; }
  .fk-dialog__actions > .fk-btn { width: 100%; }
}

/* ---------- abas ---------- */
.fk-tabs__list { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--bd); overflow-x: auto; scrollbar-width: none; }
.fk-tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--size-touch); padding: 0 var(--space-4);
  border: 0; background: none; color: var(--mut); font-weight: 600; white-space: nowrap; cursor: pointer;
}
.fk-tab:hover { color: var(--tx); }
.fk-tab[aria-selected="true"] { color: var(--tx); }
.fk-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--pri); }
.fk-tab:focus-visible { outline-offset: -2px; border-radius: var(--radius-btn) var(--radius-btn) 0 0; }
.fk-tabs__panel { padding-top: var(--space-4); }
.fk-tabs__panel:focus-visible { outline-offset: 4px; }

/* ---------- casca: topo, menu lateral e gaveta ---------- */
.fk-app { display: grid; grid-template-columns: var(--size-sidebar) minmax(0, 1fr); grid-template-rows: var(--size-topbar) minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.fk-topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: var(--z-topbar); display: flex; align-items: center; gap: var(--space-2);
  height: var(--size-topbar); padding: 0 var(--space-4); background: var(--card); border-bottom: 1px solid var(--bd);
}
.fk-topbar__menu { display: none; margin-left: -10px; }
.fk-topbar__spacer { flex: 1 1 auto; }
.fk-brand { display: inline-flex; align-items: center; min-height: var(--size-touch); color: var(--tx); font-size: 17px; line-height: 22px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.fk-brand b { color: var(--pri-tx); font-weight: 800; margin-left: 0.28em; }
.fk-unit {
  display: inline-flex; flex: 0 1 auto; min-width: 0; align-items: center; gap: 6px; max-width: 320px; min-height: 32px; padding: 4px 12px 4px 10px;
  border: 1px solid var(--bd); border-radius: var(--radius-pill); background: var(--sunk); color: var(--tx);
  font-size: 13px; line-height: 18px; font-weight: 600;
}
.fk-unit .fk-icon { width: 16px; height: 16px; color: var(--mut); }
.fk-unit__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fk-operator {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--size-touch); padding: 0 var(--space-2);
  border: 0; border-radius: var(--radius-btn); background: transparent; color: var(--tx); font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.fk-operator:hover { background: var(--hover); }
.fk-operator .fk-icon { width: 18px; height: 18px; color: var(--mut); }
.fk-sidebar {
  position: sticky; top: var(--size-topbar); height: calc(100vh - var(--size-topbar)); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-3) var(--space-3) var(--space-6); background: var(--card); border-right: 1px solid var(--bd);
}
.fk-nav__group { padding: var(--space-4) var(--space-3) var(--space-1); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.fk-nav__group:first-child { padding-top: var(--space-1); }
.fk-nav__item {
  display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-btn);
  color: var(--tx); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
}
.fk-nav__item:hover { background: var(--hover); }
.fk-nav__item .fk-icon { color: var(--mut); }
.fk-nav__item[aria-current="page"] { background: var(--pri-bg); color: var(--pri-tx); font-weight: 700; }
.fk-nav__item[aria-current="page"] .fk-icon { color: var(--pri-tx); }
.fk-nav__item .fk-count { margin-left: auto; }
.fk-nav__me { display: none; }
.fk-main { min-width: 0; }
.fk-veil { display: none; }
@container fk (max-width: 819.98px) {
  .fk-app { grid-template-columns: minmax(0, 1fr); }
  .fk-topbar { padding: 0 var(--space-3); gap: var(--space-1); }
  .fk-topbar__menu { display: inline-flex; }
  .fk-topbar .fk-hide-sm { display: none; }
  .fk-unit { max-width: 46%; }
  .fk-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: var(--z-drawer); width: min(320px, 86%); height: auto;
    padding-top: var(--space-4); border-right: 0; box-shadow: var(--shadow-pop); transform: translateX(-104%); transition: transform 0.2s ease;
  }
  .fk-app.is-drawer-open .fk-sidebar { transform: none; }
  .fk-veil { display: block; position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: var(--overlay); }
  .fk-nav__item { min-height: var(--size-touch); }
  .fk-nav__me { display: flex; flex-direction: column; gap: 2px; margin: 0 var(--space-1) var(--space-2); padding: var(--space-3); border-radius: var(--radius-card); background: var(--sunk); }
  .fk-nav__me-name { font-weight: 700; }
  .fk-nav__me .fk-unit { max-width: 100%; align-self: flex-start; margin: 6px 0 4px; }
  .fk-nav__me .fk-btnrow { margin-top: var(--space-2); }
}

/* ---------- indicadores e atalhos ---------- */
.fk-stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fk-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fk-stat {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: var(--space-4); border: 1px solid var(--bd);
  border-radius: var(--radius-card); background: var(--card); color: var(--tx); text-decoration: none;
}
.fk-stat__label { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--mut); }
.fk-stat__value { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.fk-stat__meta { font-size: 13px; line-height: 18px; color: var(--mut); }
a.fk-stat:hover { border-color: var(--bd-ctl); background: var(--hover); }
a.fk-stat .fk-stat__go { margin-left: auto; color: var(--mut); }
.fk-stat--rev .fk-stat__value { color: var(--rev); }
.fk-stat--rep .fk-stat__value { color: var(--rep); }
.fk-shortcuts { display: grid; gap: var(--space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fk-shortcut {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--space-3); min-height: 104px;
  padding: var(--space-4); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); color: var(--tx);
  font-size: 16px; line-height: 22px; font-weight: 700; text-decoration: none;
}
.fk-shortcut .fk-icon { width: 28px; height: 28px; color: var(--pri-tx); }
.fk-shortcut__sub { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--mut); }
.fk-shortcut:hover { border-color: var(--pri); background: var(--pri-bg); }
.fk-shortcut--primary { border-color: var(--pri); background: var(--pri); color: var(--on-pri); }
.fk-shortcut--primary .fk-icon, .fk-shortcut--primary .fk-shortcut__sub { color: var(--on-pri); }
.fk-shortcut--primary:hover { border-color: var(--pri-hover); background: var(--pri-hover); }
@container fk (max-width: 819.98px) {
  .fk-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .fk-shortcut { min-height: 92px; padding: var(--space-3); }
  .fk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .fk-stat { padding: var(--space-3); }
  .fk-stat__value { font-size: 24px; line-height: 28px; }
}

/* ---------- tabela ---------- */
.fk-table-wrap { container-type: inline-size; width: 100%; overflow-x: auto; border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-table-wrap--flat { border: 0; border-radius: 0; }
.fk-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.fk-table th {
  padding: 10px 12px; border-bottom: 1px solid var(--bd); background: var(--sunk); color: var(--mut); text-align: left; vertical-align: bottom;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.fk-table td, .fk-table tbody th {
  padding: 12px; border-bottom: 1px solid var(--bd); background: transparent; color: var(--tx); text-align: left; vertical-align: middle;
  font-size: 15px; line-height: 22px; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: normal;
}
.fk-table tbody th { font-weight: 600; }
.fk-table tbody tr:last-child > * { border-bottom: 0; }
.fk-table tr[data-fk-href] { cursor: pointer; }
.fk-table tr[data-fk-href]:hover > * { background: var(--hover); }
.fk-table tr.is-selected > * { background: var(--pri-bg); }
.fk-table .fk-num, .fk-table th.fk-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fk-table .fk-rowlink { color: var(--tx); font-weight: 600; text-decoration: none; white-space: nowrap; }
.fk-table .fk-rowlink:hover { text-decoration: underline; }
.fk-table .fk-cell-sub { display: block; font-size: 13px; line-height: 18px; color: var(--mut); white-space: nowrap; }
.fk-table .fk-cell-actions { text-align: right; white-space: nowrap; }
.fk-table--compact td, .fk-table--compact tbody th { padding-top: 8px; padding-bottom: 8px; }
.fk-table__empty td { padding: var(--space-8) var(--space-4); text-align: center; color: var(--mut); }
.fk-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--bd); }
.fk-pager__info { font-size: 13px; line-height: 18px; color: var(--mut); font-variant-numeric: tabular-nums; }
@container (max-width: 600px) {
  .fk-col-sec { display: none; }
}
@container fk (max-width: 819.98px) {
  .fk-col-sec { display: none; }
  .fk-table th, .fk-table td, .fk-table tbody th { padding-left: 10px; padding-right: 10px; }
}

/* ---------- vazio, detalhes recolhidos, progresso ---------- */
.fk-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-4); text-align: center; color: var(--mut); }
.fk-empty .fk-icon { width: 32px; height: 32px; }
.fk-empty__title { color: var(--tx); font-weight: 600; }
.fk-disclosure { border-top: 1px solid var(--bd); }
.fk-disclosure > summary { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-touch); list-style: none; cursor: pointer; font-weight: 600; }
.fk-disclosure > summary::-webkit-details-marker { display: none; }
.fk-disclosure > summary > .fk-icon, .fk-disclosure > summary > [data-fk-icon] { color: var(--mut); }
.fk-disclosure__chev { margin-left: auto; transition: transform 0.15s ease; }
.fk-disclosure[open] > summary .fk-disclosure__chev { transform: rotate(180deg); }
.fk-disclosure__sub { font-weight: 400; font-size: 13px; color: var(--mut); }
.fk-disclosure__body { padding-bottom: var(--space-3); }
.fk-json { margin: 0; padding: var(--space-3) var(--space-4); max-height: 280px; overflow: auto; border-radius: var(--radius-btn); background: var(--sunk); border: 1px solid var(--bd); font-family: var(--font-mono); font-size: 13px; line-height: 20px; white-space: pre; }
.fk-progress { position: relative; height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--neu-bg); }
.fk-progress__bar { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--fk-value, 0) * 100%); border-radius: inherit; background: var(--pri); transition: width 0.3s ease; }
.fk-progress--indeterminate .fk-progress__bar { width: 36%; animation: fk-indet 1.4s ease-in-out infinite; }
@keyframes fk-indet { from { transform: translateX(-100%); } to { transform: translateX(280%); } }
.fk-skel { display: block; height: 12px; border-radius: 6px; background: var(--bd); animation: fk-pulse 1.4s ease-in-out infinite; }
.fk-skel--w90 { width: 90%; } .fk-skel--w75 { width: 75%; } .fk-skel--w60 { width: 60%; } .fk-skel--w40 { width: 40%; }
@keyframes fk-pulse { 50% { opacity: 0.45; } }

/* ---------- força da senha ---------- */
.fk-meter { display: flex; align-items: center; gap: var(--space-3); }
.fk-meter__bars { display: grid; flex: 1 1 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.fk-meter__bars span { height: 6px; border-radius: var(--radius-pill); background: var(--neu-bg); }
.fk-meter[data-score="1"] .fk-meter__bars span:nth-child(-n+1) { background: var(--rep); }
.fk-meter[data-score="2"] .fk-meter__bars span:nth-child(-n+2) { background: var(--rev); }
.fk-meter[data-score="3"] .fk-meter__bars span:nth-child(-n+3) { background: var(--ok); }
.fk-meter[data-score="4"] .fk-meter__bars span { background: var(--ok); }
.fk-meter__label { min-width: 96px; text-align: right; font-size: 13px; line-height: 18px; font-weight: 600; }
.fk-rules { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-rules li { display: flex; align-items: center; gap: 6px; }
.fk-rules li.is-ok { color: var(--ok); font-weight: 600; }
.fk-rules .fk-icon { width: 16px; height: 16px; }
.fk-rule__count { margin-left: auto; padding-left: var(--space-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- login ---------- */
.fk-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: var(--space-6) var(--space-4); background: var(--bg); }
.fk-login__card {
  display: flex; flex-direction: column; gap: var(--space-5); width: 100%; max-width: 400px; padding: var(--space-8) var(--space-6);
  border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card);
}
.fk-login__brand { font-size: 1.4rem; }
.fk-login__foot { font-size: 13px; line-height: 18px; color: var(--mut); text-align: center; }

/* ---------- foto e miniaturas (nunca com opção de baixar) ---------- */
.fk-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--sunk); user-select: none; -webkit-user-select: none; }
.fk-photo > svg, .fk-photo > img, .fk-photo > canvas, .fk-photo > video { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.fk-photo--square { aspect-ratio: 1; }
.fk-thumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fk-thumb { width: var(--size-thumb); height: var(--size-thumb); flex: none; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.fk-thumb-btn { display: inline-flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--mut); font-size: 12px; line-height: 16px; cursor: zoom-in; text-align: left; }
.fk-thumb-btn .fk-thumb { outline: 2px solid transparent; outline-offset: 1px; }
.fk-thumb-btn:hover .fk-thumb { outline-color: var(--bd-ctl); }
.fk-thumb-btn.is-off .fk-thumb { opacity: 0.45; }

/* ---------- captura de foto ---------- */
.fk-capture {
  container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4);
  border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card);
}
.fk-capture[data-state="ok"] { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.fk-capture[data-state="bad"] { border-color: var(--rep); box-shadow: inset 0 0 0 1px var(--rep); }
.fk-capture[data-state="warn"] { border-color: var(--rev); box-shadow: inset 0 0 0 1px var(--rev); }
.fk-capture__head { display: flex; align-items: center; gap: var(--space-2); min-height: 28px; }
.fk-capture__title { font-weight: 700; }
.fk-capture__head .fk-badge { margin-left: auto; }
.fk-capture__head > .fk-iconbtn { margin: -8px -10px -8px auto; }
.fk-capture__head > .fk-badge + .fk-iconbtn { margin-left: 0; }
.fk-sources { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 560px) { .fk-sources { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fk-source {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px;
  padding: var(--space-3) var(--space-2); border: 1px dashed var(--bd-ctl); border-radius: var(--radius-btn); background: var(--sunk);
  color: var(--tx); font-size: 14px; line-height: 18px; font-weight: 600; text-align: center; cursor: pointer;
}
.fk-source .fk-icon { width: 24px; height: 24px; color: var(--pri-tx); }
.fk-source:hover { border-style: solid; border-color: var(--pri); background: var(--pri-bg); }
.fk-source:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.fk-source input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fk-source--primary { border-style: solid; border-color: var(--pri); background: var(--pri); color: var(--on-pri); }
.fk-source--primary .fk-icon { color: var(--on-pri); }
.fk-source--primary:hover { border-color: var(--pri-hover); background: var(--pri-hover); }
.fk-source__note { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--mut); }
.fk-capture__media { position: relative; }
.fk-capture__status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-pill); background: var(--camera-bg); color: var(--camera-tx); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.fk-capture__media.is-busy .fk-photo { opacity: 0.55; }
.fk-capture__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.fk-nopreview {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 4 / 3; padding: var(--space-4);
  border: 1px dashed var(--bd-ctl); border-radius: var(--radius-sm); background: var(--sunk); color: var(--mut); text-align: center; font-size: 13px; line-height: 18px;
}
.fk-nopreview .fk-icon { width: 28px; height: 28px; }
.fk-nopreview b { color: var(--tx); font-size: 14px; }

/* ---------- qualidade ---------- */
.fk-quality { display: flex; flex-direction: column; gap: var(--space-2); }
.fk-quality__ok {
  display: inline-flex; flex-direction: column; align-self: flex-start; gap: 2px; padding: 6px 12px 6px 10px; border-radius: 16px;
  background: var(--ok-bg); color: var(--ok); font-size: 13px; line-height: 18px; font-weight: 700;
}
.fk-quality__ok > span { display: flex; align-items: flex-start; gap: 6px; }
.fk-quality__ok > span > .fk-icon, .fk-quality__ok > span > [data-fk-icon] { margin-top: 1px; }
.fk-quality__ok .fk-icon { width: 16px; height: 16px; }
.fk-quality__ok small { font-size: 13px; font-weight: 600; }
.fk-quality__screen { color: var(--tx); font-weight: 600; }
.fk-quality__screen > [data-fk-icon] { color: var(--rev); }
.fk-quality__screen .fk-icon { color: var(--rev); }
.fk-quality__bad { display: flex; flex-direction: column; gap: 6px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-btn); background: var(--rep-bg); color: var(--tx); }
.fk-quality__bad-title { display: flex; align-items: center; gap: 8px; color: var(--rep); font-weight: 700; }
.fk-quality__bad ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-left: 20px; }
.fk-quality__warn { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: var(--radius-btn); background: var(--rev-bg); color: var(--tx); font-size: 14px; line-height: 20px; }
.fk-quality__warn > [data-fk-icon] { color: var(--rev); margin-top: 1px; }

/* ---------- recorte ---------- */
.fk-crop { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.fk-crop__main { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: var(--space-3); align-items: start; }
@container (max-width: 330px) { .fk-crop__main { grid-template-columns: minmax(0, 1fr) 72px; gap: var(--space-2); } }
.fk-crop__stage { position: relative; aspect-ratio: var(--fk-ar, 4 / 3); overflow: hidden; border-radius: var(--radius-sm); background: var(--camera-bg); touch-action: none; user-select: none; -webkit-user-select: none; }
.fk-crop__stage > .fk-photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.fk-crop__box {
  position: absolute; left: var(--fk-l, 25%); top: var(--fk-t, 12%); width: var(--fk-w, 50%); height: var(--fk-h, 70%);
  border: 2px solid var(--crop); border-radius: 3px; cursor: move; touch-action: none;
  box-shadow: 0 0 0 1px var(--crop-ink), inset 0 0 0 1px var(--crop-ink), 0 0 0 999px #0a0e0d61;
}
.fk-crop__box:focus-visible { outline: 3px solid var(--crop); outline-offset: 3px; }
.fk-crop__aim { position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px dashed var(--crop); border-radius: 50%; pointer-events: none; }
.fk-crop__handle {
  position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border: 2px solid var(--crop-ink); border-radius: 50%;
  background: var(--crop); cursor: nwse-resize; touch-action: none;
}
.fk-crop__handle::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; }
.fk-crop.is-dragging .fk-crop__box { cursor: grabbing; }
.fk-crop.is-full .fk-crop__box { cursor: default; border-radius: 0; box-shadow: 0 0 0 1px var(--crop-ink), inset 0 0 0 1px var(--crop-ink); }
.fk-crop.is-full .fk-crop__handle, .fk-crop.is-full .fk-crop__aim { display: none; }
.fk-crop__side { display: flex; flex-direction: column; gap: 6px; }
.fk-crop__thumb { aspect-ratio: 1; overflow: hidden; border: 1px solid var(--bd); border-radius: var(--radius-sm); background: var(--camera-bg); }
.fk-crop__thumb > svg, .fk-crop__thumb > canvas { display: block; width: 100%; height: 100%; }
.fk-crop__thumb-label { font-size: 12px; line-height: 16px; color: var(--mut); text-align: center; }
.fk-crop__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-3); }
.fk-crop__range { display: flex; flex: 1 1 220px; align-items: center; gap: var(--space-3); min-height: var(--size-touch); font-size: 13px; line-height: 18px; font-weight: 600; }
.fk-crop__range input { flex: 1 1 auto; min-width: 0; accent-color: var(--pri); }
.fk-crop__hint { font-size: 13px; line-height: 18px; color: var(--mut); }

/* ---------- passo a passo da captura (celular) ---------- */
.fk-steps { display: flex; flex-direction: column; gap: 8px; }
.fk-steps__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.fk-steps__title { font-size: 16px; line-height: 22px; font-weight: 700; }
.fk-steps__meta { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-steps__bar { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; }
.fk-steps__seg { height: 6px; border-radius: var(--radius-pill); background: var(--neu-bg); }
.fk-steps__seg.is-done { background: var(--pri); }
.fk-steps__seg.is-current { background: var(--bd-ctl); }
.fk-steps__seg.is-bad { background: var(--rep); }
.fk-steps__seg.is-optional { background: transparent; box-shadow: inset 0 0 0 1px var(--bd-ctl); }

/* ---------- como fotografar ---------- */
.fk-guide { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-4); }
.fk-guide__rules { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
@container (min-width: 640px) { .fk-guide__rules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fk-guide__rule { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-guide__title { font-weight: 700; }
.fk-guide__text { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-guide__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.fk-guide__ex { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.fk-guide__ex > svg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--sunk); }
.fk-guide__ex figcaption { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 700; }
.fk-guide__ex figcaption .fk-icon { width: 14px; height: 14px; }
.fk-guide__ex--do figcaption { color: var(--ok); }
.fk-guide__ex--dont figcaption { color: var(--rep); }
.gi-frame { fill: var(--card); stroke: var(--bd-ctl); stroke-width: 2; }
.gi-fur { fill: var(--neu-bg); }
.gi-nose { fill: var(--tx); }
.gi-hole { fill: var(--card); }
.gi-line { fill: none; stroke: var(--mut); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gi-light { fill: var(--crop); stroke: var(--crop-ink); stroke-width: 1.5; }
.gi-glare { fill: var(--card); opacity: 0.9; }
.gi-dim { fill: var(--tx); opacity: 0.18; }

/* ---------- câmera com guia (R1): sempre escura ---------- */
.fk-camera { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 560px; overflow: hidden; background: var(--camera-bg); color: var(--camera-tx); }
.fk-camera--fullscreen { position: fixed; inset: 0; z-index: var(--z-camera); min-height: 0; }
.fk-camera__top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) var(--space-3) var(--space-2); background: var(--camera-bg); }
.fk-camera__btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--size-touch); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-btn); background: transparent; color: var(--camera-tx); font-weight: 600; cursor: pointer; }
.fk-camera__count { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: var(--radius-pill); background: #ffffff24; color: var(--camera-tx); font-weight: 700; font-variant-numeric: tabular-nums; }
.fk-camera__count .fk-icon { width: 18px; height: 18px; }
.fk-camera[data-state="good"] .fk-camera__count, .fk-camera[data-state="done"] .fk-camera__count { color: var(--mira-ok); }
.fk-camera__feed { position: relative; flex: 1 1 auto; overflow: hidden; }
.fk-camera__feed > .fk-photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; background: var(--camera-bg); }
.fk-camera__reticle {
  position: absolute; left: 50%; top: 46%; width: 66%; max-width: 320px; aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 3px dashed var(--crop); border-radius: 50%; box-shadow: 0 0 0 999px #0a0e0d80; transition: border-color 0.2s ease;
}
.fk-camera[data-state="good"] .fk-camera__reticle, .fk-camera[data-state="confirming"] .fk-camera__reticle, .fk-camera[data-state="done"] .fk-camera__reticle { border-style: solid; border-color: var(--mira-ok); }
.fk-camera[data-state="good"] .fk-camera__reticle { animation: fk-breathe 1.2s ease-in-out infinite; }
@keyframes fk-breathe { 50% { transform: translate(-50%, -50%) scale(1.03); } }
.fk-camera__hint {
  position: absolute; left: 50%; bottom: var(--space-4); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-pill); background: var(--camera-bg); color: var(--camera-tx); font-size: 17px; line-height: 22px; font-weight: 700; white-space: nowrap;
}
.fk-camera[data-state="good"] .fk-camera__hint, .fk-camera[data-state="done"] .fk-camera__hint { color: var(--mira-ok); }
.fk-camera__confirm { position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #0a0e0db3; font-weight: 700; }
.fk-camera__confirm .fk-icon { width: 32px; height: 32px; }
.fk-camera[data-state="confirming"] .fk-camera__confirm { display: flex; }
.fk-camera[data-state="confirming"] .fk-camera__hint { display: none; }
.fk-camera__discard { position: absolute; left: var(--space-3); right: var(--space-3); top: var(--space-3); z-index: 1; display: none; gap: 10px; padding: 12px 14px; border-radius: var(--radius-btn); background: var(--rep-bg); color: var(--tx); font-weight: 600; }
.fk-camera__discard > [data-fk-icon] { color: var(--rep); }
.fk-camera[data-state="discarded"] .fk-camera__discard { display: flex; }
.fk-camera__bottom { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--space-4) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); background: var(--camera-bg); }
.fk-camera__shutter { width: 72px; height: 72px; padding: 5px; border: 4px solid var(--camera-tx); border-radius: 50%; background: transparent; cursor: pointer; }
.fk-camera__shutter::before { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--camera-tx); }
.fk-camera__shutter:focus-visible { outline: 3px solid var(--mira-ok); outline-offset: 3px; }
.fk-camera__shutter-label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--camera-mut); }
.fk-camera :focus-visible { outline-color: var(--camera-tx); }

/* ---------- vídeo curto (R2) ---------- */
.fk-upload { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-upload__row { display: flex; align-items: center; gap: var(--space-3); }
.fk-upload__row > [data-fk-icon] { color: var(--pri-tx); }
.fk-upload__name { font-weight: 600; overflow-wrap: anywhere; }
.fk-upload__meta { font-size: 13px; line-height: 18px; color: var(--mut); font-variant-numeric: tabular-nums; }
.fk-frames { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.fk-frame { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.fk-frame__pick { position: relative; display: block; padding: 0; border: 2px solid var(--ok); border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.fk-frame__pick .fk-photo { aspect-ratio: 1; border-radius: 0; }
.fk-frame__pick::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 2px var(--card);
}
.fk-frame__pick[aria-pressed="false"] { border-color: var(--bd-ctl); }
.fk-frame__pick[aria-pressed="false"] .fk-photo { opacity: 0.4; }
.fk-frame__pick[aria-pressed="false"]::after { background: var(--card); box-shadow: 0 0 0 2px var(--bd-ctl); }
.fk-frame figcaption { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; line-height: 16px; color: var(--mut); font-variant-numeric: tabular-nums; }

/* ---------- escore fundido: escala por faixas ---------- */
.fk-score { --fk-pos: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fk-score__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.fk-score__label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--mut); }
.fk-score__value { font-size: 22px; line-height: 28px; font-weight: 700; }
.fk-score__track { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; height: 10px; margin: 6px 0 4px; border-radius: var(--radius-pill); }
.fk-score__track::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--bd-ctl); border-radius: inherit; pointer-events: none; }
.fk-score__zone--rep { background: var(--rep-bg); border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.fk-score__zone--rev { background: var(--rev-bg); }
.fk-score__zone--ok { background: var(--ok-bg); border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.fk-score__tick { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--tx); }
.fk-score__tick--rev { left: 50%; }
.fk-score__tick--ok { left: 75%; }
.fk-score__marker { position: absolute; top: 50%; left: calc(var(--fk-pos) * 100%); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--tx); box-shadow: 0 0 0 3px var(--card); }
.fk-score__scale { position: relative; height: 34px; font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-score__scale > span { position: absolute; top: 0; white-space: nowrap; }
.fk-score__min { left: 0; }
.fk-score__max { right: 0; }
.fk-score__lim { transform: translateX(-50%); text-align: center; }
.fk-score__lim b { display: block; color: var(--tx); font-weight: 600; font-variant-numeric: tabular-nums; }
.fk-score__lim--rev { left: 50%; }
.fk-score__lim--ok { left: 75%; }
.fk-score--sm .fk-score__value { font-size: 17px; line-height: 22px; }
.fk-score--sm .fk-score__track { height: 8px; }

/* ---------- resultado da decisão ---------- */
.fk-result { container-type: inline-size; overflow: hidden; border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card); }
.fk-decision { --fk-d-bg: var(--ok-bg); --fk-d-tx: var(--ok); display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5); background: var(--fk-d-bg); }
.fk-result--rev .fk-decision { --fk-d-bg: var(--rev-bg); --fk-d-tx: var(--rev); }
.fk-result--rep .fk-decision { --fk-d-bg: var(--rep-bg); --fk-d-tx: var(--rep); }
.fk-decision__icon { color: var(--fk-d-tx); padding-top: 18px; }
.fk-decision__icon .fk-icon { width: 34px; height: 34px; }
.fk-decision__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fk-decision__eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx); }
.fk-decision__state { font-size: 28px; line-height: 32px; font-weight: 800; letter-spacing: 0.01em; color: var(--fk-d-tx); }
.fk-decision__why { margin-top: 2px; color: var(--tx); }
.fk-next { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--bd); }
.fk-next__tip { display: flex; align-items: flex-start; gap: var(--space-2); font-weight: 600; }
.fk-next__tip > [data-fk-icon] { color: var(--pri-tx); margin-top: 1px; }
.fk-result__section { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--bd); }
.fk-result__section:last-child { border-bottom: 0; }
.fk-result__title { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--mut); }
.fk-reasons { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fk-reasons li { display: flex; gap: 10px; }
.fk-reasons li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--mut); }
.fk-fraud { display: flex; align-items: flex-start; gap: var(--space-2); font-weight: 600; }
.fk-fraud--clear { color: var(--ok); }
.fk-fraud--hit { color: var(--rep); }
.fk-fraud__list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--tx); font-weight: 400; }
.fk-fraud__list li { display: flex; gap: 8px; align-items: flex-start; }
.fk-fraud__list li > [data-fk-icon] { color: var(--rep); }
.fk-result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-5); font-size: 13px; line-height: 18px; color: var(--mut); border-bottom: 1px solid var(--bd); }
.fk-result__meta a { font-size: 15px; font-weight: 600; }
.fk-result > .fk-disclosure { padding: 0 var(--space-5); border-top: 0; }
.fk-signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; }
.fk-signals > div { display: flex; flex-direction: column; }
.fk-signals dt { font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-signals dd { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 20px; }
.fk-factors { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@container (max-width: 520px) {
  .fk-decision { padding: var(--space-4); }
  .fk-decision__icon { padding-top: 16px; }
  .fk-next, .fk-result__section, .fk-result__meta { padding-left: var(--space-4); padding-right: var(--space-4); }
  .fk-result > .fk-disclosure { padding: 0 var(--space-4); }
  .fk-next .fk-btnrow { flex-direction: column; align-items: stretch; }
  .fk-next .fk-btnrow > .fk-btn { width: 100%; }
}

/* ---------- parecer da IA ---------- */
.fk-opinion { overflow: hidden; border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-opinion__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--bd); }
.fk-opinion__title { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; line-height: 1.35; font-weight: 700; }
.fk-opinion__title .fk-icon { color: var(--mut); }
.fk-opinion__src { margin-left: auto; font-family: var(--font-mono); font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-opinion__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.fk-opinion__body h3, .fk-opinion__body h4 { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); margin-bottom: 2px; }
.fk-opinion__body ul { display: flex; flex-direction: column; gap: 4px; }
.fk-opinion__wait { display: flex; align-items: flex-start; gap: var(--space-2); }
.fk-opinion__wait > [data-fk-icon] { color: var(--pri-tx); }
.fk-opinion__foot { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--bd); background: var(--sunk); font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-opinion__foot .fk-icon { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- seletor de animal ---------- */
.fk-picker { display: flex; flex-direction: column; gap: var(--space-2); }
.fk-picker__list { margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--bd); border-radius: var(--radius-btn); background: var(--card); }
.fk-picker__cols, .fk-picker__opt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 2px var(--space-3); align-items: center; padding: 10px 12px; }
.fk-picker__cols { padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--bd); background: var(--sunk); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.fk-picker__opt { min-height: 56px; border-bottom: 1px solid var(--bd); cursor: pointer; }
.fk-picker__opt:last-child { border-bottom: 0; }
.fk-picker__opt:hover, .fk-picker__opt[aria-selected="true"] { background: var(--hover); }
.fk-picker__opt:focus-visible { outline-offset: -2px; }
.fk-picker__opt[aria-disabled="true"] { cursor: not-allowed; }
.fk-picker__opt[aria-disabled="true"] .fk-picker__name { color: var(--mut); }
.fk-picker__name { font-weight: 600; }
.fk-picker__owner { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-picker__empty { padding: var(--space-4); color: var(--mut); text-align: center; }
.fk-picker__note { font-size: 13px; line-height: 18px; color: var(--mut); }
@container fk (max-width: 819.98px) {
  .fk-picker__cols { display: none; }
  .fk-picker__opt { grid-template-columns: minmax(0, 1fr) auto; }
  .fk-picker__owner { grid-column: 1; grid-row: 2; }
  .fk-picker__opt > .fk-badge { grid-column: 2; grid-row: 1 / span 2; }
}
.fk-picked { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-picked__thumb { width: 52px; height: 52px; flex: none; overflow: hidden; border-radius: var(--radius-sm); }
.fk-picked__thumb .fk-photo { width: 100%; height: 100%; aspect-ratio: 1; border-radius: 0; }
.fk-picked__main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.fk-picked__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); }
.fk-picked__name { font-size: 16px; line-height: 22px; font-weight: 700; }
.fk-picked__meta { font-size: 13px; line-height: 18px; color: var(--mut); }

/* ---------- fator complementar (face, microchip): segundo sinal ---------- */
.fk-factor { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 1px dashed var(--bd-ctl); border-radius: var(--radius-card); background: var(--sunk); }
.fk-factor__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-3); }
.fk-factor__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.fk-factor__title .fk-icon { color: var(--mut); }
.fk-factor__note { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-factor__head > .fk-badge { margin-left: auto; }
.fk-factor__alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--rep-bg); color: var(--rep); font-weight: 700; }
.fk-factor__faces { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.fk-factor__face { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-factor__face .fk-photo { width: 84px; aspect-ratio: 1; }
.fk-factor__group { display: flex; gap: 6px; }
.fk-factor__sep { align-self: center; padding: 0 var(--space-1); color: var(--mut); font-weight: 700; }
.fk-factor-line { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px dashed var(--bd-ctl); border-radius: var(--radius-pill); background: var(--sunk); font-weight: 600; }
.fk-factor-line .fk-icon { width: 18px; height: 18px; color: var(--mut); }

/* ---------- candidatos do 1:N ---------- */
.fk-top1 { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 2px solid var(--ok); border-radius: var(--radius-card); background: var(--card); }
.fk-top1--rev { border-color: var(--rev); }
.fk-top1__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.fk-rank { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-weight: 800; font-variant-numeric: tabular-nums; }
.fk-rank--neu { background: var(--neu-bg); color: var(--neu); }
.fk-top1__name { font-size: 17px; line-height: 22px; font-weight: 700; }
.fk-top1__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.fk-top1__pair figure { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.fk-top1__pair figcaption { font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-top1__pair .fk-photo { aspect-ratio: 1; }
.fk-top1__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; }
.fk-top1__nums > div { display: flex; flex-direction: column; }
.fk-top1__nums dt { font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-top1__nums dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.fk-facebox { position: absolute; left: 16%; top: 12%; width: 68%; height: 78%; border: 2px solid var(--crop); border-radius: 3px; box-shadow: 0 0 0 1px var(--crop-ink), inset 0 0 0 1px var(--crop-ink); pointer-events: none; }
.fk-facewrap { position: relative; width: 84px; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); }
.fk-facewrap > .fk-photo { width: 100%; height: 100%; border-radius: 0; }
.fk-facebox__tag { position: absolute; left: 0; top: 0; padding: 0 5px; border-radius: 0 0 4px 0; background: var(--crop); color: var(--crop-ink); font-size: 11px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.fk-guide-tips { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; padding: 0; list-style: none; }
.fk-guide-tips li { display: flex; align-items: flex-start; gap: 8px; }
.fk-guide-tips .fk-icon { width: 18px; height: 18px; margin-top: 2px; color: var(--pri-tx); }
.fk-photo-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); align-items: start; }
.fk-photo-grid .fk-capture { padding: var(--space-3); }
.fk-photo-grid .fk-sources { grid-template-columns: minmax(0, 1fr); }
.fk-photo-grid .fk-source { min-height: 56px; flex-direction: row; }
.fk-thumb--sm { width: 36px; height: 36px; }
.fk-thumb--sm .fk-photo, .fk-thumb .fk-photo { width: 100%; height: 100%; border-radius: 0; }

/* ---------- comparação lado a lado (R7) ---------- */
.fk-compare { container-type: inline-size; display: flex; flex-direction: column; gap: var(--space-3); }
.fk-compare__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.fk-zoombox { display: inline-flex; align-items: stretch; overflow: hidden; border: 1px solid var(--bd-ctl); border-radius: var(--radius-btn); background: var(--card); }
.fk-zoombox button { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 42px; padding: 0; border: 0; background: none; color: var(--tx); cursor: pointer; font-weight: 600; }
.fk-zoombox button:hover { background: var(--hover); }
.fk-zoombox button:focus-visible { outline-offset: -3px; }
.fk-zoombox button.fk-zoombox__fit { width: auto; padding: 0 12px; border-left: 1px solid var(--bd); font-size: 14px; }
.fk-zoombox output { display: inline-flex; align-items: center; justify-content: center; min-width: 60px; border-left: 1px solid var(--bd); border-right: 1px solid var(--bd); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fk-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: var(--size-touch); padding: 0 14px; border: 1px solid var(--bd-ctl); border-radius: var(--radius-btn); background: var(--card); color: var(--tx); font-weight: 600; cursor: pointer; }
.fk-toggle[aria-pressed="true"] { border-color: var(--pri); background: var(--pri-bg); color: var(--pri-tx); }
.fk-compare__panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.fk-compare__pane { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.fk-compare__pane figcaption { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-compare__pane figcaption b { color: var(--tx); font-weight: 700; }
.fk-compare__view { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-btn); background: var(--camera-bg); cursor: grab; touch-action: none; }
.fk-compare__view.is-dragging { cursor: grabbing; }
.fk-compare__view:focus-visible { outline-offset: 3px; }
.fk-compare__img { position: absolute; inset: 0; transform: translate(var(--fk-x, 0px), var(--fk-y, 0px)) scale(var(--fk-z, 1)); transform-origin: 50% 50%; will-change: transform; }
.fk-compare__img > .fk-photo { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.fk-compare__strip { display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px; }
.fk-compare__thumb { flex: none; width: 60px; height: 60px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.fk-compare__thumb[aria-pressed="true"] { border-color: var(--pri); }
.fk-compare__thumb .fk-photo { width: 100%; height: 100%; aspect-ratio: 1; border-radius: 0; }
.fk-compare__help { font-size: 13px; line-height: 18px; color: var(--mut); }
@container (max-width: 480px) { .fk-compare__panes { gap: var(--space-2); } }

/* ---------- conclusão humana (R7) ---------- */
.fk-verdicts { container-type: inline-size; display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
@container fk (min-width: 820px) { .fk-verdicts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fk-verdict { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) var(--space-4); border: 1px solid var(--bd); border-radius: var(--radius-btn); background: var(--sunk); }
.fk-verdict__who { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.fk-verdict__what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 700; }
.fk-verdict__meta { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-verdict__text { margin-top: 2px; }
.fk-verdict--pending { border-style: dashed; border-color: var(--bd-ctl); background: transparent; }
.fk-conclude { display: flex; flex-direction: column; gap: var(--space-4); }

/* ---------- trilha de auditoria ---------- */
.fk-audit { container-type: inline-size; margin: 0; padding: 0; list-style: none; }
.fk-audit li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--bd); }
.fk-audit li:last-child { border-bottom: 0; }
.fk-audit__when { font-family: var(--font-mono); font-size: 13px; line-height: 22px; color: var(--mut); font-variant-numeric: tabular-nums; }
.fk-audit__what b { font-weight: 600; }
.fk-audit__meta { display: block; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-audit__meta code { font-size: 12px; }
@container (max-width: 480px) { .fk-audit li { grid-template-columns: minmax(0, 1fr); } }

/* ---------- alertas de risco (R7) ---------- */
.fk-risks { container-type: inline-size; margin: 0; padding: 0; list-style: none; }
.fk-risk { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: var(--space-2) var(--space-4); align-items: start; padding: var(--space-4); border-bottom: 1px solid var(--bd); }
.fk-risk:last-child { border-bottom: 0; }
.fk-risk__sev { padding-top: 1px; }
.fk-risk__title { font-weight: 700; }
.fk-risk__detail { margin-top: 2px; }
.fk-risk__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-risk__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.fk-risk__meta .fk-icon { width: 14px; height: 14px; }
.fk-risk__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
@container (max-width: 640px) {
  .fk-risk { grid-template-columns: minmax(0, 1fr); padding: var(--space-3) var(--space-4); }
  .fk-risk__side { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- segredo exibido uma única vez (chave de API, HMAC) ---------- */
.fk-secret { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-card); background: var(--rev-bg); color: var(--tx); }
.fk-secret__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.fk-secret__title > [data-fk-icon] { color: var(--rev); }
.fk-secret__value { display: flex; align-items: center; gap: var(--space-2); padding: 6px 6px 6px 12px; border: 1px solid var(--bd-ctl); border-radius: var(--radius-btn); background: var(--card); }
.fk-secret__value code { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; user-select: all; }

/* ---------- código (SDKs) ---------- */
.fk-code { overflow: hidden; border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--sunk); }
.fk-code__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding-right: var(--space-2); border-bottom: 1px solid var(--bd); background: var(--card); }
.fk-code__bar .fk-tabs__list { border-bottom: 0; }
.fk-code pre { margin: 0; padding: var(--space-4); overflow-x: auto; color: var(--tx); font-family: var(--font-mono); font-size: 13px; line-height: 20px; tab-size: 2; }
.fk-code .tk-k { color: var(--pri-tx); font-weight: 600; }
.fk-code .tk-c { color: var(--mut); }
.fk-code .tk-s { color: var(--tx); }
.fk-code__panel { padding: 0; }

/* ---------- métricas com intervalo de confiança (R9) ---------- */
.fk-metrics { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.fk-metric { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: var(--space-4); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-metric__label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--mut); }
.fk-metric__value { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.fk-metric__ci { font-size: 13px; line-height: 18px; color: var(--tx); font-variant-numeric: tabular-nums; }
.fk-metric__note { font-size: 12px; line-height: 16px; color: var(--mut); }
.fk-split { display: flex; overflow: hidden; height: 28px; gap: 2px; border-radius: var(--radius-btn); }
.fk-split__part { display: flex; flex: var(--fk-share, 1) 1 0; align-items: center; justify-content: center; min-width: 44px; padding: 0 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fk-split__part--ok { background: var(--ok-bg); color: var(--ok); }
.fk-split__part--rev { background: var(--rev-bg); color: var(--rev); }
.fk-split__part--rep { background: var(--rep-bg); color: var(--rep); }
.fk-split-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-split-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- gráficos ---------- */
.fk-chart { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; min-width: 0; }
.fk-chart__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.fk-chart__title { font-weight: 700; }
.fk-chart__sub { font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-chart__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.fk-chart__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; }
.fk-chart__key { display: inline-flex; align-items: center; gap: 6px; }
.fk-chart__swatch { width: 12px; height: 12px; border-radius: 3px; }
.fk-chart__key--line .fk-chart__swatch { width: 16px; height: 3px; border-radius: 2px; }
.fk-chart__plot { position: relative; }
.fk-chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.fk-chart__grid { stroke: var(--bd); stroke-width: 1; }
.fk-chart__base, .fk-chart__ref { stroke: var(--chart-axis); stroke-width: 1; }
.fk-chart__tick { fill: var(--mut); font-family: var(--font-sans); font-size: 12px; font-variant-numeric: tabular-nums; }
.fk-chart__axis-label { fill: var(--mut); font-family: var(--font-sans); font-size: 12px; font-weight: 600; }
.fk-chart__value { fill: var(--tx); font-family: var(--font-sans); font-size: 12px; font-weight: 700; }
.fk-chart__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fk-chart__dot { stroke: var(--card); stroke-width: 2; }
.fk-chart__cross { stroke: var(--mut); stroke-width: 1; pointer-events: none; }
.fk-chart__hit { fill: transparent; outline: none; cursor: crosshair; }
.fk-chart__hit.is-on { fill: var(--tx); fill-opacity: 0.05; }
.fk-chart__hit:focus-visible { stroke: var(--focus); stroke-width: 2; }
.fk-c1 { fill: var(--chart-1); background: var(--chart-1); }
.fk-c2 { fill: var(--chart-2); background: var(--chart-2); }
.fk-c3 { fill: var(--chart-3); background: var(--chart-3); }
.fk-cs1 { stroke: var(--chart-1); }
.fk-cs2 { stroke: var(--chart-2); }
.fk-cs3 { stroke: var(--chart-3); }
.fk-chart__tip {
  position: absolute; left: var(--fk-tip-x, 0px); top: var(--fk-tip-y, 0px); z-index: 2; min-width: 150px; padding: 8px 10px;
  border: 1px solid var(--bd); border-radius: var(--radius-btn); background: var(--card); box-shadow: var(--shadow-pop);
  font-size: 13px; line-height: 18px; pointer-events: none;
}
.fk-chart__tip-title { margin-bottom: 4px; font-weight: 600; color: var(--mut); }
.fk-chart__tip-row { display: flex; align-items: center; gap: 6px; }
.fk-chart__tip-row strong { color: var(--tx); font-variant-numeric: tabular-nums; }
.fk-chart__tip-row span:last-child { color: var(--mut); }
.fk-chart__tip-key { width: 12px; height: 3px; flex: none; border-radius: 2px; }
.fk-chart__table { max-height: 320px; }

/* ---------- documento (relatório ISO) ---------- */
.fk-doc { display: flex; flex-direction: column; gap: var(--space-6); width: 100%; max-width: 860px; margin: 0 auto; padding: var(--space-8); border: 1px solid var(--bd); border-radius: var(--radius-card); background: var(--card); }
.fk-doc__head { display: flex; flex-direction: column; gap: var(--space-2); padding-bottom: var(--space-4); border-bottom: 1px solid var(--bd); }
.fk-doc__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; line-height: 18px; color: var(--mut); }
.fk-doc section { display: flex; flex-direction: column; gap: var(--space-3); }
.fk-doc h2 { font-size: 1.1rem; line-height: 1.35; font-weight: 700; }
.fk-doc p, .fk-doc li { max-width: 72ch; }
.fk-doc ol, .fk-doc ul { display: flex; flex-direction: column; gap: 4px; }
@container fk (max-width: 819.98px) { .fk-doc { padding: var(--space-5) var(--space-4); } }
@media print {
  body { background: #ffffff; }
  .fk-topbar, .fk-sidebar, .fk-veil, .fk-no-print { display: none !important; }
  .fk-app { display: block; }
  .fk-doc { border: 0; padding: 0; max-width: none; }
}
.fk-verdicts--stack { grid-template-columns: minmax(0, 1fr) !important; }
