/* Focused usability fixes for purchase, order tree, and logistics settings. */
.jp-tool.jp-compact-icon {
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-left: 1px solid #e1e6eb;
  border-right: 1px solid #e1e6eb;
  font-size: 15px;
  font-weight: 600;
  line-height: 28px;
}

.jp-tool.jp-compact-icon + .jp-tool.jp-compact-icon { border-left: 0; }
.jp-order-status-tree > [hidden] { display: none !important; }

.ap-po-builder { min-height: 100%; }
.ap-po-builder-card { margin-top: 10px; }
.ap-po-builder-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 13px 16px;
  padding: 16px;
}
.ap-po-builder-form label { display: flex; flex-direction: column; gap: 5px; color: #5c6977; }
.ap-po-builder-form label.span2 { grid-column: span 2; }
.ap-po-builder-form input,
.ap-po-builder-form select { width: 100%; height: 32px; padding: 4px 8px; border: 1px solid #cbd4dd; border-radius: 2px; background: #fff; }
.ap-po-builder-items { max-height: calc(100vh - 335px); min-height: 250px; border: 0; overflow: auto; }
.ap-po-builder-items .ap-table { min-width: 900px; }
.ap-po-builder-items .ap-po-qty { width: 88px; height: 28px; padding: 3px 7px; border: 1px solid #cbd4dd; }
.ap-po-builder-actions { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border: 1px solid #d8dfe7; background: #fff; box-shadow: 0 -3px 10px rgba(15,23,42,.06); }
.ap-po-builder-actions button { height: 32px; padding: 0 18px; border: 1px solid #c8d1da; border-radius: 2px; background: #fff; color: #526170; cursor: pointer; }
.ap-po-builder-actions button.primary { border-color: #168fd1; background: #168fd1; color: #fff; }
#ap-po-modal .ap-po-items { max-height: 360px; }
#ap-po-modal .ap-po-items .ap-table { min-width: 760px; }
#ap-po-modal .ap-po-qty { width: 78px; }

@media (max-width: 1180px) {
  .ap-po-builder-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
