.box-goods[hidden], #listing-controls[hidden], #content[hidden], #box-batch-dialog [hidden],
.box-goods [hidden] { display: none !important; }

.box-workflow-head, .box-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.box-workflow-head h2, .box-workflow-head p { margin: 0; }
.box-workflow-actions { margin-block: 12px; }
.box-goods #goods-error:empty, #box-batch-error:empty, .box-item-error:empty { display: none; }
.box-goods-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  align-items: start;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.box-goods-item {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}
.box-goods-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  cursor: pointer;
}
.box-goods-choice strong { overflow-wrap: anywhere; }
.box-goods-choice input, #box-batch-test {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.box-test-mark {
  margin-inline-start: 6px;
  color: #f3cd82;
  font-size: 11px;
  font-weight: 700;
}
.box-goods-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 4px 0; }
.box-goods summary, .box-batch-prices summary { color: var(--accent); cursor: pointer; }
.box-goods-item p { margin: 4px 0; overflow-wrap: anywhere; white-space: pre-wrap; }

#box-batch-dialog { width: min(860px, 96vw); }
.box-batch-client { margin: 14px 0 18px; }
#box-batch-client { max-width: 100%; }
#box-batch-test-field { margin-top: 10px; }
#box-batch-test { vertical-align: middle; }
.box-batch-item {
  margin: 0 0 14px;
  padding: 10px 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.box-batch-item legend { padding-inline: 7px; font-weight: 700; }
.box-batch-remove { display: block; margin: 0 0 7px auto; }
.box-batch-item .formgrid { margin-block: 8px; }
.box-batch-prices { margin-top: 10px; }
.box-batch-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#box-batch-dialog [data-box-field="itens"] { min-height: 55px; }
@media (max-width: 650px) {
  .box-goods-list { grid-template-columns: 1fr; }
  .box-workflow-actions { align-items: start; }
  .box-batch-item { padding-inline: 9px; }
}
