/* FLUXUS 2.0 — Intelligent Medical Workflows
   Identidade visual. Os nomes de classe são os mesmos da versão anterior (o app.js depende deles). */

@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* marca */
  --navy: #172B3A; --navy-2: #21394B; --navy-3: #0F1E29; --slate: #496779; --slate-claro: #8FB0C3;
  --off: #F0EEE9; --off-2: #E8E5DE; --branco: #FFFFFF; --cinza: #8A9298; --cinza-txt: #687177; --borda-campo: #948F86;
  /* aplicação (nomes antigos mantidos) */
  --bg: var(--off); --card: var(--branco); --txt: #1C2B36; --muted: #5B6870; --borda: #E2DFD7; --borda-forte: #CBC6BB;
  --pri: var(--navy); --pri-esc: var(--navy-3); --pri-claro: #E7ECEF;
  --verm: #9B3B33; --verm-bg: #F7E7E4; --amar: #7A5612; --amar-bg: #F6EEDC; --verde: #2F6B4F; --verde-bg: #E4EFE8;
  --info: #2E5A78; --info-bg: #E3ECF2;
  --raio: 14px; --raio-p: 10px;
  --sombra: 0 1px 2px rgba(23,43,58,.04), 0 1px 3px rgba(23,43,58,.05);
  --sombra-alta: 0 12px 32px rgba(15,30,41,.16);
  --foco: 0 0 0 3px rgba(73,103,121,.28);
  --menu-w: 248px; --menu-rec: 76px;
  --t-rapido: .15s; --t-medio: .22s; --curva: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 500 15px/1.5 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--txt);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--slate); text-underline-offset: 2px; }
h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 .2rem; color: var(--navy); }
h2 { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate);
  margin: 1.8rem 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--borda); }
h3 { font-size: .98rem; font-weight: 700; margin: 0 0 .5rem; color: var(--navy); }
code { background: var(--off-2); padding: 0 5px; border-radius: 5px; }
.muted { color: var(--muted); } .small, small { font-size: .84rem; }
.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; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: 8px; }

/* ---------- Marca ---------- */
.marca { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.marca img, .marca svg { flex: none; display: block; }
.wm { font-weight: 700; letter-spacing: .16em; line-height: 1; white-space: nowrap; }
.wm-sub { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--cinza-txt); margin-top: 6px; white-space: nowrap; }

/* ---------- Estrutura: menu lateral ---------- */
body.app-shell { display: grid; grid-template-columns: var(--menu-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--t-medio) var(--curva); }
body.app-shell.menu-recolhido { grid-template-columns: var(--menu-rec) minmax(0, 1fr); }
.menu { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #C9D5DC; display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 2px; overflow: hidden; z-index: 30; }
.menu-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 22px 8px; min-height: 58px; }
.menu-topo .wm { color: #fff; font-size: 1.02rem; }
.menu-recolher { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: #8FA3B0; cursor: pointer; transition: background var(--t-rapido), color var(--t-rapido); }
.menu-recolher:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-recolher svg { transition: transform var(--t-medio) var(--curva); }
.menu nav { display: flex; flex-direction: column; gap: 2px; }
.menu nav a, .menu .sair { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #C9D5DC; text-decoration: none; font-size: .93rem; font-weight: 600; white-space: nowrap; transition: background var(--t-rapido), color var(--t-rapido); }
.menu nav a:hover, .menu .sair:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu nav a.ativo { background: rgba(255,255,255,.11); color: #fff; }
.menu nav a.ativo::before { content: ''; position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--slate-claro); }
.menu nav a { position: relative; }
.menu svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-grupo { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #7F96A4; padding: 16px 12px 6px; white-space: nowrap; font-weight: 700; }
.menu-base { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: grid; gap: 4px; }
.quem-sou { display: flex; align-items: center; gap: 10px; padding: 6px 8px; white-space: nowrap; min-width: 0; }
.quem-sou > div { min-width: 0; }
.quem-sou b { display: block; color: #fff; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
.quem-sou small { color: #8FA3B0; font-size: .75rem; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--slate); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; letter-spacing: .02em; }
.menu .rot, .menu-topo .wm, .menu-grupo, .quem-sou > div { transition: opacity var(--t-rapido); }
body.menu-recolhido .menu .rot, body.menu-recolhido .menu-topo .wm, body.menu-recolhido .menu-grupo, body.menu-recolhido .quem-sou > div { opacity: 0; pointer-events: none; }
body.menu-recolhido .menu-topo { flex-direction: column; gap: 12px; padding: 4px 0 18px; }
body.menu-recolhido .menu-topo .wm { display: none; }
body.menu-recolhido .menu-recolher svg { transform: rotate(180deg); }
body.menu-recolhido .menu nav a, body.menu-recolhido .menu .sair { justify-content: flex-start; padding-left: 16px; }
.barra-movel, .menu-veu { display: none; }

/* ---------- Conteúdo ---------- */
.principal { min-width: 0; }
.conteudo { max-width: 1320px; width: 100%; margin: 0 auto; padding: 30px 32px 72px; min-width: 0; }
.cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.cab p { margin: .2rem 0 0; }
.cab-acoes { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.cab-acoes .compacto { min-width: 180px; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; padding: .5rem 1rem; border-radius: var(--raio-p); border: 1px solid var(--borda-forte);
  background: #fff; color: var(--txt); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--t-rapido), border-color var(--t-rapido), color var(--t-rapido), transform .08s; }
.btn:hover { border-color: #A9A397; background: #FBFAF8; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primario { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primario:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-sec { background: var(--pri-claro); border-color: transparent; color: var(--navy); }
.btn-sec:hover { background: #DCE4E9; }
.btn-perigo { color: var(--verm); }
.btn-perigo:hover { border-color: #E4C3BE; background: var(--verm-bg); }
.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .84rem; border-radius: 8px; }
.btn-grande { min-height: 48px; padding: .8rem 1.4rem; font-size: 1rem; }
.link { background: none; border: 0; color: var(--slate); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.link:hover { color: var(--navy); }

/* ---------- Painel ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 1.1rem; }
.card-num { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.05rem 1.2rem; }
.card-num b { display: block; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); line-height: 1.15; }
.card-num span { color: var(--muted); font-size: .86rem; font-weight: 600; }
.card-num.alerta b { color: var(--verm); }
.barra { margin: .4rem 0 .8rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.barra input { max-width: 380px; }
.barra select { margin-left: 0; width: auto; min-width: 200px; }
.tabela-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th, .tabela td { padding: .78rem .9rem; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: middle; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr { transition: background var(--t-rapido); }
.tabela tbody tr:hover { background: #FBFAF7; }
.tabela th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--cinza-txt); background: #FAF9F6; }
.tabela .acoes { white-space: nowrap; text-align: right; }
.tabela .vazio { text-align: center; color: var(--muted); padding: 2.4rem; }
.hist { margin-top: 1.4rem; } .hist summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: .6rem; }

.tag { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #ECEEF0; color: #4E5A62; white-space: nowrap; }
.tag.cinza { background: #ECEEF0; color: #4E5A62; }
.tag.verde, .st-deferido { background: var(--verde-bg); color: var(--verde); }
.tag.amar, .st-pronto { background: var(--amar-bg); color: var(--amar); }
.tag.verm, .st-indeferido { background: var(--verm-bg); color: var(--verm); }
.st-entregue { background: var(--info-bg); color: var(--info); }

.alert { padding: .8rem 1rem; border-radius: var(--raio-p); margin: .7rem 0; border: 1px solid transparent; font-weight: 500; }
.alert-erro { background: var(--verm-bg); color: var(--verm); border-color: #EBCFCA; }
.alert-aviso { background: var(--amar-bg); color: var(--amar); border-color: #EBDDBC; }
.alert-ok { background: var(--verde-bg); color: var(--verde); border-color: #C9DED1; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.3rem; align-items: start; }
.lateral { position: sticky; top: 24px; display: grid; gap: .9rem; max-height: calc(100vh - 48px); overflow: auto; }
.box { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem 1.1rem; }
.box p { margin: .3rem 0; }
.lista-erros, .lista-avisos { margin: .3rem 0; padding-left: 1.1rem; font-size: .84rem; }
.lista-erros li { color: var(--verm); margin: .2rem 0; }
.lista-avisos li { color: var(--amar); margin: .2rem 0; }
.ok-msg { color: var(--verde); font-weight: 700; }
.passos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: .9rem; counter-reset: passo; }
.passos button { border: 1px solid var(--borda); background: #fff; border-radius: 999px; padding: .45rem .95rem; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600; color: var(--muted);
  transition: background var(--t-rapido), color var(--t-rapido), border-color var(--t-rapido); }
.passos button:hover { border-color: var(--borda-forte); color: var(--navy); }
.passos button.ativo { background: var(--navy); color: #fff; border-color: var(--navy); }
.painel-form { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: .5rem 1.4rem 1.5rem; margin-bottom: 1.1rem; }
.painel-form > h2:first-child, .importar h2 { margin-top: 1rem; }
.nav-passos { display: flex; justify-content: space-between; gap: .6rem; }

/* ---------- Formulários ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem 1.1rem; }
.grid .g2, label.g2, fieldset.g2 { grid-column: span 2; }
.full { display: block; margin-top: .9rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-size: .84rem; font-weight: 600; color: #34434E; }
input, select, textarea { font: inherit; font-weight: 500; font-size: .95rem; min-height: 42px; padding: .55rem .75rem; border: 1px solid var(--borda-campo); border-radius: var(--raio-p);
  background: #FCFBF9; color: var(--txt); width: 100%; transition: border-color var(--t-rapido), box-shadow var(--t-rapido), background var(--t-rapido); }
input:hover, select:hover, textarea:hover { border-color: #7E796F; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--slate); box-shadow: var(--foco); background: #fff; }
input::placeholder, textarea::placeholder { color: var(--cinza-txt); }
input:disabled, select:disabled, textarea:disabled { background: #F3F1EC; color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--navy); cursor: pointer; }
textarea { resize: vertical; min-height: 0; line-height: 1.5; }
.req { color: var(--verm); }
.dica { font-weight: 500; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; }
fieldset legend { font-size: .84rem; font-weight: 600; color: #34434E; padding: 0; margin-bottom: .35rem; width: 100%; }
/* rótulo + asterisco na mesma linha: o rótulo vira bloco e os controles descem com espaçamento próprio */
label:not(.chk) { display: block; }
label:not(.chk) > input, label:not(.chk) > select, label:not(.chk) > textarea { display: block; margin-top: .35rem; }
label:not(.chk) > .un { display: flex; margin-top: .35rem; }
label:not(.chk) > small, label:not(.chk) > .dica { display: block; margin-top: .3rem; font-size: .8rem; }
.req { margin-left: .15rem; }
label.chk { display: flex; flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; color: var(--txt); font-size: .93rem; cursor: pointer; }
label.chk input { width: 18px; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .45rem 1rem; margin-bottom: .6rem; }

.importar { background: var(--pri-claro); margin: .9rem -0.5rem 0; padding: .1rem 1.1rem 1.1rem; border-radius: var(--raio); }
.linha-busca { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.linha-busca input, .linha-busca select { flex: 1; min-width: 200px; }
.resultados { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--borda); border-radius: var(--raio-p); max-height: 320px; overflow: auto; }
.resultados li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem .8rem; border-bottom: 1px solid var(--borda); }
.resultados li:last-child { border-bottom: 0; }
.resultados small { display: block; color: var(--muted); }

.exames td { vertical-align: top; }
.exames input { min-width: 110px; }
.un { display: flex; align-items: center; gap: .35rem; } .un span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.qtd { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }

/* ---------- Documentos ---------- */
.docs { list-style: none; padding: 0; margin: 0 0 1.1rem; border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; background: #fff; }
.docs li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .75rem .95rem; border-bottom: 1px solid var(--borda); transition: background var(--t-rapido); }
.docs li:last-child { border-bottom: 0; }
.docs li:hover { background: #FBFAF7; }
.docs li.gerado { background: #FCFBF9; }
.docs .botoes { display: flex; gap: .35rem; flex: none; }
.pacote { margin: 1.3rem 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.pacote .btn { white-space: normal; text-align: center; max-width: 100%; }

/* ---------- Notificações ---------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); opacity: 0; display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff; padding: .75rem 1.1rem .75rem .85rem; border-radius: 12px; box-shadow: var(--sombra-alta);
  transition: transform var(--t-medio) var(--curva), opacity var(--t-medio); z-index: 60; max-width: min(92vw, 460px); font-weight: 600; font-size: .92rem; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .78rem; font-weight: 800; flex: none; background: #4F9A76; color: #fff; }
#toast.erro i { background: #C0584D; }
#toast.aviso i { background: #C79A3A; }

/* ---------- Carregamento ---------- */
.carregando { min-height: 50vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.carregando svg { width: 46px; height: 46px; }
.carregando svg path { stroke-dasharray: 100; animation: fx-desenha 1s var(--curva) infinite alternate; }
@keyframes fx-desenha { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.esqueleto { display: grid; gap: 14px; }
.esqueleto .lin { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #E9E6DF 0%, #F3F1EC 50%, #E9E6DF 100%); background-size: 200% 100%; animation: fx-brilho 1.1s linear infinite; }
.esqueleto .blocos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.esqueleto .bloco { height: 92px; border-radius: var(--raio); background: #fff; border: 1px solid var(--borda); }
.esqueleto .tab { height: 240px; border-radius: var(--raio); background: #fff; border: 1px solid var(--borda); padding: 18px; display: grid; gap: 14px; align-content: start; }
@keyframes fx-brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.login-marca { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-marca .wm { color: #fff; font-size: 1.35rem; }
.login-marca .wm-sub { color: #9FB2BE; }
.login-marca h2 { all: unset; display: block; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; margin-bottom: 16px; }
.login-marca p { color: #B9C7D0; margin: 0; max-width: 400px; font-size: 1rem; }
.login-marca .fundo { position: absolute; right: -110px; bottom: -110px; width: 440px; height: 440px; opacity: .08; pointer-events: none; }
.login-marca .rodape { font-size: .8rem; color: #8FA3B0; }
.login-card { width: 100%; max-width: 440px; margin: auto; padding: 48px 32px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.login-card .sub { color: var(--muted); margin: 0 0 1.6rem; }
.login-card form { display: grid; gap: 1rem; }
.login-card .btn { width: 100%; margin-top: .3rem; }
.login-card .seg { display: flex; gap: 8px; align-items: flex-start; margin-top: 1.4rem; color: var(--cinza-txt); font-size: .8rem; }
.login-card .seg svg { flex: none; margin-top: 2px; }
.login-card .marca-movel { display: none; margin-bottom: 28px; }

/* ---------- Tabelas de evolução clínica (protocolos genéricos) ---------- */
.g-full { grid-column: 1 / -1; }
.tabela.grade td { padding: .4rem .45rem; }
.tabela.grade td:first-child { font-size: .86rem; white-space: nowrap; }
.tabela.grade input { min-width: 90px; padding: .4rem .5rem; min-height: 36px; }

/* ---------- Usuários ---------- */
.usuario { border: 1px solid var(--borda); border-radius: var(--raio); padding: .9rem 1rem; margin: .7rem 0; background: #FCFBF9; }
.usuario.inativo { opacity: .6; }
.usuario details { margin: .4rem 0 .6rem; }
.usuario summary { cursor: pointer; font-weight: 600; color: var(--slate); }
.chk.inline { display: inline-flex; margin-right: .9rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: static; max-height: none; order: -1; }
}
@media (max-width: 900px) {
  body.app-shell, body.app-shell.menu-recolhido { display: block; }
  .barra-movel { display: flex; position: sticky; top: 0; z-index: 25; align-items: center; justify-content: space-between; height: 58px; padding: 0 16px; background: var(--navy); color: #fff; }
  .barra-movel .wm { color: #fff; font-size: .95rem; }
  .barra-movel button { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
  .menu { position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 300px); height: auto; transform: translateX(-102%); transition: transform var(--t-medio) var(--curva); box-shadow: var(--sombra-alta); }
  body.menu-aberto .menu { transform: none; }
  .menu-veu { display: block; position: fixed; inset: 0; background: rgba(15,30,41,.42); opacity: 0; pointer-events: none; transition: opacity var(--t-medio); z-index: 29; }
  body.menu-aberto .menu-veu { opacity: 1; pointer-events: auto; }
  .menu-recolher { display: none; }
  body.menu-recolhido .menu .rot, body.menu-recolhido .menu-topo .wm, body.menu-recolhido .menu-grupo, body.menu-recolhido .quem-sou > div { opacity: 1; pointer-events: auto; }
  body.menu-recolhido .menu-topo { flex-direction: row; padding: 4px 6px 22px 8px; }
  body.menu-recolhido .menu-topo .wm { display: inline; }
  .conteudo { padding: 22px 16px 56px; }
  .login-body { grid-template-columns: 1fr; }
  .login-marca { display: none; }
  .login-card .marca-movel { display: inline-flex; }
}
@media (max-width: 600px) {
  .grid .g2, label.g2, fieldset.g2 { grid-column: auto; }
  .qtd { grid-template-columns: repeat(3, 1fr); }
  .docs li { flex-direction: column; align-items: flex-start; }
  .cab-acoes { width: 100%; }
  .cab-acoes > * { flex: 1 1 auto; }
  h1 { font-size: 1.35rem; }
  .tabela th, .tabela td { padding: .65rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .carregando svg path { stroke-dasharray: none; }
}
@media print {
  .menu, .barra-movel, .menu-veu, #toast { display: none !important; }
  body.app-shell { display: block; background: #fff; }
}

/* ---------- Carimbo (configurações) ---------- */
.carimbo-cfg { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1rem; align-items: center; }
.carimbo-prev { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 130px; padding: 12px; border: 1px dashed var(--borda-forte); border-radius: var(--raio); background: #fff; color: #17171c; text-align: center; }
.carimbo-prev b { font: italic 700 1.02rem/1.2 'Times New Roman', Times, serif; position: relative; z-index: 1; }
.carimbo-prev span { font: 500 .74rem/1.3 Arial, Helvetica, sans-serif; position: relative; z-index: 1; }
.carimbo-prev #prevAss { position: absolute; left: 50%; bottom: 44px; transform: translateX(-46%); }
.carimbo-prev #prevAss img { height: 70px; display: block; }
.assinatura-cfg { margin: .6rem 0 1rem; padding: .8rem 1rem; border-radius: var(--raio-p); background: var(--off); }
.assinatura-cfg .linha-busca { align-items: center; margin: .5rem 0 .3rem; }
@media (max-width: 700px) { .carimbo-cfg { grid-template-columns: 1fr; } }
