/* =====================================================================
   Cordel DSBR — linguagem visual "institucional legível"
   Tokens e componentes próprios. Mobile-first: a base é o celular; a mesa
   (≥ 1024px) ganha o rail lateral e colunas. Sem DSGov, sem FontAwesome.
   Vocabulário e regras: DESIGN.md.
   ===================================================================== */

:root {
  /* marca */
  --azul: #1351b4;
  --azul-escuro: #0b3a86;
  --azul-tinta: #e8effa;
  --azul-claro: #dbe6f7;
  --azul-medio: #4a79c9;
  /* neutros (viés frio) */
  --fundo: #f4f6fa;
  --superficie: #ffffff;
  --superficie-2: #f8f9fc;
  --borda: #d5dbe6;
  --borda-forte: #b8c2d3;
  --texto: #1c2433;
  --texto-2: #5b6577;
  --texto-3: #6b7587;
  /* estados (sempre com ícone + texto) */
  --ok: #1a7f37;      --ok-bg: #e6f4ea;
  --atencao: #b45309; --atencao-bg: #fff4e0;
  --erro: #b42318;    --erro-bg: #fdecea;
  /* forma */
  --r-sm: 4px; --r: 6px; --r-md: 8px; --r-lg: 12px;
  --sombra: 0 8px 24px rgba(28, 36, 51, .12);
  /* espaço */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* tipo */
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --t-xs: 12px; --t-sm: 14px; --t-base: 16px; --t-md: 18px; --t-lg: 20px; --t-xl: 24px; --t-2xl: 30px; --t-3xl: 36px;
  --largura-rail: 232px;
  --altura-topo: 56px;
  --altura-tabbar: 64px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font-family: var(--sans); font-size: var(--t-base); line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 600; }
h1 { font-size: var(--t-xl); } h2 { font-size: var(--t-lg); } h3 { font-size: var(--t-base); } h4 { font-size: var(--t-sm); }
p { margin: 0; }
p + p { margin-top: var(--s3); }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--azul-escuro); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding-left: var(--s5); }
dl { margin: 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--superficie-2); border: 1px solid var(--borda); border-radius: var(--r-sm); padding: 1px 5px; }
hr { border: 0; border-top: 1px solid var(--borda); margin: var(--s4) 0; }

.visually-hidden, .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; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--texto-2); }
.dimmer { color: var(--texto-3); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-3); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.pilha { display: flex; flex-direction: column; gap: var(--s4); }
.linha-tags { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* skiplink */
.skiplink { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--azul-escuro); color: #fff; padding: 10px 14px; border-radius: var(--r); text-decoration: none; font-weight: 600; }
.skiplink:focus { top: var(--s2); color: #fff; }

/* ---------- ícones (sprite SVG inline) ---------- */
svg.ic { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- casca do aplicativo (painel e pesquisador) ---------- */
.app { flex: 1; display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.tela-principal { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tela-corpo { flex: 1; width: 100%; padding: var(--s4) var(--s4) calc(var(--altura-tabbar) + var(--s6)); display: flex; flex-direction: column; gap: var(--s4); }
.app.sem-tabbar .tela-corpo { padding-bottom: var(--s6); }
.marca { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; color: var(--azul-escuro); text-decoration: none; white-space: nowrap; }
.marca-sinal { width: 30px; height: 30px; border-radius: 7px; background: var(--azul); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }

/* topo (app bar) */
.topo { position: sticky; top: 0; z-index: 20; background: var(--superficie); border-bottom: 1px solid var(--borda); }
.topo-inner { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); min-height: var(--altura-topo); }
.topo-titulo { flex: 1; min-width: 0; }
.topo-titulo strong { display: block; font-size: var(--t-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-titulo span { display: block; font-size: var(--t-xs); color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .volta { display: inline-flex; align-items: center; gap: 4px; color: var(--azul); font-weight: 600; font-size: var(--t-sm); text-decoration: none; background: none; border: 0; padding: 8px 6px; cursor: pointer; border-radius: var(--r); min-height: 44px; }
.topo .volta:hover { background: var(--azul-tinta); }
.topo .usuario { display: none; font-size: var(--t-sm); color: var(--texto-2); }

/* barra inferior (celular) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--superficie); border-top: 1px solid var(--borda);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a, .tabbar summary {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; min-height: 48px;
  color: var(--texto-2); text-decoration: none; font-size: var(--t-xs); font-weight: 500; border: 0; background: none; border-radius: var(--r); cursor: pointer; list-style: none;
}
.tabbar summary::-webkit-details-marker { display: none; }
.tabbar .ic { width: 22px; height: 22px; }
.tabbar [aria-current="page"], .tabbar details[open] > summary { color: var(--azul); font-weight: 600; }
.tabbar [aria-current="page"] .ic { stroke-width: 2.4; }
.tabbar details { position: static; }
.tabbar .sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--superficie); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--sombra); padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; border-top: 1px solid var(--borda); }
.tabbar .sheet .alca { width: 40px; height: 4px; border-radius: 2px; background: var(--borda-forte); margin: 0 auto var(--s3); }
.tabbar .sheet h2 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); padding: var(--s2) var(--s2) var(--s1); }
.tabbar .sheet a { display: flex; flex-direction: row; align-items: center; gap: var(--s3); padding: 12px 8px; border-radius: var(--r-md); color: var(--texto); font-weight: 500; font-size: var(--t-base); min-height: 48px; }
.tabbar .sheet a:hover { background: var(--superficie-2); }
.tabbar .sheet a .ic { color: var(--azul); width: 20px; height: 20px; }

/* rail (mesa) */
.rail { display: none; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1.5px solid transparent;
  font-weight: 600; font-size: var(--t-base); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s; line-height: 1.2;
}
.btn .ic { width: 18px; height: 18px; }
.btn-primario { background: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-escuro); color: #fff; }
.btn-secundario { background: var(--superficie); color: var(--azul); border-color: var(--azul); }
.btn-secundario:hover { background: var(--azul-tinta); color: var(--azul-escuro); }
.btn-terciario { background: transparent; color: var(--azul); padding: 0 10px; }
.btn-terciario:hover { background: var(--azul-tinta); color: var(--azul-escuro); }
.btn-perigo { background: var(--superficie); color: var(--erro); border-color: var(--erro); }
.btn-perigo:hover { background: var(--erro-bg); color: var(--erro); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #146a2d; color: #fff; }
.btn[disabled], .btn[aria-disabled="true"], .btn.desabilitado { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-pequeno { min-height: 36px; padding: 0 12px; font-size: var(--t-sm); }
.btn-pequeno .ic { width: 16px; height: 16px; }
.btn-bloco { width: 100%; }
.btn-icone { padding: 0; width: 44px; }
.btn-pequeno.btn-icone { width: 36px; }
.acoes, .grupo-acoes { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* ---------- campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > label, .campo > .rotulo, .campo legend { font-size: var(--t-sm); font-weight: 600; color: var(--texto); }
.campo .ajuda, .cordel-form-help { font-size: var(--t-xs); color: var(--texto-2); margin: 0; }
.campo .erro, .erro { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--erro); font-weight: 500; margin: 0; }
.campo .erro .ic { width: 16px; height: 16px; }
.controle,
.campo input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--borda-forte); border-radius: var(--r-md);
  background: var(--superficie); color: var(--texto); font-size: var(--t-base); transition: border-color .12s, box-shadow .12s;
}
.controle::placeholder, .campo input::placeholder { color: var(--texto-3); }
.controle:hover, .campo input:hover, .campo select:hover, .campo textarea:hover { border-color: #97a3b8; }
.controle:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.controle[readonly], .controle:disabled, .campo input[readonly], .campo input:disabled, .campo select:disabled, .campo textarea[readonly] { background: var(--superficie-2); color: var(--texto-2); }
.campo.tem-erro input, .campo.tem-erro select, .campo.tem-erro textarea, .tem-erro .controle { border-color: var(--erro); }
.campo.tem-erro input:focus, .campo.tem-erro select:focus, .campo.tem-erro textarea:focus { box-shadow: 0 0 0 3px var(--erro-bg); }
.campo textarea, textarea.controle { min-height: 96px; resize: vertical; }
.campo select, select.controle {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%235b6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.campo select[multiple] { background-image: none; padding-right: 14px; min-height: 120px; }
.campo input[type="file"] { font-size: var(--t-sm); }
.campo.campo-checkbox { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--borda); border-radius: var(--r-md); background: var(--superficie); min-height: 48px; }
.campo.campo-checkbox input[type="checkbox"] { margin: 3px 0 0; accent-color: var(--azul); width: 18px; height: 18px; flex: none; }
.campo.campo-checkbox > label { font-weight: 500; font-size: var(--t-base); }
.campo.campo-checkbox:has(input:checked) { border-color: var(--azul); background: var(--azul-tinta); }
.campo.campo-checkbox .ajuda, .campo.campo-checkbox .erro { flex-basis: 100%; }
.controle.mono-in { font-family: var(--mono); letter-spacing: .04em; }
.grade-2, .grade-3 { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.grade-2 .largo, .grade-3 .largo, .camadas-publico .largo { grid-column: 1 / -1; }
/* CheckboxSelectMultiple / RadioSelect do Django: cada opção vira uma linha tocável */
.campo > div[id] { display: flex; flex-direction: column; gap: var(--s2); }
.campo > div[id] > div > label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--borda); border-radius: var(--r-md); background: var(--superficie); min-height: 44px; cursor: pointer; font-weight: 500; font-size: var(--t-base); }
.campo > div[id] > div > label:has(input:checked) { border-color: var(--azul); background: var(--azul-tinta); }
.campo > div[id] input[type="checkbox"], .campo > div[id] input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--azul); flex: none; }
.acoes > form, .grupo-acoes > form, .patrimonio-action-group > form { display: contents; }
.tela-corpo [id], .portal-corpo [id] { scroll-margin-top: calc(var(--altura-topo) + 60px); }
.obrigatorio { color: var(--erro); font-weight: 700; }
.cordel-required-note { font-size: var(--t-xs); color: var(--texto-2); }

/* opções (radio/checkbox) como linhas tocáveis */
.opcoes { display: flex; flex-direction: column; gap: var(--s2); }
.opcoes.linha { flex-direction: row; flex-wrap: wrap; }
.opcao { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--borda); border-radius: var(--r-md); background: var(--superficie); cursor: pointer; min-height: 48px; flex: 1; }
.opcao input { margin: 3px 0 0; accent-color: var(--azul); width: 18px; height: 18px; flex: none; }
.opcao:has(input:checked) { border-color: var(--azul); background: var(--azul-tinta); }
.opcao span small { display: block; color: var(--texto-2); font-size: var(--t-xs); }

/* upload */
.upload { border: 1.5px dashed var(--borda-forte); border-radius: var(--r-md); padding: var(--s4); display: flex; align-items: center; gap: var(--s3); background: var(--superficie); flex-wrap: wrap; }
.upload.enviado { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.upload .icone { width: 40px; height: 40px; border-radius: var(--r); background: var(--azul-tinta); color: var(--azul); display: grid; place-items: center; flex: none; }
.upload.enviado .icone { background: #fff; color: var(--ok); }
.upload .icone .ic { width: 20px; height: 20px; }
.upload .texto { flex: 1; min-width: 0; }
.upload .texto strong { display: block; font-size: var(--t-sm); }
.upload .texto span:not(.tag) { display: block; font-size: var(--t-xs); color: var(--texto-2); }

/* ---------- tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-sm); font-size: var(--t-xs); font-weight: 600; letter-spacing: .01em; white-space: nowrap; background: var(--superficie-2); color: var(--texto-2); border: 1px solid var(--borda); vertical-align: middle; }
.tag-ok, .tag-atencao, .tag-erro, .tag-info, .tag-neutra { border-color: transparent; }
.tag-ok::before, .tag-atencao::before, .tag-erro::before, .tag-info::before, .tag-neutra::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-atencao { background: var(--atencao-bg); color: var(--atencao); }
.tag-erro { background: var(--erro-bg); color: var(--erro); }
.tag-info { background: var(--azul-tinta); color: var(--azul-escuro); }
.tag-neutra { background: var(--superficie-2); color: var(--texto-2); border-color: var(--borda); }

/* rótulo de camada do domínio (instrumento / projeto / contrato) */
.camada { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul-escuro); }
.camada::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--azul); }
.camada.projeto::before { background: var(--azul-escuro); }
.camada.contrato::before { background: var(--azul-medio); }

/* ---------- cartões e listas ---------- */
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); min-width: 0; }
.cartao-cabeca { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--borda); flex-wrap: wrap; }
.cartao-cabeca h2, .cartao-cabeca h3 { font-size: var(--t-base); }
.cartao-corpo { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.cartao-corpo > h2:first-child, .cartao-corpo > h3:first-child { font-size: var(--t-md); }
.cartao-corpo > .tabela-wrap { margin: 0 calc(-1 * var(--s4)); border-left: 0; border-right: 0; border-radius: 0; }
.cartao-corpo > .tabela-wrap:last-child { margin-bottom: calc(-1 * var(--s4)); border-bottom: 0; }
.lista { display: flex; flex-direction: column; }
.lista-item { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--borda); text-decoration: none; color: inherit; }
.lista-item:last-child { border-bottom: 0; }
.lista-item.toque { cursor: pointer; }
.lista-item.toque:hover { background: var(--superficie-2); }
.lista .lista-item { padding-left: var(--s4); padding-right: var(--s4); }
.lista-item .conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lista-item .titulo { font-weight: 600; font-size: var(--t-base); }
.lista-item .meta { font-size: var(--t-sm); color: var(--texto-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lista-item .seta { color: var(--texto-3); flex: none; }
.lista-item .direita { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

/* definição (rótulo/valor) */
.defs { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin: 0; }
.defs > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.defs dt { font-size: var(--t-xs); color: var(--texto-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.defs dd { margin: 0; font-size: var(--t-base); overflow-wrap: anywhere; }
.defs .largo { grid-column: 1 / -1; }

/* avisos */
.aviso { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); border: 1px solid transparent; align-items: flex-start; }
.aviso .ic, .aviso .icon { flex: none; margin-top: 2px; }
.aviso .icon { display: flex; }
.aviso .content, .aviso .conteudo { flex: 1; min-width: 0; }
.aviso strong { font-weight: 600; }
.aviso p + p { margin-top: var(--s2); }
.aviso ul { padding-left: var(--s4); }
.aviso h2, .aviso h3 { font-size: var(--t-base); margin-bottom: var(--s1); }
.aviso-info { background: var(--azul-tinta); color: var(--azul-escuro); }
.aviso-atencao { background: var(--atencao-bg); color: #6b3400; }
.aviso-erro { background: var(--erro-bg); color: #7a1710; }
.aviso-ok { background: var(--ok-bg); color: #0f5323; }
.aviso a { color: inherit; font-weight: 600; }

/* tabelas */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--borda); border-radius: var(--r-md); background: var(--superficie); max-width: 100%; }
.tabela { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tabela-wrap > .tabela { min-width: 40rem; }
.tabela-wrap > .tabela.estreita { min-width: 0; }
.tabela th, .tabela td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--borda); vertical-align: top; }
.tabela th { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--texto-3); font-weight: 600; background: var(--superficie-2); white-space: nowrap; }
.tabela tbody tr:last-child td, .tabela tbody tr:last-child th { border-bottom: 0; }
.tabela tbody th { font-size: inherit; text-transform: none; letter-spacing: 0; white-space: normal; background: none; color: var(--texto); font-weight: 600; }
.tabela caption { text-align: left; padding: 10px 14px; font-weight: 600; font-size: var(--t-sm); caption-side: top; }
.cartao-cabeca > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tabela td.num, .tabela th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela td small, .cordel-table-wrap td small { display: block; color: var(--texto-2); }
.tabela tfoot td { font-weight: 600; background: var(--superficie-2); }
.tabela td form { display: inline; }
.cartao-corpo > .lista { margin: 0 calc(-1 * var(--s4)); }
.cordel-table-action { white-space: nowrap; }

/* ---------- filtros / busca / paginação ---------- */
.busca { position: relative; }
.busca .controle, .busca input { padding-left: 42px; }
.busca .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-3); }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--borda-forte); background: var(--superficie); font-size: var(--t-sm); font-weight: 500; cursor: pointer; color: var(--texto); text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--azul-escuro); border-color: var(--azul-escuro); color: #fff; }
.filtros { display: grid; grid-template-columns: 1fr; gap: var(--s3); align-items: end; }
.filtros .acoes { display: flex; gap: var(--s2); }
.cordel-filter { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s4); }
.cordel-filter-actions { display: flex; gap: var(--s2); align-items: flex-end; flex-wrap: wrap; }
.cordel-result-summary { color: var(--texto-2); font-size: var(--t-sm); }
.paginacao { display: flex; align-items: center; justify-content: center; gap: var(--s1); flex-wrap: wrap; }
.paginacao ul { display: contents; list-style: none; padding: 0; margin: 0; }
.paginacao a, .paginacao span.pagina { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; border-radius: var(--r); text-decoration: none; color: var(--texto-2); font-weight: 500; font-size: var(--t-sm); }
.paginacao a:hover { background: var(--azul-tinta); color: var(--azul-escuro); }
.paginacao [aria-current="page"] { background: var(--azul-escuro); color: #fff; font-weight: 600; }
.paginacao [aria-disabled="true"] { opacity: .4; }

/* ---------- cabeçalho de página e seções ---------- */
.pagina-cabeca, .cordel-page-actions, .cordel-detail-heading { display: flex; flex-direction: column; gap: var(--s2); }
.pagina-cabeca .acoes, .cordel-page-actions .acoes { display: flex; gap: var(--s2); flex-wrap: wrap; }
.cordel-page-lead { color: var(--texto-2); max-width: 70ch; }
.cordel-back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; font-size: var(--t-sm); min-height: 44px; }
.cordel-section { display: flex; flex-direction: column; gap: var(--s3); }
.cordel-section-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.cordel-stack { display: flex; flex-direction: column; gap: var(--s4); }
.cordel-note, .cordel-attention { font-size: var(--t-sm); color: var(--texto-2); }
.cordel-attention { color: var(--texto); font-weight: 500; display: block; max-width: 32ch; }
.cordel-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s6) var(--s4); text-align: center; color: var(--texto-2); background: var(--superficie); border: 1px dashed var(--borda-forte); border-radius: var(--r-md); }
.cordel-empty .ic { width: 28px; height: 28px; color: var(--azul); }
.cordel-history-list, .cordel-reference-list { padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s1); font-size: var(--t-sm); }
.cordel-reference-list small, .cordel-history-list small { display: block; color: var(--texto-2); font-size: var(--t-xs); }
.cordel-definition-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin: 0; }
.cordel-definition-grid > div { display: flex; flex-direction: column; gap: 2px; }
.cordel-definition-grid dt { font-size: var(--t-xs); color: var(--texto-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cordel-definition-grid dd { margin: 0; overflow-wrap: anywhere; }
.cordel-metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0; }
.cordel-metric-grid > div { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s3) var(--s4); }
.cordel-metric-grid dt { font-size: var(--t-xl); font-weight: 700; color: var(--azul-escuro); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cordel-metric-grid dd { margin: 4px 0 0; font-size: var(--t-sm); color: var(--texto-2); }

/* resumo de projeto / fatos */
.resumo-projeto { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.resumo-projeto h1 { font-size: var(--t-lg); }
.fatos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0; }
.fatos > div { background: var(--superficie-2); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.fatos dt { font-size: var(--t-xs); color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fatos dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* formulários (páginas) */
.cordel-form-card { width: 100%; max-width: 54rem; }
.cordel-form-card form, .formulario { display: flex; flex-direction: column; gap: var(--s4); }
.cordel-form-field { margin: 0; }
.cordel-form-actions { display: flex; flex-direction: column-reverse; gap: var(--s2); border-top: 1px solid var(--borda); padding-top: var(--s4); }
.cordel-form-actions .btn { width: 100%; white-space: normal; text-align: center; }
.tabela td .execucao { min-width: 120px; }

/* ---------- navegação por seções (detalhe) e etapas ---------- */
.secoes { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--borda); background: var(--superficie); position: sticky; top: var(--altura-topo); z-index: 15; padding: 0 var(--s4); margin: 0 calc(-1 * var(--s4)); }
.secoes::-webkit-scrollbar { display: none; }
.secoes a, .secoes button { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 10px; font-weight: 500; color: var(--texto-2); cursor: pointer; font-size: var(--t-sm); min-height: 44px; text-decoration: none; }
.secoes [aria-current="true"], .secoes [aria-current="page"] { color: var(--azul-escuro); border-bottom-color: var(--azul); font-weight: 600; }
.secao-nav { display: flex; gap: var(--s2); }
.secao-nav .btn { flex: 1; min-width: 0; }
.secao-nav .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.etapa-topo { background: var(--superficie); border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 20; margin: calc(-1 * var(--s4)) calc(-1 * var(--s4)) 0; }
.app .etapa-topo { top: var(--altura-topo); }
.etapa-topo .volta { display: inline-flex; align-items: center; gap: 4px; color: var(--azul); font-weight: 600; text-decoration: none; min-height: 32px; }
.etapa-form { display: flex; flex-direction: column; gap: var(--s4); }
.upload .erro { flex-basis: 100%; }
.upload input[type="file"] { flex: 1 1 200px; min-width: 0; font-size: var(--t-sm); }
.etapa-topo .linha1 { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 10px var(--s4) 0; font-size: var(--t-xs); color: var(--texto-2); }
.etapa-topo .linha2 { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 4px var(--s4) 12px; }
.etapa-topo .linha2 h1 { font-size: var(--t-lg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etapa-topo .avanca { flex: none; }
.progresso { height: 4px; background: var(--borda); }
.progresso > span { display: block; height: 100%; background: var(--azul); border-radius: 0 3px 3px 0; }
.etapa-nav { position: sticky; bottom: 0; z-index: 30; background: var(--superficie); border-top: 1px solid var(--borda); padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; margin: 0 calc(-1 * var(--s4)); }
.etapa-nav .dica { font-size: var(--t-xs); color: var(--texto-3); text-align: center; }
/* o destino é sempre nomeado por inteiro: no celular os botões empilham (primário em cima) */
.etapa-nav .botoes { display: flex; flex-direction: column-reverse; gap: var(--s2); }
.etapa-nav .botoes .btn { min-width: 0; width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
@media (min-width: 640px) {
  .etapa-nav .botoes { flex-direction: row; }
  .etapa-nav .botoes .btn { width: auto; }
  .etapa-nav .botoes .btn-secundario { flex: 1; }
  .etapa-nav .botoes .btn-primario { flex: 1.4; }
}
.hub-item { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s3) var(--s4); cursor: pointer; color: inherit; min-height: 64px; text-decoration: none; }
.hub-item:hover { border-color: var(--azul); }
.hub-item .numero { width: 30px; height: 30px; border-radius: 50%; background: var(--azul-tinta); color: var(--azul-escuro); display: grid; place-items: center; font-weight: 700; font-size: var(--t-sm); flex: none; }
.hub-item.feito .numero { background: var(--ok-bg); color: var(--ok); }
.hub-item .conteudo { flex: 1; min-width: 0; }
.hub-item .conteudo strong { display: block; font-size: var(--t-base); }
.hub-item .conteudo span { display: block; font-size: var(--t-xs); color: var(--texto-2); }
.hub-item .seta { color: var(--texto-3); flex: none; }

/* ---------- medidas (barras de uma série) e varal (linha do tempo) ---------- */
.medidas { display: flex; flex-direction: column; gap: 10px; }
.medida { display: grid; grid-template-columns: 1fr; gap: 4px; }
.medida .rot { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); font-size: var(--t-sm); }
.medida .rot strong { font-weight: 600; }
.medida .rot .val { font-variant-numeric: tabular-nums; color: var(--texto); font-weight: 600; white-space: nowrap; }
.medida .trilho { height: 20px; background: var(--superficie-2); border-radius: 4px; position: relative; overflow: hidden; }
.medida .barra { position: absolute; left: 0; top: 0; bottom: 0; background: var(--azul); border-radius: 0 4px 4px 0; }
.medida.destaque .barra { background: var(--azul-escuro); }
.hero-num { font-size: var(--t-3xl); font-weight: 700; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.execucao { display: flex; flex-direction: column; gap: 6px; }
.execucao .trilho { height: 10px; background: var(--azul-claro); border-radius: 5px; overflow: hidden; }
.execucao .barra { height: 100%; background: var(--azul); border-radius: 5px; }
.execucao .legenda { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--texto-2); font-variant-numeric: tabular-nums; }

.varal { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: flex; flex-direction: column; gap: var(--s4); }
.varal::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--borda-forte); border-radius: 1px; }
.varal li { position: relative; }
.varal li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--azul); border: 2px solid var(--superficie); box-shadow: 0 0 0 2px var(--azul); }
.varal li.saida::before { background: var(--atencao); box-shadow: 0 0 0 2px var(--atencao); }
.varal li.marco::before { background: var(--superficie); box-shadow: 0 0 0 2px var(--texto-3); }
.varal .data { font-size: var(--t-xs); color: var(--texto-3); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .04em; }
.varal .titulo { font-weight: 600; }
.varal .desc { font-size: var(--t-sm); color: var(--texto-2); }
.varal .valor { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- autenticação ---------- */
.auth { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: var(--s6) var(--s4); }
.auth-cartao { width: 100%; max-width: 420px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-lg); padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.auth-marca { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; }
.auth-marca .marca-sinal { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
.auth-marca strong { font-size: var(--t-md); color: var(--azul-escuro); }
.auth h1 { text-align: center; font-size: var(--t-xl); }
.auth .sub { text-align: center; color: var(--texto-2); font-size: var(--t-sm); }
.auth form { display: flex; flex-direction: column; gap: var(--s4); }
.auth .links { text-align: center; font-size: var(--t-sm); display: flex; flex-direction: column; gap: var(--s2); }

/* ---------- portal público ---------- */
.portal { flex: 1; display: flex; flex-direction: column; }
.portal-topo { background: var(--azul-escuro); color: #fff; }
.portal-topo .inner { max-width: 1120px; margin: 0 auto; padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.portal-topo .marca { color: #fff; }
.portal-topo .marca .marca-sinal { background: #fff; color: var(--azul-escuro); }
.portal-topo nav { margin-left: auto; display: flex; gap: var(--s3); font-size: var(--t-sm); flex-wrap: wrap; }
.portal-topo nav a { color: #fff; text-decoration: none; opacity: .9; padding: 6px 2px; border-bottom: 2px solid transparent; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.portal-topo nav a:hover { opacity: 1; color: #fff; }
.portal-topo nav a[aria-current="page"] { border-bottom-color: #fff; opacity: 1; }
.portal-hero { background: var(--superficie); border-bottom: 1px solid var(--borda); }
.portal-hero .inner { max-width: 1120px; margin: 0 auto; padding: var(--s5) var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.portal-hero h1 { font-size: var(--t-2xl); }
.portal-hero p { color: var(--texto-2); max-width: 62ch; }
.portal-corpo { max-width: 1120px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); display: flex; flex-direction: column; gap: var(--s4); width: 100%; flex: 1; }
.portal-corpo.portal-avisos { padding-bottom: 0; flex: 0 0 auto; }
.portal-main { display: flex; flex-direction: column; flex: 1; }
.portal-rodape { border-top: 1px solid var(--borda); background: var(--superficie); color: var(--texto-2); font-size: var(--t-xs); margin-top: auto; }
.portal-rodape .inner { max-width: 1120px; margin: 0 auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.portal-lista { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.projeto-publico { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); text-decoration: none; color: inherit; }
.projeto-publico:hover { border-color: var(--azul); color: inherit; }
.projeto-publico h2 { font-size: var(--t-md); color: var(--azul-escuro); }
.projeto-publico .fatos { grid-template-columns: 1fr 1fr; }
.camadas-publico { display: grid; grid-template-columns: 1fr; gap: var(--s4); }

/* ---------- patrimônio (superfícies Operate) ---------- */
.patrimonio-shortcuts { display: grid; gap: var(--s2); grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.patrimonio-shortcuts a { display: flex; align-items: center; gap: var(--s3); background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); color: var(--texto); padding: var(--s3) var(--s4); text-decoration: none; min-height: 64px; }
.patrimonio-shortcuts a:hover { border-color: var(--azul); }
.patrimonio-shortcuts .ic { color: var(--azul); width: 22px; height: 22px; }
.patrimonio-shortcuts a > div { min-width: 0; }
.patrimonio-shortcuts span { display: block; font-weight: 600; }
.patrimonio-shortcuts small { display: block; color: var(--texto-2); font-size: var(--t-xs); }
.patrimonio-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--borda); border: 1px solid var(--borda); border-radius: var(--r-md); overflow: hidden; margin: 0; }
.patrimonio-summary > div { background: var(--superficie); padding: var(--s3) var(--s4); }
.patrimonio-summary dt { font-size: var(--t-xs); color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.patrimonio-summary dd { margin: 2px 0 0; font-size: var(--t-xl); font-weight: 700; color: var(--azul-escuro); font-variant-numeric: tabular-nums; line-height: 1.1; }
.patrimonio-warning h2 { font-size: var(--t-base); }
.patrimonio-dashboard-sections { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.patrimonio-plain-list { list-style: none; margin: 0; padding: 0; }
.patrimonio-plain-list li { border-bottom: 1px solid var(--borda); padding: var(--s3) 0; display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.patrimonio-plain-list li:last-child { border-bottom: 0; }
.patrimonio-plain-list small, .patrimonio-table-detail { display: block; color: var(--texto-2); font-size: var(--t-xs); }
.patrimonio-action-group { display: flex; flex-wrap: wrap; gap: var(--s2); }
.patrimonio-action-group .btn { width: 100%; }
.patrimonio-attention { font-weight: 600; }
.patrimonio-cancelled { color: var(--texto-3); text-decoration: line-through; }

/* ---------- inventário do pesquisador ---------- */
.inventario-response-heading, .inventario-form-heading { display: flex; flex-direction: column; gap: var(--s2); }
.inventario-round-list, .inventario-equipment-list { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
.inventario-equipment { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.inventario-equipment-title { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.inventario-submit { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.inventario-submit .btn { width: 100%; }
.inventario-guided-form { display: flex; flex-direction: column; gap: var(--s4); }
.inventario-guided-form > section { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--r-md); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.inventario-map-actions { display: flex; flex-direction: column; gap: var(--s2); }
.inventario-map-actions span { color: var(--texto-2); font-size: var(--t-sm); }
.inventario-map { border: 1px solid var(--borda); border-radius: var(--r-md); height: 20rem; max-height: 60vh; width: 100%; }

/* ---------- compatibilidade com a grade e utilitários antigos ---------- */
.container, .container-lg { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); }
.tela-corpo .container, .tela-corpo .container-lg, .portal-corpo .container, .portal-corpo .container-lg { padding: 0; max-width: none; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
.row > [class*="col-"], .row > .col { grid-column: span 12; min-width: 0; }
.text-weight-semi-bold { font-weight: 600; }
.text-primary-default { color: var(--azul-escuro); }
.text-up-04 { font-size: var(--t-xl); }
.text-up-01 { font-size: var(--t-md); }
.text-down-01 { font-size: var(--t-sm); }
.mr-2 { margin-right: var(--s2); } .my-2 { margin-top: var(--s2); margin-bottom: var(--s2); } .py-3 { padding-top: var(--s3); padding-bottom: var(--s3); }
.mb-2 { margin-bottom: var(--s2); } .mt-2 { margin-top: var(--s2); } .mb-3 { margin-bottom: var(--s3); } .mt-3 { margin-top: var(--s3); }

/* ---------- mesa (≥ 640px): duas colunas onde cabe ---------- */
@media (min-width: 640px) {
  .grade-2 { grid-template-columns: 1fr 1fr; }
  .grade-3 { grid-template-columns: 1fr 1fr 1fr; }
  .defs, .cordel-definition-grid { grid-template-columns: 1fr 1fr; }
  .fatos { grid-template-columns: repeat(4, 1fr); }
  .pagina-cabeca, .cordel-page-actions, .cordel-detail-heading { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .cordel-form-actions { flex-direction: row; justify-content: flex-end; }
  .cordel-form-actions .btn, .patrimonio-action-group .btn, .inventario-submit .btn { width: auto; }
  .filtros { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .cordel-metric-grid { grid-template-columns: repeat(4, 1fr); }
  .patrimonio-shortcuts { grid-template-columns: repeat(3, 1fr); }
  .patrimonio-summary { grid-template-columns: repeat(4, 1fr); }
  .patrimonio-dashboard-sections { grid-template-columns: 1fr 1fr; }
  .inventario-round-list { grid-template-columns: 1fr 1fr; }
  .inventario-map-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .inventario-map-actions span { flex-basis: 100%; }
  .inventario-map { height: 24rem; }
  .auth { align-items: center; }
  .row > .col-sm-6 { grid-column: span 6; }
  .row > .col-sm-4 { grid-column: span 4; }
  .row > .col-sm-3 { grid-column: span 3; }
}

@media (min-width: 768px) {
  .portal-lista { grid-template-columns: 1fr 1fr; }
  .camadas-publico { grid-template-columns: 1fr 1fr; }
  .row > .col-md-6 { grid-column: span 6; }
  .row > .col-md-4 { grid-column: span 4; }
  .row > .col-md-3 { grid-column: span 3; }
  .row > .col-md-2 { grid-column: span 2; }
  .row > .col-md-1 { grid-column: span 1; }
  .row > .col-md-8 { grid-column: span 8; }
  .row > .col-md-12 { grid-column: span 12; }
}

/* ---------- mesa larga (≥ 1024px): rail no lugar da barra inferior ---------- */
@media (min-width: 1024px) {
  .app.com-rail { flex-direction: row; align-items: stretch; }
  .app.com-rail .tabbar { display: none; }
  .app.com-rail .tela-corpo { padding: var(--s5) var(--s6) var(--s7); max-width: 1280px; }
  .rail {
    display: flex; flex-direction: column; gap: 2px; width: var(--largura-rail); flex: none;
    background: var(--superficie); border-right: 1px solid var(--borda); padding: var(--s4) var(--s3);
    position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto;
  }
  .rail .marca { padding: var(--s2) var(--s2) var(--s4); }
  .rail a { display: flex; align-items: center; gap: var(--s3); padding: 9px 12px; border-radius: var(--r-md); color: var(--texto-2); text-decoration: none; font-weight: 500; font-size: var(--t-sm); min-height: 40px; }
  .rail a:hover { background: var(--fundo); color: var(--texto); }
  .rail a[aria-current="page"] { background: var(--azul-tinta); color: var(--azul-escuro); font-weight: 600; }
  .rail .ic { width: 20px; height: 20px; }
  .rail .rail-sep { height: 1px; background: var(--borda); margin: var(--s3) var(--s2); }
  .rail .rail-grupo { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); font-weight: 600; padding: var(--s3) var(--s3) var(--s1); }
  .rail .rail-usuario { margin-top: auto; padding: var(--s3) var(--s2) 0; font-size: var(--t-xs); color: var(--texto-3); border-top: 1px solid var(--borda); display: flex; flex-direction: column; gap: var(--s1); }
  .rail .rail-usuario a { padding: 6px 8px; min-height: 36px; }
  .topo .usuario { display: block; }
  .secoes { top: 0; }
  .patrimonio-shortcuts { grid-template-columns: repeat(6, 1fr); }
  .row > .col-lg-6 { grid-column: span 6; }
  .row > .col-lg-4 { grid-column: span 4; }
  .row > .col-lg-3 { grid-column: span 3; }
  .row > .col-lg-8 { grid-column: span 8; }
}

@media print {
  .tabbar, .rail, .topo, .portal-topo nav, .skiplink { display: none !important; }
  body { background: #fff; }
  .tela-corpo { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* --- Documentação para a Fapex: conferência e devolutiva --- */
.lista-item.conferencia { flex-wrap: wrap; }
.lista-item.conferencia .conteudo { flex: 1 1 320px; }
.lista-item.conferencia .direita { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); margin-left: auto; }
.lista-item.conferencia .direita .acoes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.lista-item.conferencia .cordel-attention { max-width: none; }
.lista-item.estado-devolvido, .lista-item.estado-vencido { background: var(--atencao-bg); }
.devolver-detalhe { border-bottom: 1px solid var(--borda); background: var(--superficie-2); }
.devolver-detalhe > summary { list-style: none; }
.devolver-detalhe > summary::-webkit-details-marker { display: none; }
.devolver-detalhe .formulario { display: flex; flex-direction: column; gap: var(--s3); }
.devolver-detalhe .opcoes.linha .opcao { flex: 1 1 160px; min-height: 40px; padding: 8px 12px; }
.upload.devolvido { border-color: var(--atencao); background: var(--atencao-bg); }
.upload.devolvido .icone { background: #fff; color: var(--atencao); }
.upload .cordel-attention { flex-basis: 100%; max-width: none; margin-top: 4px; }
@media (max-width: 639px) {
  .lista-item.conferencia .direita { width: 100%; justify-content: flex-start; margin-left: 0; }
}
