/* Estilos do módulo movimentacao-nativa (prefixo mn-) */
.mn-tela .mn-corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px 8px 8px; gap: 6px; overflow: auto; }
body.mn-ocupado, body.mn-ocupado * { cursor: progress !important; }

/* Blocos comuns */
.mn-grupo { border: 1px solid #d9e1eb; border-radius: 4px; background: var(--erp-grupo-bg, #f8fafc); padding: 4px 8px 8px; margin: 0; min-width: 0; }
.mn-grupo > legend { padding: 0 4px; font-size: 12px; font-weight: 700; color: var(--erp-azul, #1b3a6b); }
.mn-grupo .mn-grupo { background: #fff; }
.mn-linha { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; min-width: 0; }
.mn-linha + .mn-linha { margin-top: 4px; }
.mn-cresce { flex: 1 1 0; min-width: 0; }
.mn-campo { display: flex; flex-direction: column; min-width: 90px; }
.mn-campo > span { font-size: 12px; color: var(--erp-azul, #1b3a6b); margin-bottom: 1px; white-space: nowrap; }
.mn-campo.mn-inline { flex-direction: row; align-items: center; gap: 6px; }
.mn-campo.mn-inline > span { margin: 0; min-width: 44px; color: var(--erp-texto, #191e29); }
.mn-par { display: flex; gap: 6px; }
.mn-par .erp-input { width: 120px; }
.mn-centro { text-align: center; }
.mn-radios { display: grid; gap: 4px; }
.mn-radios.mn-h { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.mn-radios .erp-chk { color: var(--erp-texto, #191e29); font-weight: 600; }
.mn-btn { min-width: 34px; justify-content: center; }
.mn-faixa { background: #0b6aa6; color: #fff; font-weight: 700; font-size: 14px; padding: 7px 10px; margin-bottom: 6px; border-radius: 2px; }
.mn-faixa-titulo { font-weight: 700; color: var(--erp-azul, #1b3a6b); border-bottom: 1px solid #dde4ee; padding-bottom: 3px; }
.mn-ok { color: var(--erp-ok, #16a34a); font-weight: 700; }
.mn-sub { font-weight: 700; color: var(--erp-azul, #1b3a6b); border-bottom: 1px solid #c9d2de; margin: 4px 0; }
.mn-arraste { font-size: 12px; color: #6b7280; padding: 6px 8px; background: #f7f9fc; border: 1px solid #e3e9f1; border-bottom: none; }
.mn-abas { margin-bottom: 0; }
.mn-ficha { display: flex; flex-direction: column; gap: 8px; }
.mn-ficha .mn-campo { min-width: 110px; }
.mn-ficha textarea.erp-input { width: 100%; min-height: 60px; }
.erp-tab tr.mn-lin-verde td { background: #dcf7dc; }
.erp-tab tr.mn-lin-azul td { background: #ddf2fb; }
.erp-tab tr.mn-inativo td { color: #8a94a3; font-style: italic; }
.mn-sel-aer .erp-grade { min-height: 300px; }

/* Eventos / Avulso: só a grade */
.mn-eventos-grade { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
.mn-eventos-grade > .erp-grade { flex: 1; }
.mn-eventos-grade .erp-grade-rolagem { flex: 1; }
#content > .mn-eventos { max-width: 900px; align-self: center; width: calc(100% - 16px); }

/* Diário de Bordo */
.mn-db-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 0; }
.mn-cab-campo { display: flex; align-items: center; gap: 8px; }
.mn-cab-campo b { color: var(--erp-azul, #1b3a6b); font-size: 14px; }
.mn-cab-campo .erp-input { width: 140px; height: 28px; font-size: 13px; }
.mn-cab-campo .mn-larga { width: 150px; font-weight: 700; }
.mn-spin { display: inline-flex; align-items: stretch; border: 1px solid var(--erp-borda-campo, #b9c3d0); border-radius: 2px; background: #fff; }
.mn-spin .erp-input { border: none; width: 92px; }
.mn-spin button { width: 22px; border: none; background: #f3f6fa; color: #4b5563; cursor: pointer; font-size: 15px; }
.mn-spin button:hover { background: var(--erp-acento-claro, #fff7ed); }
.mn-db-grade { flex: 1; min-height: 240px; display: flex; flex-direction: column; }
.mn-db-grade > .erp-grade { flex: 1; }
.mn-db-grade .erp-grade-rolagem { flex: 1; }
.mn-db-botoes { display: flex; gap: 6px; }
.mn-db-rodape { display: flex; gap: 10px; align-items: stretch; }
.mn-db-esq { flex: 0 1 560px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mn-db-sit { flex: 1 1 0; max-width: 560px; margin-left: auto; }
.mn-sit { display: flex; gap: 8px; }
.mn-sit .mn-linha { flex-wrap: nowrap; }
.mn-sit .mn-campo { min-width: 0; flex: 1 1 0; }
.mn-sit-dir { display: flex; flex-direction: column; gap: 6px; width: 200px; }
.mn-sit-dir .mn-campo { min-width: 0; }
.mn-sit-dir .mn-campo .erp-input { width: 100%; }
.mn-totais { display: flex; gap: 8px; }
.mn-totais > .mn-grupo { flex: 1 1 0; }
.mn-totais .mn-campo { flex-direction: row; align-items: center; gap: 8px; margin-top: 3px; }
.mn-totais .mn-campo > span { width: 46px; margin: 0; color: var(--erp-texto, #191e29); }
.mn-totais .mn-campo .erp-input { flex: 1; text-align: center; }

/* Projeção */
.mn-projecao .mn-corpo { gap: 0; }
.mn-pj-topo { flex: 1 1 40%; min-height: 200px; display: flex; flex-direction: column; }
.mn-pj-topo > .erp-grade { flex: 1; }
.mn-pj-topo .erp-grade-rolagem { flex: 1; }
.mn-pj-meio { text-align: center; border-top: 3px solid var(--erp-acento, #ea580c); margin-top: 6px; padding: 4px 0; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mn-pj-meio .erp-ico { width: 15px; height: 15px; vertical-align: -3px; }
.mn-pj-baixo { display: flex; gap: 8px; min-height: 0; }
.mn-pj-diarios { flex: 0 0 300px; display: flex; }
.mn-pj-diarios > .mn-grupo { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mn-pj-dgrade { flex: 1; display: flex; flex-direction: column; min-height: 180px; }
.mn-pj-dgrade > .erp-grade { flex: 1; }
.mn-pj-dbot { display: flex; gap: 4px; }
.mn-consolidar { justify-content: center; }
.mn-pj-lanc { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mn-pj-lgrade { min-height: 130px; display: flex; flex-direction: column; }
.mn-pj-lgrade > .erp-grade { flex: 1; }
.mn-sit-pj > .mn-grupo { min-width: 0; }

/* Componentes por prefixo */
.mn-cp-topo { display: flex; gap: 8px; }
.mn-cp-topo > .mn-grupo { display: flex; flex-direction: column; gap: 6px; }
.mn-cp-foto { width: 360px; }
.mn-foto { flex: 1; min-height: 190px; background: #fff; border: 1px solid #e3e9f1; display: flex; align-items: center; justify-content: center; }
.mn-foto img { max-width: 100%; max-height: 190px; }
.mn-cp-filtros { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 4px 2px; }
.mn-cp-filtros .mn-radios { gap: 4px 32px; }
.mn-cp-ant span { font-weight: 700; color: var(--erp-texto, #191e29); }
.mn-cp-grupo { width: 180px; }
.mn-cp-comp { flex: 1; display: flex; min-height: 260px; border: 1px solid #d9e1eb; }
.mn-faixa-vertical { width: 26px; background: #0b6aa6; color: #fff; display: flex; align-items: center; justify-content: center; }
.mn-faixa-vertical span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: 14px; }
.mn-cp-dir { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 6px; min-width: 0; }
.mn-cp-bar { display: flex; gap: 4px; }
.mn-cp-grade { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
.mn-cp-grade > .erp-grade { flex: 1; }
.mn-cp-grade .erp-grade-rolagem { flex: 1; }

/* Ordens de Serviço */
.mn-os-topo { display: flex; gap: 8px; min-height: 230px; }
.mn-os-topo > .mn-grupo { display: flex; flex-direction: column; }
.mn-os-lista { flex: 1; display: flex; flex-direction: column; min-height: 190px; }
.mn-os-lista > .erp-grade { flex: 1; }
.mn-os-aer { width: 310px; display: flex; flex-direction: column; border: 1px solid #d9e1eb; border-radius: 4px; padding: 6px; background: #fff; }
.mn-os-painel { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mn-os-painel .mn-campo.mn-inline > span { font-weight: 700; color: var(--erp-azul, #1b3a6b); min-width: 70px; }
.mn-os-painel .mn-linha .mn-campo.mn-inline > span { min-width: 34px; }
.mn-os-painel .mn-linha .mn-campo { flex: 1; min-width: 0; }
.mn-preto .erp-input { background: #000 !important; color: #fff !important; font-weight: 700; }
.mn-os-obs { flex: 1; min-height: 120px; }
.mn-os-mh { flex: 1; }
.mn-abas-baixo { border-bottom: none; border-top: 1px solid var(--erp-borda, #c9d2de); margin: 4px 0 0; }
.mn-abas-baixo .erp-aba { border-radius: 0 0 4px 4px; height: 26px; }
.mn-os-baixo { flex: 1; display: flex; gap: 8px; min-height: 300px; }
.mn-os-vbtn { display: flex; flex-direction: column; gap: 6px; padding-top: 34px; }
.mn-os-vbtn .erp-botao { flex-direction: column; height: auto; padding: 6px 8px; font-size: 11.5px; }
.mn-os-det { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mn-os-aba { flex: 1; display: flex; flex-direction: column; gap: 6px; border: 1px solid #d9e1eb; border-top: none; padding: 6px; min-height: 0; }
.mn-os-g { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
.mn-os-g > .erp-grade { flex: 1; }
.mn-os-g .erp-grade-rolagem { flex: 1; }
.mn-os-itens { font-weight: 700; color: var(--erp-azul, #1b3a6b); padding: 2px 8px; }

/* SGSO */
.mn-sg-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.mn-sg-filtros > .mn-grupo:first-child { flex: 0 0 480px; }
.mn-sg-filtros .mn-radios.mn-h { justify-content: space-between; padding: 4px 8px; }
.mn-sg-filtros > .mn-grupo.mn-sg-sit { flex: 0 1 460px; }
/* Situação (Enviado / Em andamento / Finalizado, regra em situacaoSgso) */
.mn-sg-selo { display: inline-block; min-width: 92px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 16px; }
.mn-sg-selo.s-env { background: #e3ecfb; color: #1f4f9e; }
.mn-sg-selo.s-and { background: #fdf0d9; color: #8a4b00; }
.mn-sg-selo.s-fin { background: #e1f3e4; color: #1d6b2c; }
tr.sel .mn-sg-selo { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }
.mn-sg-grade { display: flex; flex-direction: column; height: 170px; }
.mn-sg-grade > .erp-grade { flex: 1; }
.mn-sg-grade .erp-grade-rolagem { flex: 1; }
.mn-sg-det { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-height: 300px; align-content: flex-start; }
.mn-sg-abas { flex: 0 0 100%; }
.mn-sg-esq { flex: 1 1 280px; display: flex; }
.mn-sg-esq > .mn-grupo { flex: 1; }
.mn-sg-img { min-height: 220px; display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 12px; }
.mn-sg-textos { flex: 0 0 236px; display: flex; flex-direction: column; gap: 6px; }
.mn-sg-textos textarea { width: 100%; height: 100px; resize: none; }
.mn-sg-tipo { flex: 0 0 110px; display: flex; flex-direction: column; gap: 6px; }
.mn-sg-tipo .mn-grupo:last-child { flex: 1; }
.mn-sg-tipo .mn-radios { gap: 18px; padding-top: 6px; }
.mn-sg-aval .mn-radios { gap: 22px; padding-top: 8px; }
.mn-sg-aval .mn-linha { flex-wrap: nowrap; }
.mn-sg-risco { flex: 0 0 168px; background: #0b4f7c; padding: 4px; border-radius: 3px; display: flex; flex-direction: column; }
.mn-sg-risco-tit { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; font-size: 12px; }
.mn-sg-risco-tit b { background: #fdf6b2; color: #111; font-size: 20px; padding: 0 6px; border-radius: 2px; }
.mn-sg-tri { position: relative; flex: 1; min-height: 230px; background: #fff; margin-top: 4px; display: flex; flex-direction: column; align-items: center; padding: 6px 0; font-size: 9px; font-weight: 700; color: #111; }
.mn-sg-tri > div { display: flex; align-items: center; justify-content: center; text-align: center; }
.mn-tri-r { width: 150px; height: 72px; background: #e11d23; clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%); }
.mn-tri-y { width: 104px; height: 72px; background: #f5e50a; clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%); }
.mn-tri-g { width: 52px; height: 74px; background: #16a34a; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.mn-sg-risco[data-nivel="r"] .mn-tri-r, .mn-sg-risco[data-nivel="y"] .mn-tri-y, .mn-sg-risco[data-nivel="g"] .mn-tri-g { outline: 3px solid #0b4f7c; outline-offset: -3px; }

/* Relatórios de layout livre (iguais ao impresso) */
.mn-rel-pagina { display: flex; flex-direction: column; }
.mn-rel-cab { border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 8px; }
.mn-rel-emp { display: flex; gap: 10px; align-items: center; }
.mn-rel-emp img { max-height: 54px; max-width: 120px; object-fit: contain; }
.mn-rel-emp div { display: flex; flex-direction: column; font-size: 10.5px; color: #222; }
.mn-rel-emp b { font-size: 13px; }
.mn-rel-tit { text-align: center; margin-top: 6px; }
.mn-rel-tit h1 { font-size: 15px; margin: 0; letter-spacing: .3px; }
.mn-rel-tit h2 { font-size: 12px; margin: 2px 0 0; font-weight: 600; }
.mn-rel-corpo { flex: 1; font-size: 10.5px; color: #111; }
.mn-rel-corpo > * { margin-bottom: 6px; }
.mn-rel-rod { display: flex; justify-content: space-between; border-top: 1px solid #555; padding-top: 3px; font-size: 9.5px; color: #333; }
.mn-rel-info { width: 100%; border: 1px solid #333; border-collapse: collapse; font-size: 10.5px; }
.mn-rel-info td { padding: 3px 6px; border: 1px solid #999; }
.mn-rel-tab { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; margin-bottom: 0 !important; }
.mn-rel-tab th { background: #e9edf3; border: 1px solid #777; padding: 3px 4px; font-weight: 700; text-align: center; }
.mn-rel-tab td { border: 1px solid #999; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-rel-tab td.c { text-align: center; }
.mn-rel-tab td.d { text-align: right; font-variant-numeric: tabular-nums; }
.mn-rel-tab tr.mn-dom td { background: #f2f2f2; }
.mn-rel-tab th.mn-larga { width: 26%; }
.mn-rel-total td { font-weight: 700; background: #f3f5f8; }
.mn-rel-tr-total td { font-weight: 700; background: #f3f5f8; }
.mn-rel-sub { font-size: 12px; margin: 10px 0 4px; border-bottom: 1px solid #333; }
.mn-rel-decl { font-size: 12.5px; line-height: 1.8; text-align: justify; }
.mn-rel-decl p { margin: 12px 0; text-indent: 40px; }
.mn-rel-decl .mn-rel-data { text-align: right; text-indent: 0; margin-top: 26px; }
.mn-rel-decl-tab { font-size: 11px; }
.mn-rel-assin { display: flex; justify-content: space-around; gap: 40px; margin-top: 46px; }
.mn-rel-assin.mn-um { justify-content: center; }
.mn-rel-assin > div { display: flex; flex-direction: column; align-items: center; width: 280px; font-size: 10.5px; }
.mn-rel-assin i { display: block; width: 100%; border-top: 1px solid #111; margin-bottom: 3px; }
.mn-rel-assin small { color: #444; }

/* Relatórios no layout do original (motor FastReport do módulo) */
.erp-pagina.mn-frx-pagina { padding: 0; display: block; }
.mn-frx-area { position: absolute; }
.mn-frx-abs { position: absolute; left: 0; right: 0; }
.mn-frx-banda { position: relative; }
.mn-frx-o { position: absolute; box-sizing: border-box; overflow: hidden; display: block; }
.mn-frx-memo { display: flex; flex-direction: column; padding: 1px 2px; line-height: 1.12; white-space: pre-wrap; word-break: break-word; }
.mn-frx-memo.nw { white-space: nowrap; }
.mn-frx-memo > span { display: block; width: 100%; }
.mn-frx-o img { width: 100%; height: 100%; object-fit: contain; }

/* Relatório de Operações (TFREL005) e Planilha Mapa */
.mn-r5-topo { display: flex; gap: 8px; }
.mn-r5-topo .mn-campo { min-width: 140px; }
.mn-r5-g { display: flex; flex-direction: column; height: 240px; }
.mn-r5-g > .erp-grade { flex: 1; }
.mn-mapa-rod { display: flex; align-items: center; gap: 8px; }
.mn-mapa-rod select { width: 140px; }
/* Ordens de Serviço: painéis Motores/Hélices, itens, opções */
.mn-os-mhl { display: flex; gap: 6px; flex: 1; }
.mn-os-mhb { display: flex; flex-direction: column; gap: 4px; }
.mn-os-mhd { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mn-os-mhd .mn-linha .mn-campo { flex: 1; min-width: 0; }
.mn-sep { font-weight: 700; color: var(--erp-azul, #1b3a6b); border-bottom: 1px solid var(--erp-borda, #c9d2de); margin: 6px 0 2px; padding-bottom: 2px; }
.mn-opcoes { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.mn-opcoes .erp-botao { justify-content: flex-start; }

/* Menu de contexto (PopupMenu do original) */
.mn-menu { position: fixed; z-index: 3000; min-width: 220px; padding: 3px; background: #fff; border: 1px solid #b9c4d1; box-shadow: 0 6px 18px rgba(16,24,40,.18); font-family: var(--erp-fonte); font-size: 13px; }
.mn-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 10px; border: none; background: none; color: var(--erp-texto); font: inherit; text-align: left; cursor: pointer; }
.mn-menu button:hover:not(:disabled) { background: #fff4d6; }
.mn-menu button:disabled { color: #9aa5b3; cursor: not-allowed; }
.mn-menu button em { margin-left: auto; padding-left: 18px; font-style: normal; color: #6b7a8c; }
.mn-menu-sep { display: block; height: 1px; margin: 3px 4px; background: #e2e8f0; }
/* Ficha do lançamento (FLancVoo): campos com largura fixa/percentual do DFM */
.mn-ficha-etapa .mn-campo { min-width: 0; }
.mn-ficha-etapa .mn-campo > .erp-input { width: 100%; box-sizing: border-box; }
.mn-ficha-etapa .mn-campo:not([style]):not(.mn-cresce) { flex: 1 1 0; }
.mn-sg-img .erp-img-delphi { max-height: 260px; }
.mn-ga-img { min-height: 120px; max-height: 260px; display: flex; align-items: center; justify-content: center; }
.mn-ga-img.mn-ga-ass { min-height: 160px; }
.mn-ga-img .erp-img-delphi { max-height: 250px; }
