
/* Referência: Gestão de Máquinas/Ferramentas — cabeçalho fixo
   verticalmente, só a 1ª coluna (Gestão BD) fixa horizontalmente. Mesma
   técnica de part-021.css/part-024.css/part-025.css: tudo com
   !important. */
#content-root #maq-table-scroll{
  position:relative!important;
  display:block!important;
  overflow:auto!important;
  overflow-y:auto!important;
  overflow-x:auto!important;
  max-height:calc(100vh - 300px)!important;
  isolation:isolate!important;
  background:#fff!important;
  background-color:#fff!important;
}
#content-root #maq-table-scroll::before{
  content:""!important;
  position:sticky!important;
  top:0!important;
  display:block!important;
  height:18px!important;
  margin-bottom:-18px!important;
  z-index:215!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  background-image:linear-gradient(#F1F5F9,#F1F5F9)!important;
  pointer-events:none!important;
}
#content-root #maq-tabela{
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
  width:max-content!important;
  min-width:100%!important;
  font-size:12px!important;
}
#content-root #maq-tabela th,#content-root #maq-tabela td{
  box-sizing:border-box!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#content-root #maq-tabela thead{
  display:table-header-group!important;
  position:sticky!important;
  top:0!important;
  z-index:218!important;
  opacity:1!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  background-image:linear-gradient(#F1F5F9,#F1F5F9)!important;
}
#content-root #maq-tabela thead tr{
  opacity:1!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  background-image:linear-gradient(#F1F5F9,#F1F5F9)!important;
}
#content-root #maq-tabela thead tr:first-child > th{
  position:sticky!important;
  top:0!important;
  z-index:220!important;
  opacity:1!important;
  background:#F1F5F9!important;
  background-color:#F1F5F9!important;
  background-image:linear-gradient(#F1F5F9,#F1F5F9)!important;
  background-repeat:repeat!important;
  background-clip:padding-box!important;
  box-shadow:0 2px 0 var(--line,#d9dee3),0 10px 18px rgba(15,23,42,.16)!important;
}
/* Larguras de todas as colunas, forçadas. */
#content-root #maq-tabela tr > :nth-child(1){width:90px!important;min-width:90px!important;max-width:90px!important;left:0!important}
#content-root #maq-tabela tr > :nth-child(2){width:150px!important;min-width:150px!important;max-width:150px!important}
#content-root #maq-tabela tr > :nth-child(3){width:70px!important;min-width:70px!important;max-width:70px!important}
#content-root #maq-tabela tr > :nth-child(4){width:230px!important;min-width:230px!important;max-width:230px!important}
#content-root #maq-tabela tr > :nth-child(5){width:100px!important;min-width:100px!important;max-width:100px!important}
#content-root #maq-tabela tr > :nth-child(6){width:110px!important;min-width:110px!important;max-width:110px!important}
#content-root #maq-tabela tr > :nth-child(7){width:130px!important;min-width:130px!important;max-width:130px!important}
#content-root #maq-tabela tr > :nth-child(8){width:140px!important;min-width:140px!important;max-width:140px!important}
#content-root #maq-tabela tr > :nth-child(9){width:100px!important;min-width:100px!important;max-width:100px!important}
#content-root #maq-tabela tr > :nth-child(10){width:85px!important;min-width:85px!important;max-width:85px!important}
#content-root #maq-tabela tr > :nth-child(11){width:110px!important;min-width:110px!important;max-width:110px!important}
#content-root #maq-tabela tr > :nth-child(12){width:110px!important;min-width:110px!important;max-width:110px!important}
#content-root #maq-tabela tr > :nth-child(13){width:220px!important;min-width:220px!important;max-width:220px!important}
#content-root #maq-tabela tr > :nth-child(14){width:45px!important;min-width:45px!important;max-width:45px!important}
/* Só a 1ª coluna (Gestão BD) fica fixa horizontalmente. */
#content-root #maq-tabela tbody tr > :nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:60!important;
  background:#fff!important;
  background-clip:padding-box!important;
}
#content-root #maq-tabela thead tr:first-child > :nth-child(1){z-index:130!important}
#content-root #maq-tabela tr > :nth-child(1){box-shadow:2px 0 4px rgba(15,23,42,.12)!important}
#content-root #maq-tabela tbody tr > :nth-child(n+2){
  position:relative!important;
  left:auto!important;
  z-index:auto!important;
}
#content-root #maq-tabela thead tr > :nth-child(n+2){left:auto!important}

/* Máquinas e Ferramentas remodelado — submenus laterais, cartões e fichas. */
body[data-current-view="maquinas"] #app-screen > .shell > .main > .topbar,
body[data-current-view="maquinas_soltas"] #app-screen > .shell > .main > .topbar,
body[data-current-view="maquinas_kits"] #app-screen > .shell > .main > .topbar,
body[data-current-view="maquinas_manutencao"] #app-screen > .shell > .main > .topbar,
body[data-current-view="maquinas_documentos"] #app-screen > .shell > .main > .topbar{
  opacity:1!important;
  background:#F8FAFC!important;
  background-color:#F8FAFC!important;
  background-image:linear-gradient(#F8FAFC,#F8FAFC)!important;
  background-repeat:repeat!important;
  background-clip:border-box!important;
  box-shadow:0 1px 0 var(--line,#d9dee3),0 10px 18px rgba(15,23,42,.12)!important;
  isolation:isolate!important;
}
body[data-current-view="maquinas"] #app-screen > .shell > .main > .topbar > *,
body[data-current-view="maquinas_soltas"] #app-screen > .shell > .main > .topbar > *,
body[data-current-view="maquinas_kits"] #app-screen > .shell > .main > .topbar > *,
body[data-current-view="maquinas_manutencao"] #app-screen > .shell > .main > .topbar > *,
body[data-current-view="maquinas_documentos"] #app-screen > .shell > .main > .topbar > *{
  position:relative!important;
  z-index:2!important;
}
body[data-current-view="maquinas"] #app-screen > .shell > .main > .topbar::after,
body[data-current-view="maquinas_soltas"] #app-screen > .shell > .main > .topbar::after,
body[data-current-view="maquinas_kits"] #app-screen > .shell > .main > .topbar::after,
body[data-current-view="maquinas_manutencao"] #app-screen > .shell > .main > .topbar::after,
body[data-current-view="maquinas_documentos"] #app-screen > .shell > .main > .topbar::after{
  content:none!important;
  display:none!important;
}
body[data-current-view="maquinas"] #content-root,
body[data-current-view="maquinas_soltas"] #content-root,
body[data-current-view="maquinas_kits"] #content-root,
body[data-current-view="maquinas_manutencao"] #content-root,
body[data-current-view="maquinas_documentos"] #content-root{
  background:#F8FAFC!important;
  background-color:#F8FAFC!important;
  padding-top:0!important;
  isolation:isolate!important;
}
.maq-shell{
  position:relative;
  background:#F8FAFC;
  background-color:#F8FAFC;
  min-height:100%;
  padding-top:0;
}
#content-root .maq-shell::before{
  content:none;
  display:none;
}
.maq-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}
#content-root .maq-shell > #maq-subconteudo > .maq-toolbar{
  position:sticky;
  top:0;
  z-index:260;
  opacity:1;
  background:#F8FAFC;
  background-color:#F8FAFC;
  background-image:linear-gradient(#F8FAFC,#F8FAFC);
  background-repeat:repeat;
  background-clip:padding-box;
  padding:18px 0 12px;
  margin-top:0;
  box-shadow:0 2px 0 var(--line,#d9dee3),0 14px 22px rgba(15,23,42,.16);
}
#content-root .maq-shell > #maq-subconteudo > .maq-toolbar > *{
  position:relative;
  z-index:270;
}
#content-root .maq-shell > #maq-subconteudo > .maq-toolbar input,
#content-root .maq-shell > #maq-subconteudo > .maq-toolbar button{
  background-clip:padding-box;
}
#content-root .maq-shell > #maq-subconteudo > .maq-toolbar::before{
  content:"";
  position:absolute;
  left:-28px;
  right:-28px;
  top:0;
  bottom:0;
  z-index:-1;
  background:#F8FAFC;
  background-color:#F8FAFC;
  background-image:linear-gradient(#F8FAFC,#F8FAFC);
  pointer-events:none;
}
.maq-toolbar input{
  flex:1;
  min-width:240px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:13px;
}
.maq-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:12px;
}
.maq-card{
  position:relative;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  padding:10px;
  cursor:pointer;
  transition:box-shadow .15s ease, transform .15s ease;
}
.maq-card:hover{
  box-shadow:0 8px 22px rgba(15,23,42,.10);
  transform:translateY(-1px);
}
.maq-photo{
  height:128px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  background-color:#fff;
  border:0;
  border-radius:6px;
  overflow:hidden;
  margin-bottom:10px;
  color:var(--ink-soft);
  font-size:12px;
}
.maq-photo img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
  background-color:#fff;
}
.maq-line{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:8px;
  align-items:start;
  font-size:12.5px;
  min-height:34px;
}
.maq-line strong,.maq-line span{
  overflow:hidden;
  text-overflow:ellipsis;
}
.maq-meta{
  margin-top:5px;
  font-size:12px;
  color:var(--ink-soft);
}
.maq-worker-link{
  margin-top:8px;
  width:100%;
  border:0;
  border-top:1px solid var(--line);
  background:transparent;
  padding:8px 2px 0;
  color:#0F172A;
  text-align:left;
  font-size:12.5px;
  font-weight:700;
  cursor:pointer;
}
.maq-form-grid{
  display:grid;
  grid-template-columns:170px 1fr;
  gap:16px;
}
.maq-foto-preview{
  height:140px;
  border:0;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ink-soft);
  background:#fff;
  background-color:#fff;
  overflow:hidden;
}
.maq-foto-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
  background-color:#fff;
}
.maq-f-nome-field{
  grid-column:1 / -1;
}
.maq-garantia{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.maq-estado-checks{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:4px;
}
.maq-estado-check{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--line);
  border-radius:6px;
  padding:6px 10px;
  background:#fff;
  color:var(--ink-soft);
  font-size:12.5px;
  font-weight:700;
  cursor:pointer;
}
.maq-estado-check input{
  margin:0;
}
.maq-estado-check.active{
  border-color:var(--accent);
  background:rgba(26,46,64,.08);
  color:var(--accent);
}
.maq-kit-pick{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:6px 12px;
  max-height:210px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px;
}
.maq-kit-pick label{
  font-size:12px;
  display:flex;
  align-items:center;
  gap:6px;
}
.kit-item-foto-preview{
  width:46px;
  height:38px;
  margin:0 auto 4px;
  border:0;
  border-radius:4px;
  background:#fff;
  background-color:#fff;
  color:var(--ink-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  font-size:11px;
}
.kit-item-foto-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
  background-color:#fff;
}
.kit-item-foto-btn{
  display:block;
  width:46px;
  margin:0 auto;
  padding:3px 0!important;
  font-size:10.5px!important;
  text-align:center;
  cursor:pointer;
}
.maq-simple-table select.kit-item-aquisicao,
.maq-simple-table select.kit-item-marca{
  min-width:92px;
}
.maq-simple-table textarea.kit-item-info-data{
  min-width:190px;
  min-height:52px;
  resize:vertical;
}
.maq-simple-table select.kit-item-trabalhador{
  min-width:190px;
}
.maq-kit-editor{
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px;
  background:#fff;
  overflow-x:auto;
}
.maq-kit-editor .maq-simple-table{
  min-width:1380px;
}
.maq-kit-editor input,
.maq-kit-editor select,
.maq-kit-editor textarea{
  width:100%;
  min-width:96px;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:5px;
  font-size:12.5px;
}
.kit-item-del{
  min-width:32px;
  padding:6px 8px;
  color:#9B2C2C;
}
.maq-simple-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:12.5px;
  background:#fff;
  background-color:#fff;
}
.maq-simple-table th,.maq-simple-table td{
  border:1px solid var(--line);
  padding:7px 8px;
  text-align:left;
  vertical-align:top;
}
.maq-simple-table th{
  position:sticky;
  top:0;
  z-index:180;
  opacity:1;
  background:#F1F5F9;
  background-color:#F1F5F9;
  background-image:linear-gradient(#F1F5F9,#F1F5F9);
  background-repeat:repeat;
  background-clip:padding-box;
  font-weight:700;
}
#content-root .maq-shell .maq-simple-table th{
  top:58px;
  z-index:250;
  box-shadow:0 2px 0 var(--line,#d9dee3),0 10px 18px rgba(15,23,42,.14);
}
#content-root .maq-shell .maq-simple-table th > *,
#content-root #maq-tabela thead th > *{
  position:relative;
  z-index:260;
}
#content-root .maq-shell .maq-simple-table th input,
#content-root .maq-shell .maq-simple-table th select,
#content-root #maq-tabela thead th input,
#content-root #maq-tabela thead th select{
  position:relative;
  z-index:270;
  background:#fff!important;
  background-color:#fff!important;
  background-clip:padding-box!important;
}
@media(max-width:760px){
  .maq-form-grid{grid-template-columns:1fr}
  .maq-card-grid{grid-template-columns:1fr}
}


/* PWPLADUR 1565 — estados, kits, manutenção e histórico de máquinas. */
.maq-state-tabs,.maq-maint-tabs,.maq-doc-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;padding-bottom:7px;border-bottom:1px solid var(--line)}
.maq-state-tab,.maq-maint-tab,.maq-doc-tab{border:1px solid var(--line);background:#fff;border-radius:6px;padding:7px 11px;font-size:12px;font-weight:800;cursor:pointer;transition:.15s ease}
.maq-state-tab span{font-weight:600;opacity:.72;margin-left:4px}
.maq-state-tab.active{box-shadow:inset 0 -3px 0 var(--maq-tab-cor,#334155);border-color:var(--maq-tab-cor,#94A3B8);background:#F8FAFC}
.maq-state-tab[data-state="__TODAS__"].active{--maq-tab-cor:#334155}
.maq-maint-tab.active,.maq-doc-tab.active{background:#0F172A;color:#fff;border-color:#0F172A}
.maq-estado-check{border-color:var(--maq-estado-cor,var(--line))!important}
.maq-estado-check.active{box-shadow:inset 0 -3px 0 var(--maq-estado-cor,#334155)!important}
.maq-kit-modal-box{width:min(1500px,98vw)!important;max-width:1500px!important;max-height:94vh!important;overflow:auto!important}
.maq-kit-editor{width:100%;max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:6px;padding:6px;background:#fff}
.maq-kit-items-table{min-width:1420px!important;width:100%!important}
.maq-kit-items-table th,.maq-kit-items-table td{vertical-align:top;white-space:nowrap}
.maq-kit-items-table input,.maq-kit-items-table select,.maq-kit-items-table textarea{min-width:105px;box-sizing:border-box}
.maq-kit-items-table .kit-item-info-data{min-width:180px}
.maq-kit-items-table .kit-item-trabalhador{min-width:180px}
.maq-kit-items-table .kit-item-estado{min-width:145px}
.maq-autocomplete{position:relative}
.maq-autocomplete>input[type="text"],.maq-autocomplete>input:not([type]){width:100%;box-sizing:border-box}
.maq-autocomplete-options{display:none;position:absolute;left:0;right:0;top:calc(100% + 3px);z-index:1000;max-height:260px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 12px 28px rgba(15,23,42,.18)}
.maq-ac-option{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:8px 10px;border:0;border-bottom:1px solid var(--line);background:#fff;cursor:pointer;font-size:12.5px}
.maq-ac-option:hover{background:#F8FAFC}.maq-ac-option small{color:var(--ink-soft);white-space:nowrap}
.maq-manut-history{border:1px solid var(--line);border-radius:6px;overflow:hidden}
.maq-manut-history-row{display:grid;grid-template-columns:minmax(150px,1fr) 110px minmax(180px,1.2fr) minmax(180px,1.2fr);gap:10px;padding:8px 10px;border-bottom:1px solid var(--line);font-size:12px;align-items:center}
.maq-manut-history-row:last-child{border-bottom:0}
.maq-history-group{border:1px solid var(--line);border-radius:8px;background:#fff;margin-bottom:12px;overflow:hidden}
.maq-history-head{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:10px;padding:10px 12px;background:#F8FAFC;border-bottom:1px solid var(--line)}
.maq-history-head>span{font-size:11.5px;color:var(--ink-soft)}
.maq-history-photo{width:42px;height:42px;border:1px solid var(--line);border-radius:5px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff}
.maq-history-photo img{width:100%;height:100%;object-fit:contain}
.maq-history-table-wrap{overflow:auto;max-width:100%}
.maq-history-table-wrap .maq-simple-table{min-width:820px}
@media(max-width:760px){.maq-manut-history-row{grid-template-columns:1fr}.maq-history-head{grid-template-columns:40px 1fr}.maq-history-head>span{grid-column:2}}
