/* UX Fase 3B: Peças e Estoque — somente tela. Mantém impressão original. */
#pieceForm .ux-piece-group{grid-column:1/-1;min-width:0;border:1px solid #dce6db;
 border-radius:11px;padding:12px;margin:0 0 10px;background:#fdfefd}
#pieceForm .ux-piece-group legend{padding:0 7px;font-size:13px;font-weight:800;color:#31563a}
#pieceForm .ux-piece-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#pieceForm .ux-piece-group-grid>.field{margin:0;min-width:0}
#pieceForm .ux-piece-group-grid>.field.full{grid-column:1/-1}
#pieceForm .ux-piece-hint{grid-column:1/-1;font-size:12px;color:#62785f;
 background:#f2f7ef;padding:10px;border-left:3px solid #89b752;border-radius:7px}
.ux-piece-extra{font-size:11px;color:#607669;margin:7px 0 0}
.ux-stage-label{display:none;font-size:11px;font-weight:800;color:#47694a;margin:0 0 5px}
#piecesTable select.status{max-width:100%;min-height:42px}
.ux-stock-actions{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0 7px}
.ux-stock-actions button{min-height:44px;padding:10px 13px;background:#fff;
 border:1px solid #bad0bc;border-radius:9px;font-weight:750;color:#31543a}
.ux-stock-actions button:first-child{background:#e9f4e6;border-color:#b0d19b}
.ux-stock-actions button[hidden]{display:none!important}
.ux-stock-sections{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 14px}
.ux-stock-sections button{padding:8px 11px;min-height:38px;font-size:12px;
 border:0;background:#edf2ed;color:#435d45;border-radius:7px}
.ux-stock-sections button[hidden]{display:none!important}
.ux-stock-actions button:focus-visible,.ux-stock-sections button:focus-visible{
 outline:3px solid #83b735;outline-offset:2px}
.ux-stock-group{border:1px solid #e0e8df;padding:12px;border-radius:10px;
 margin:0 0 12px;background:#fcfefb;min-width:0}
.ux-stock-group h3{font-size:13px;margin:0 0 11px;color:#36523a}
.ux-stock-group>summary{cursor:pointer;list-style:revert;font-size:13px;font-weight:800;
 color:#36523a;min-height:26px}
.ux-stock-group[open]>summary{margin-bottom:11px}
.ux-stock-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ux-stock-field-grid>div{min-width:0}
.ux-stock-field-grid>div.stock-full{grid-column:1/-1}
.ux-stock-field-grid input,.ux-stock-field-grid select,.ux-stock-field-grid textarea{max-width:100%;min-width:0;width:100%}
#stockTable .ux-stock-card-caption{font-size:11px}
@media(max-width:760px){
 #pieceForm .ux-piece-group{padding:9px 10px}
 #pieceForm .ux-piece-group-grid{grid-template-columns:minmax(0,1fr);gap:9px}
 #pieceForm .ux-piece-group-grid>.field.full{grid-column:auto}
 .ux-stage-label{display:block}
 #piecesTable,#stockTable{overflow:visible!important}
 #piecesTable table,#piecesTable tbody,#piecesTable tr,#piecesTable td,
 #stockTable table,#stockTable tbody,#stockTable tr,#stockTable td{
  display:block!important;min-width:0!important;width:100%!important;
 }
 #piecesTable thead,#stockTable thead{position:absolute!important;width:1px!important;
  height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
 #piecesTable tbody,#stockTable tbody{display:grid!important;gap:11px}
 #piecesTable tr,#stockTable tr{background:#fff;border:1px solid #dae6db;border-radius:11px;
  box-shadow:0 1px 5px #1b301216;padding:10px 12px}
 #piecesTable td,#stockTable td{border-bottom:1px solid #edf1eb;padding:8px 0;overflow-wrap:anywhere}
 #piecesTable td:first-child,#stockTable td:first-child{font-weight:650}
 #piecesTable td:nth-child(2)::before{content:"Material e dimensões (cm)";display:block;
  font-size:11px;font-weight:800;color:#687d6c;margin-bottom:5px}
 #piecesTable td:nth-child(3)::before{content:"Etapa de produção";display:block;
  font-size:11px;font-weight:800;color:#687d6c;margin-bottom:5px}
 #piecesTable td:last-child,#stockTable td:last-child{border-bottom:0}
 #piecesTable td:last-child button{min-height:40px;margin:2px}
 #piecesTable select.status{width:100%;border-radius:8px}
 #stockTable td:nth-child(2)::before{content:"Categoria e dimensões";display:block;font-size:11px;
  font-weight:800;color:#687d6c;margin-bottom:4px}
 #stockTable td:nth-child(3)::before{content:"Localização";display:block;font-size:11px;
  font-weight:800;color:#687d6c;margin-bottom:4px}
 #stockTable td:nth-child(4)::before{content:"Saldo";display:block;font-size:11px;
  font-weight:800;color:#687d6c;margin-bottom:4px}
 #stockTable td:nth-child(5)::before{content:"Mínimo";display:block;font-size:11px;
  font-weight:800;color:#687d6c;margin-bottom:4px}
 #stockTable td:nth-child(6)::before{content:"Situação";display:block;font-size:11px;
  font-weight:800;color:#687d6c;margin-bottom:4px}
 #stockTable td:last-child button{min-height:40px;margin:3px 3px 3px 0}
 .ux-stock-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .ux-stock-actions button{min-width:0;white-space:normal}
 .ux-stock-field-grid{grid-template-columns:minmax(0,1fr)}
 .ux-stock-field-grid>div.stock-full{grid-column:auto}
 .ux-stock-group{padding:10px}
 #stockHistory,#stockDemandTable{max-width:100%;overflow-x:auto}
}
@media(max-width:360px){
 .ux-stock-actions{grid-template-columns:1fr}
}
@media print{
 .ux-stock-actions,.ux-stock-sections,.ux-piece-hint,.ux-piece-extra{display:none!important}
}
