/* ContrataPUBLIC 2026.0.0.126 — Remuneração de vendas. Só tela; a impressão da proposta não usa isto. */
@media screen {
  body:not(.mode-rem) #rem { display: none !important; }
  body.nv-consulta #btn-rem,
  body.cp-so-operacional #btn-rem { display: none !important; }
  body.mode-rem .editor, body.mode-rem .preview { display: none !important; }
  body.mode-rem .app-body { display: block; max-width: none; margin: 0; }
  body.mode-rem #btn-print, body.mode-rem #btn-exemplo { display: none; }

  #rem { padding-bottom: 1rem; }
  .rem-card { display: flex; flex-direction: column; gap: .6rem; }
  .rem-faixa { display: flex; flex-wrap: nowrap; gap: .55rem; overflow-x: auto; padding-bottom: .15rem; }
  .rem-faixa .td-card, .rem-faixa .mkt-kpi { flex: 0 0 auto !important; min-width: 9.2rem; }
  .rem-lista { display: flex; flex-direction: column; gap: .45rem; margin-top: .7rem; }
  .rem-item { border: 1px solid var(--line, rgba(120, 120, 140, .35)); border-radius: 10px; padding: .55rem .7rem; }
  .rem-item h3 { margin: 0 0 .2rem; font-size: .95rem; }
  .rem-linhas { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .25rem .6rem; margin: .35rem 0 0; }
  .rem-linhas span { display: block; color: var(--muted, #667); font-size: .75rem; }
  .rem-linhas b { font-weight: 650; }
  .rem-neg b { color: var(--coral, #c0392b); }
  .rem-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .55rem; margin: .4rem 0 .7rem; }
  .rem-form .field { min-width: 0; }
  .rem-form .field span { white-space: normal; }
  .rem-form input, .rem-form select, .rem-form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
  .rem-acoes { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .6rem; }
  .rem-herda { display: block; margin-top: .15rem; color: var(--muted, #667); font-size: .75rem; }
  .rem-herda[hidden] { display: none !important; }
  #rem input[data-rem-herdado="sim"], #cfg-rem input[data-rem-herdado="sim"] { color: var(--muted, #667); font-style: italic; }
  .rem-nota { margin: .2rem 0 .6rem; }
  .fn-rem { margin-top: .6rem; }
  .fn-rem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .35rem .6rem; }
  .rem-exc { margin-top: .6rem; display: grid; gap: .45rem; }
  /* 139.5.28: nada da exceção fica atrás do rodapé fixo da janela da oportunidade */
  #modal-fn #fn-rem-exc input, #modal-fn #fn-rem-exc textarea, #modal-fn #fn-rem-exc select, #modal-fn #fn-rem-exc button, #modal-fn #fn-rem-itens-box { scroll-margin-bottom: 11rem; scroll-margin-top: 5rem; }
  #modal-fn #fn-rem-exc .rem-exc { padding-bottom: .4rem; }
  #fn-rem-salvar { justify-self: start; }
  .rem-itens { display: flex; flex-direction: column; gap: .35rem; }
  .rem-itens-linha { display: grid; grid-template-columns: 6.5rem 1fr 5.5rem 6rem auto; gap: .35rem; align-items: end; }
  @media (max-width: 900px) {
    #rem { padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)); }
    .rem-itens-linha { grid-template-columns: 1fr 1fr; }
    .rem-form { grid-template-columns: 1fr 1fr; }
    #rem input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    #cfg-rem input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    #rem select, #cfg-rem select, #rem textarea, #cfg-rem textarea {
      min-height: 44px;
      font-size: 1rem;
      padding: 0.65rem 0.75rem;
    }
  }
}
@media print {
  #rem, #fn-rem, #rem-modal { display: none !important; }
}
