/* AME MAIS | Card operacional v6.
   Uma folha final concentra estados retráteis, balanço e edição.
   As regras do catálogo legado permanecem apenas como base visual. */
.products-panel .product-card-v3 .grouped-inventory-actions.product-card-actions-v5,
.c-dashboard .product-card-v3 .grouped-inventory-actions.product-card-actions-v5{
  display:flex!important;flex-direction:column!important;gap:8px!important;
  padding:10px 18px 13px!important;width:100%!important;min-width:0!important;
  min-height:0!important;border-top:1px solid #e5ebe7!important;background:#fff!important;
  margin:0!important;align-self:end!important;
}
.products-panel .product-card-v3 .product-card-action-primary-row,
.c-dashboard .product-card-v3 .product-card-action-primary-row{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;
}
.products-panel .product-card-v3 .product-card-action-secondary-row,
.c-dashboard .product-card-v3 .product-card-action-secondary-row{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;
}
.products-panel .product-card-v3 .product-card-actions-v5 button,
.c-dashboard .product-card-v3 .product-card-actions-v5 button{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;min-width:0!important;max-width:none!important;min-height:42px!important;
  margin:0!important;padding:9px 8px!important;border-radius:10px!important;
  border:1px solid #cddfd3!important;box-shadow:none!important;cursor:pointer!important;
  font-family:inherit!important;font-size:.82rem!important;font-weight:700!important;line-height:1.22!important;text-align:center!important;white-space:normal!important;
  overflow-wrap:anywhere;
}
.products-panel .product-card-v3 .product-card-actions-v5 .product-card-action-primary,
.c-dashboard .product-card-v3 .product-card-actions-v5 .product-card-action-primary{
  background:#fff!important;color:#18573b!important;font-weight:750!important;min-height:47px!important;
}
.products-panel .product-card-v3 .product-card-actions-v5 .product-card-action-stock,
.c-dashboard .product-card-v3 .product-card-actions-v5 .product-card-action-stock{
  background:#166446!important;color:#fff!important;border-color:#166446!important;
}
.products-panel .product-card-v3 .product-card-actions-v5 [aria-expanded="true"]:not(.product-card-action-stock),
.c-dashboard .product-card-v3 .product-card-actions-v5 [aria-expanded="true"]:not(.product-card-action-stock){
  background:#eaf5ee!important;border-color:#81b79b!important;
}
.products-panel .product-card-v3 .product-card-actions-v5 .product-card-action-secondary,
.c-dashboard .product-card-v3 .product-card-actions-v5 .product-card-action-secondary{
  background:#f9fbf9!important;color:#38694c!important;font-size:.75rem!important;
  min-height:39px!important;font-weight:670!important;
}
.products-panel .product-card-v3 .product-card-actions-v5 button:focus-visible,
.c-dashboard .product-card-v3 .product-card-actions-v5 button:focus-visible{
  outline:3px solid #7bb69b!important;outline-offset:2px;
}
.products-panel .product-card-v3 .product-card-actions-v5 button:hover,
.c-dashboard .product-card-v3 .product-card-actions-v5 button:hover{filter:brightness(.965)}
.products-panel .product-card-v3 .product-card-codes,.c-dashboard .product-card-v3 .product-card-codes{
  font-size:.72rem;color:#708478;overflow-wrap:anywhere;
}
.products-panel .product-card-v3 .product-stock-total,
.c-dashboard .product-card-v3 .product-stock-total{
  background:#e8f5ed!important;border:1px solid #cde5d5!important;
  border-radius:12px!important;padding:9px 13px!important;
}
.products-panel .product-card-v3 .product-stock-total b,
.c-dashboard .product-card-v3 .product-stock-total b{font-size:clamp(1.6rem,2.2vw,2.2rem)!important}
.products-panel .product-card-v3 .stock-total-breakdown,
.c-dashboard .product-card-v3 .stock-total-breakdown{gap:8px!important}
.products-panel .product-card-v3 .stock-total-metric,
.c-dashboard .product-card-v3 .stock-total-metric{
  border:1px solid #e2ebe5!important;background:#f8faf8!important;
  border-radius:10px!important;min-height:63px!important;padding:8px 11px!important;
}
.products-panel .product-card-v3 .stock-total-metric strong,
.c-dashboard .product-card-v3 .stock-total-metric strong{color:#1c5740!important;font-size:1.45rem!important}
/* Abas recolhidas não ocupam espaço; abertas continuam dentro do próprio card. */
.products-panel .product-card-v3 .card-workspace:not([open]),
.c-dashboard .product-card-v3 .card-workspace:not([open]){display:none!important}
.products-panel .product-card-v3 .card-workspace[open],
.c-dashboard .product-card-v3 .card-workspace[open]{
  display:block!important;grid-column:1/-1!important;grid-row:4!important;
  width:100%!important;min-width:0!important;margin:0!important;padding:0 14px 15px!important;
  order:3!important;background:#fff!important;border-top:1px solid #e2ebe5!important;
}
.products-panel .product-card-v3 .card-workspace>summary,
.c-dashboard .product-card-v3 .card-workspace>summary{display:none!important}
.product-card-v3 .card-workspace [hidden]{display:none!important}
.product-card-v3 .card-workspace-tabs{
  display:flex;align-items:stretch;gap:4px;border-bottom:1px solid #cfe1d5;
  background:#f3f8f4;border-radius:11px 11px 0 0;overflow-x:auto;scrollbar-width:thin;
  margin:12px 0 10px;padding:4px;max-width:100%;
}
.product-card-v3 .card-workspace-tabs button{
  border:0;background:transparent;border-radius:8px;padding:10px 14px;
  font-weight:720;font-size:.83rem;color:#416d55;white-space:nowrap;flex:1 0 auto;
  cursor:pointer;min-height:40px;
}
.product-card-v3 .card-workspace-tabs button[aria-selected="true"]{
  background:#176548;color:#fff;box-shadow:0 1px 4px #10523a22;
}
.product-card-v3 .card-workspace-help{
  margin:8px 0 12px;color:#5f7669;font-size:.82rem;line-height:1.4;
}
.product-card-v3 .card-balance-list{
  display:flex;flex-direction:column;gap:7px;
}
.product-card-v3 .card-balance-row{
  display:grid;grid-template-columns:minmax(165px,1fr) minmax(0,2.15fr);
  gap:10px;align-items:center;padding:10px;border:1px solid #dae8df;border-radius:10px;
  background:#fff;min-width:0;
}
.product-card-v3 .card-balance-row.has-difference{border-color:#d69f8e;background:#fffaf8}
.product-card-v3 .card-balance-identity{display:grid;grid-template-columns:min-content minmax(0,1fr);gap:2px 8px;align-items:center;min-width:0}
.product-card-v3 .card-balance-identity>strong{
  background:#e4f3e9;color:#155b3e;padding:8px 9px;border-radius:8px;
  min-width:40px;text-align:center;font-size:1.06rem;grid-row:1/3;
}
.product-card-v3 .card-balance-identity>span{font-weight:760;color:#194d36;font-size:.87rem}
.product-card-v3 .card-balance-identity>small{
  color:#6b8073;font-size:.69rem;line-height:1.2;overflow-wrap:anywhere;
}
.product-card-v3 .card-balance-metrics{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;align-items:stretch;min-width:0;
}
.product-card-v3 .card-balance-metrics>div,.product-card-v3 .card-balance-metrics>label{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:5px;min-width:0;background:#eff5f0;border-radius:8px;padding:7px 3px;
}
.product-card-v3 .card-balance-metrics small{font-size:.67rem;color:#4c6c58}
.product-card-v3 .card-balance-metrics strong{font-size:1.04rem;color:#155238;font-variant-numeric:tabular-nums}
.product-card-v3 .card-balance-metrics>label{background:#fff;border:1px solid #c9dfcf;padding:4px}
.product-card-v3 .card-balance-metrics input{
  width:100%!important;max-width:110px;min-width:0!important;min-height:39px!important;
  background:#fff!important;border:1px solid #b5d2bf!important;border-radius:7px!important;
  color:#123d2b!important;text-align:center;font-weight:850;font-size:1rem!important;
  font-variant-numeric:tabular-nums;padding:3px!important;
}
.product-card-v3 .card-balance-metrics input:disabled{background:#f5f6f5!important;color:#52675b!important}
.product-card-v3 .card-balance-note{
  display:flex;flex-direction:column;gap:7px;margin:11px 0 0;
  color:#8f3b2d;font-weight:700;font-size:.8rem;
}
.product-card-v3 .card-balance-note[hidden]{display:none!important}\n.product-card-v3 .card-balance-note textarea{
  width:100%;border:1px solid #dbb6a8;border-radius:9px;padding:10px;font:inherit;resize:vertical;
  color:#193e2e;background:#fff;
}
.product-card-v3 .card-balance-footer{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 0 0;border-top:1px solid #e5eee7;margin-top:12px;flex-wrap:wrap;
}
.product-card-v3 .card-balance-footer span{font-size:.8rem;color:#5b7163}
.product-card-v3 .card-balance-footer button{min-height:44px;padding:10px 22px;border-radius:9px}
.product-card-v3 .card-stock-move-list,.product-card-v3 .card-editor-variation-list{
  display:flex;flex-direction:column;gap:8px;
}
.product-card-v3 .card-stock-move-row,.product-card-v3 .card-editor-variation{
  display:flex;align-items:center;gap:8px;justify-content:space-between;
  border:1px solid #e0ebe4;border-radius:10px;padding:10px;flex-wrap:wrap;
}
.product-card-v3 .card-stock-move-row strong{color:#18573b}
.product-card-v3 .card-stock-move-row span{color:#667e70;font-size:.78rem}
.product-card-v3 .card-stock-move-buttons{display:flex;flex-wrap:wrap;gap:6px}
.product-card-v3 .card-stock-move-buttons button{
  min-height:37px;background:#f3f8f4;border:1px solid #c8dfd0;
  color:#1c5d41;border-radius:8px;padding:7px 11px;font-weight:700;cursor:pointer;
}
.product-card-v3 .card-stock-history{list-style:none;margin:0;padding:0}
.product-card-v3 .card-stock-history li{display:flex;flex-wrap:wrap;gap:5px 14px;border-bottom:1px solid #e6eee8;padding:9px 0;font-size:.82rem}
.product-card-v3 .card-stock-history small{margin-left:auto;color:#6b8073}
.product-card-v3 .card-editor-accordion{
  border:1px solid #e0eae3;border-radius:10px;margin:9px 0;
  padding:0 12px;background:#fff;overflow:hidden;
}
.product-card-v3 .card-editor-accordion>summary{
  display:list-item!important;cursor:pointer;font-weight:800;color:#18573b;
  padding:13px 4px;background:#f3f8f4;margin:0 -12px;padding-left:16px;
}
.product-card-v3 .card-editor-accordion[open]{padding-bottom:12px}
.product-card-v3 .card-editor-accordion label{
  display:flex;flex-direction:column;gap:6px;margin:10px 0;font-size:.8rem;color:#3c5d4a;font-weight:750;
}
.product-card-v3 .card-editor-accordion input,.product-card-v3 .card-editor-accordion select{
  border:1px solid #c6d9ca;border-radius:8px;padding:9px;min-height:41px;width:100%;
  background:#fff;color:#204b36;font:500 .88rem/1.3 inherit;
}
.product-card-v3 .card-editor-actions{display:flex;justify-content:flex-end;padding-top:10px}
.product-card-v3 .card-editor-actions button{min-height:44px}
.product-card-v3 .card-editor-variation>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.product-card-v3 .card-editor-variation strong{color:#164f38}
.product-card-v3 .card-editor-variation small{font-size:.73rem;color:#738476;overflow-wrap:anywhere}
.product-card-v3 .card-editor-variation button{
  border:1px solid #c6dccc;border-radius:8px;padding:8px 11px;background:#f5faf7;color:#195d40;cursor:pointer;
}
.product-card-v3 .card-admin-tools summary{color:#995044}
.product-card-v3 .card-admin-tools .danger{color:#a53732!important;border-color:#e2c2c0!important}
@media(min-width:761px){
  .products-panel .product-card-v3 .grouped-inventory-actions.product-card-actions-v5,
  .c-dashboard .c-dashboard-recent-products .product-card-v3 .grouped-inventory-actions.product-card-actions-v5{
    grid-column:2!important;grid-row:3!important;
  }
}
@media(max-width:760px){
  .products-panel .product-card-v3 .grouped-inventory-actions.product-card-actions-v5,
  .c-dashboard .product-card-v3 .grouped-inventory-actions.product-card-actions-v5{
    order:2!important;padding:10px!important;
  }
  .products-panel .product-card-v3 .card-workspace[open],
  .c-dashboard .product-card-v3 .card-workspace[open]{
    grid-column:auto!important;grid-row:auto!important;order:3!important;padding:0 10px 14px!important;
  }
  .product-card-v3 .card-balance-row{grid-template-columns:minmax(0,1fr);gap:8px}
  .product-card-v3 .card-balance-identity{grid-template-columns:min-content minmax(0,1fr)}
  .product-card-v3 .card-balance-metrics{gap:4px}
  .product-card-v3 .card-balance-metrics small{font-size:.61rem}
  .product-card-v3 .card-balance-metrics input{min-height:40px!important}
  .product-card-v3 .card-balance-footer{position:sticky;bottom:0;background:#fff;z-index:3;padding:11px 1px 9px}
  .product-card-v3 .card-balance-footer button{width:100%}
  .product-card-v3 .card-workspace-tabs button{font-size:.75rem;padding:10px 9px}
  .product-card-v3 .card-stock-move-row{align-items:flex-start;flex-direction:column}
  .product-card-v3 .card-stock-move-buttons{width:100%}
  .product-card-v3 .card-stock-move-buttons button{flex:1}
}
@media(max-width:380px){
 .products-panel .product-card-v3 .product-card-action-secondary-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .products-panel .product-card-v3 .product-card-action-secondary-row>button:last-child:nth-child(odd){grid-column:1/-1}
}


/* Leitor USB/HID e câmera: entrada local, sem trocar o filtro do catálogo. */
.product-card-v3 .card-balance-search{
 display:flex;align-items:stretch;gap:8px;margin:10px 0;min-width:0;
}
.product-card-v3 .card-balance-search input{
 flex:1 1 200px;min-width:0;min-height:44px;border:1px solid #bed9c8;
 border-radius:9px;padding:9px 12px;color:#1b4e35;background:#fff;font-size:.86rem;
}
.product-card-v3 .card-balance-search button{
 flex:0 0 auto;min-height:44px;border:1px solid #bcdaca;border-radius:9px;
 color:#1a5b40;background:#f0f8f3;font-weight:740;padding:8px 12px;cursor:pointer;
}
@media(max-width:380px){
 .product-card-v3 .card-balance-search{flex-wrap:wrap}
 .product-card-v3 .card-balance-search button{flex:1 1 100%}
}


/* No seletor, tamanhos já cadastrados ficam visíveis mas não selecionáveis. */
.add-sizes-picker .size-chip-existing{
 display:inline-flex;align-items:center;justify-content:center;min-height:43px;
 padding:8px 12px;background:#e8f5eb;border:1px solid #c8e2d0;
 border-radius:9px;color:#176044;font-size:.88rem;font-weight:750;cursor:default;
 opacity:.88;
}
