
/* v43 — cabeçalhos fixos e opacos nas listagens pedidas. */
#content-root{position:relative!important}
.pw-v43-sticky-shell{
  position:sticky!important;top:0!important;z-index:1200!important;
  background:var(--bg,#F8FAFC)!important;isolation:isolate!important;
  box-shadow:0 5px 8px rgba(15,23,42,.08)!important;
}
.pw-v43-sticky-shell::before{
  content:"";position:absolute;left:-24px;right:-24px;top:-40px;height:40px;
  background:var(--bg,#F8FAFC);z-index:-1;pointer-events:none;
}
.pw-v43-header-proxy{overflow:hidden!important;background:#F1F5F9!important;border:1px solid var(--line)!important;border-bottom:0!important}
.pw-v43-header-proxy table{border-collapse:collapse!important;table-layout:fixed!important;white-space:nowrap!important;margin:0!important}
.pw-v43-header-proxy th,.pw-v43-header-proxy td{box-sizing:border-box!important;background:#F1F5F9!important;text-align:center!important;vertical-align:middle!important}
.pw-v43-table-scroll{overflow:auto!important;position:relative!important;overscroll-behavior:contain!important}
.pw-v43-table-scroll>table>thead{display:none!important}
/* Gestão MO: a barra de controlo do dia fica fixa. */
#content-root[data-pw-v43-view="coord_mo"] #mo-conteudo>.card:first-child{position:sticky!important;top:0!important;z-index:1150!important;background:var(--bg,#F8FAFC)!important;box-shadow:0 4px 8px rgba(15,23,42,.08)!important}
/* Veículos: mascara totalmente a faixa entre o título da página e a pesquisa. */
#vei-fixed-top{isolation:isolate!important;background:var(--bg,#F8FAFC)!important}
#vei-fixed-top::before{content:"";position:absolute;left:-32px;right:-32px;top:-48px;height:48px;background:var(--bg,#F8FAFC)!important;z-index:-1;pointer-events:none}
/* Trabalhadores: desativa as dimensões rígidas antigas do proxy; a geometria é desenhada pelo controlador v43. */
#trab-header-proxy{position:relative!important;overflow:hidden!important;background:#F6F7F7!important}
#trab-header-table{visibility:hidden!important;pointer-events:none!important;position:absolute!important;left:-99999px!important}
.pw-v43-trab-head{position:relative!important;background:#F6F7F7!important;overflow:hidden!important;border:0!important}
.pw-v43-trab-cell{position:absolute!important;box-sizing:border-box!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;text-align:center!important;vertical-align:middle!important;background:#F6F7F7!important;border-right:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;padding:6px 8px!important}
.pw-v43-trab-cell.fixed{z-index:50!important;background:#F6F7F7!important}
.pw-v43-trab-cell.movable{z-index:10!important}
.pw-v43-trab-filter{background:#FBFBFB!important;padding:2px 6px!important}
.pw-v43-trab-filter select{max-width:100%!important;width:100%!important}

/* v1380 — Cronograma: duas linhas reais no cabeçalho, sem rowspan sticky.
   A primeira coluna fica fixa no scroll horizontal e o cabeçalho fica sempre
   acima das obras no scroll vertical. A linha das semanas fica colada à linha
   dos meses, anulando o sticky individual herdado pelos th globais. */
#content-root #cron-scroll-wrap{
  position:relative!important;
  isolation:isolate!important;
  background:#EEF2F7!important;
}
#content-root #cron-tbl{
  isolation:isolate!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
}
#content-root #cron-tbl col.cron-col-obra{
  width:240px!important;
  min-width:240px!important;
  max-width:240px!important;
}
#content-root #cron-tbl col.cron-col-week{
  width:26px!important;
  min-width:26px!important;
  max-width:26px!important;
}
#content-root #cron-tbl thead{
  position:sticky!important;
  top:0!important;
  z-index:500!important;
  background:#F1F5F9!important;
}
#content-root #cron-tbl thead th{
  box-sizing:border-box!important;
  background-clip:padding-box!important;
  top:auto!important;
}
#content-root #cron-tbl thead tr{
  height:auto!important;
}
#content-root #cron-tbl thead tr:first-child > th{
  height:28px!important;
  min-height:28px!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
  line-height:16px!important;
  vertical-align:middle!important;
}
#content-root #cron-tbl thead tr:nth-child(2) > th{
  height:32px!important;
  min-height:32px!important;
  padding-top:2px!important;
  padding-bottom:2px!important;
  line-height:12px!important;
  vertical-align:middle!important;
}
#content-root #cron-tbl thead .cron-fixed-head{
  position:sticky!important;
  left:0!important;
  top:auto!important;
  z-index:700!important;
  text-align:center!important;
  vertical-align:middle!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  min-width:240px!important;
  width:240px!important;
  max-width:240px!important;
}
#content-root #cron-tbl thead .cron-fixed-spacer{
  z-index:699!important;
  background:#F8FAFC!important;
  background-color:#F8FAFC!important;
  height:32px!important;
  min-height:32px!important;
  padding:0!important;
  line-height:0!important;
  font-size:0!important;
}
#content-root #cron-tbl thead .cron-month-head,
#content-root #cron-tbl thead .cron-week-head{
  position:relative!important;
  z-index:550!important;
}
#content-root #cron-tbl thead .cron-week-head,
#content-root #cron-tbl tbody .cron-week-cell{
  min-width:26px!important;
  width:26px!important;
  max-width:26px!important;
  box-sizing:border-box!important;
}
#content-root #cron-tbl tbody td{
  box-sizing:border-box!important;
  position:relative!important;
  z-index:1!important;
}
#content-root #cron-tbl tbody tr > :nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:20!important;
  background:#fff!important;
  background-color:#fff!important;
  background-clip:padding-box!important;
  min-width:240px!important;
  width:240px!important;
  max-width:240px!important;
  box-shadow:2px 0 4px rgba(15,23,42,.12)!important;
}

/* v1380 — cabeçalhos centrados dentro das larguras reais das colunas. */
#content-root #sa-tbl thead th,
#content-root #equipas-tbl thead th{
  text-align:center!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}

/* Seguimento Orçamentos: grelha de quadrados de referência. */
#content-root .seg-orc-toolbar{
  align-items:center!important;
}
#content-root .seg-orc-tabs,
.seg-orc-tabs{
  display:flex;
  gap:7px;
  align-items:center;
  margin:0 0 12px;
  border-bottom:1px solid var(--line);
}
#content-root .seg-orc-tab,
.seg-orc-tab{
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--ink-soft);
  padding:8px 11px 7px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
#content-root .seg-orc-tab.active,
.seg-orc-tab.active{
  color:var(--ink);
  border-bottom-color:var(--accent);
}
.seg-orc-tabs-mobile{
  margin:8px 0 10px;
  padding:0 2px;
}
.seg-orc-tabs-mobile .seg-orc-tab{
  flex:1;
}
#content-root .seg-orc-grid,
.seg-orc-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:12px;
  align-items:stretch;
}
#content-root .seg-orc-card,
.seg-orc-card{
  position:relative;
  min-height:210px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#fff;
  padding:12px 12px 42px;
  cursor:pointer;
  box-shadow:0 1px 3px rgba(15,23,42,.05);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#content-root .seg-orc-card:hover,
.seg-orc-card:hover{
  transform:translateY(-1px);
  border-color:#CBD5E1;
  box-shadow:0 4px 12px rgba(15,23,42,.08);
}
#content-root .seg-orc-main,
.seg-orc-main{
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:5px;
  text-align:center;
}
#content-root .seg-orc-estado,
.seg-orc-estado{
  max-width:100%;
  padding:4px 10px;
  border-radius:999px;
  color:#fff;
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.25px;
  line-height:1.2;
}
#content-root .seg-orc-cliente,
.seg-orc-cliente{
  width:100%;
  font-size:15px;
  font-weight:800;
  color:var(--ink);
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
#content-root .seg-orc-obra,
.seg-orc-obra{
  width:100%;
  font-size:13px;
  font-weight:700;
  color:var(--ink-soft);
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  margin-top:-2px;
}
#content-root .seg-orc-zona,
.seg-orc-zona,
#content-root .seg-orc-numero,
.seg-orc-numero{
  width:100%;
  font-size:12px;
  color:var(--ink-soft);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#content-root .seg-orc-valor,
.seg-orc-valor{
  font-size:18px;
  font-weight:900;
  color:var(--ink);
  line-height:1.1;
}
#content-root .seg-orc-contacto,
.seg-orc-contacto{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:2px;
  font-size:12px;
  color:var(--ink);
}
#content-root .seg-orc-contacto a,
.seg-orc-contacto a{
  color:var(--steel-soft);
  font-weight:700;
  text-decoration:none;
}
#content-root .seg-orc-extras,
.seg-orc-extras{
  width:100%;
  margin-top:6px;
  padding-top:7px;
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:4px;
}
#content-root .seg-orc-extra,
.seg-orc-extra{
  width:100%;
  font-size:11.5px;
  color:var(--ink);
  display:flex;
  flex-direction:column;
  gap:1px;
  line-height:1.25;
}
#content-root .seg-orc-extra span,
.seg-orc-extra span{
  font-size:9.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.25px;
  color:var(--ink-soft);
}
#content-root .seg-orc-actions,
.seg-orc-actions{
  position:absolute;
  left:10px;
  right:10px;
  bottom:9px;
  display:flex;
  align-items:center;
  gap:6px;
}
#content-root .seg-orc-map,
.seg-orc-map,
#content-root .seg-orc-pdf,
.seg-orc-pdf{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:5px;
  background:#F8FAFC;
  color:var(--ink);
  font-size:11px;
  font-weight:800;
  text-decoration:none;
}
#content-root .seg-orc-pdf,
.seg-orc-pdf{
  margin-left:auto;
  background:#111827;
  border-color:#111827;
  color:#fff;
}
#content-root .seg-orc-ficha,
.seg-orc-ficha{
  min-height:26px!important;
  padding:4px 8px!important;
  font-size:11px!important;
  width:auto!important;
}
#orcamento-modal.orc-compact-modal .modal-box{
  width:min(760px,calc(100vw - 36px))!important;
  padding:18px 20px!important;
}
#orcamento-modal.orc-compact-modal h3{
  margin-bottom:12px!important;
}
#orcamento-modal.orc-compact-modal .modal-grid{
  gap:9px 12px!important;
}
#orcamento-modal.orc-compact-modal .field label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:4px;
  font-size:11px;
}
#orcamento-modal.orc-compact-modal input,
#orcamento-modal.orc-compact-modal select,
#orcamento-modal.orc-compact-modal textarea{
  padding:7px 8px!important;
  min-height:34px!important;
}
#orcamento-modal.orc-compact-modal textarea{
  min-height:62px!important;
}
#orcamento-modal.orc-compact-modal .orc-ref-check{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:var(--ink-soft);
  font-size:10px;
  font-weight:700;
  text-transform:none;
  letter-spacing:0;
}
#orcamento-modal.orc-compact-modal .orc-ref-check::before{
  content:'Quadrado';
}
#orcamento-modal.orc-compact-modal .orc-ref-check input{
  width:14px;
  height:14px;
  min-height:0!important;
  margin:0;
}
#content-root #seg-orc-scroll{
  position:relative!important;
  overflow:auto!important;
  isolation:isolate!important;
}
#content-root #seg-orc-tbl{
  border-collapse:separate!important;
  border-spacing:0!important;
}
#content-root #seg-orc-tbl thead th{
  position:sticky!important;
  top:0!important;
  z-index:40!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  background-clip:padding-box!important;
  text-align:center!important;
  vertical-align:middle!important;
}

/* Controlo Fat. Fornecedores: linhas finas e campos sem caixas; só vencidos
   por pagar recebem fundo vermelho. */
#content-root #ff-tbl{
  border-collapse:collapse!important;
  width:100%!important;
}
#content-root #ff-tbl th{
  background:#F1F5F9!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  text-align:center!important;
  vertical-align:middle!important;
}
#content-root #ff-tbl td{
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  padding:5px 8px!important;
  background:transparent!important;
}
#content-root #ff-tbl tr.ff-row-vencida > td{
  background:#FEE2E2!important;
}
#content-root #ff-tbl .ff-inp{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
  outline:0!important;
  font-family:inherit!important;
}
#content-root #ff-tbl .ff-inp:focus{
  background:#fff!important;
  outline:1px solid var(--accent)!important;
  outline-offset:1px!important;
}

#content-root .ff-header-strip{
  padding:6px 0!important;
  margin-bottom:8px!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  box-shadow:none!important;
}
#content-root .ff-header-strip .ff-header-item,
#content-root .ff-header-strip #ff-mes-cartoes > div,
#content-root .ff-header-strip #ff-trim-cartoes > div{
  padding:2px 14px!important;
  border-left:1px solid var(--line)!important;
  min-height:34px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
#content-root .ff-header-strip .ff-header-item:first-child,
#content-root .ff-header-strip #ff-mes-cartoes > div:first-child,
#content-root .ff-header-strip #ff-trim-cartoes > div:first-child{
  border-left:0!important;
}
#content-root .ff-header-strip #ff-mes-cartoes,
#content-root .ff-header-strip #ff-trim-cartoes{
  gap:0!important;
}
#content-root .ff-header-strip .btn{
  padding:4px 9px!important;
  min-height:28px!important;
}
#content-root .ff-header-strip div[style*="font-size:11px"]{
  font-size:10px!important;
  line-height:1.15!important;
}
#content-root .ff-header-strip div[style*="font-size:22px"],
#content-root .ff-header-strip div[style*="font-size:24px"]{
  font-size:18px!important;
  line-height:1.15!important;
}

#content-root .notas-tabs,
.mob-notas-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  margin:0 0 10px;
  border-bottom:1px solid var(--line,#CBD5E1);
}
#content-root .notas-tab{
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--ink-soft,#64748B);
  padding:7px 12px 8px;
  font-size:12.5px;
  font-weight:700;
  cursor:pointer;
}
#content-root .notas-tab.active{
  color:var(--accent,#1D4ED8);
  border-bottom-color:var(--accent,#1D4ED8);
}
.notas-tab-badge{
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  margin-left:5px;
  border-radius:999px;
  background:#B91C1C;
  color:#fff;
  font-size:10.5px;
  font-weight:800;
  line-height:1;
}
#content-root .pw-notas-table{
  width:1375px;
  min-width:1375px;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:12.5px;
}
#content-root .pw-notas-table th,
#content-root .pw-notas-table td{
  padding:7px 8px;
  border-bottom:1px solid var(--line,#CBD5E1);
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
}
#content-root .pw-notas-table th{
  background:#F1F5F9;
  color:var(--ink,#0F172A);
  font-weight:800;
  text-align:center;
  white-space:nowrap;
}
#content-root .pw-notas-table td{
  background:#fff;
}
#content-root .nota-users-list{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  border:1px solid var(--line,#CBD5E1);
  border-radius:4px;
  padding:4px;
  background:#F8FAFC;
  max-height:150px;
  overflow-y:auto;
}
#content-root .nota-user-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  width:100%;
  box-sizing:border-box;
  padding:5px 7px;
  border-bottom:1px solid rgba(203,213,225,.7);
  color:var(--ink,#0F172A);
  font-size:12.5px;
  text-align:left;
}
#content-root .nota-user-row:last-child{
  border-bottom:0;
}
#content-root .nota-user-check{
  cursor:pointer;
}
