/* High-fidelity JPERP-style data workbenches. Own code; no vendor assets. */
body.jperp-workbench-mode { overflow:hidden; background:#fff; }
body.jperp-workbench-mode .sidebar { width:80px; transition:none; }
body.jperp-workbench-mode .sidebar .logo { height:42px; padding:0; justify-content:center; }
body.jperp-workbench-mode .sidebar .logo span { display:none; }
body.jperp-workbench-mode .sidebar .logo-icon { font-size:22px; }
body.jperp-workbench-mode .sidebar .menu { padding:4px 7px; overflow-y:auto; }
body.jperp-workbench-mode .sidebar .menu-item { min-height:58px; padding:6px 2px; margin:2px 0; display:flex; flex-direction:column; justify-content:center; gap:2px; border-radius:2px; text-align:center; }
body.jperp-workbench-mode .sidebar .menu-item .menu-icon { margin:0; font-size:18px; }
body.jperp-workbench-mode .sidebar .menu-item span:last-child { font-size:11px; white-space:nowrap; }
body.jperp-workbench-mode .sidebar .menu-item.jp-active { background:#1890ff; color:#fff; }
body.jperp-workbench-mode .sidebar .submenu { position:fixed; left:80px; z-index:1200; width:138px; background:#fff; color:#43526a; border:1px solid #d9e0e8; box-shadow:0 4px 14px rgba(0,0,0,.12); }
body.jperp-workbench-mode .sidebar .submenu-item { padding:9px 12px; }
body.jperp-workbench-mode .header { left:80px; height:42px; padding:0 12px; box-shadow:none; border-bottom:1px solid #dce2e8; }
body.jperp-workbench-mode .header .breadcrumb { font-size:13px; }
body.jperp-workbench-mode .header-right { gap:5px; }
body.jperp-workbench-mode .header-btn { width:30px; height:30px; }
body.jperp-workbench-mode .main-content { margin-left:80px; margin-top:42px; padding:0; height:calc(100vh - 42px); min-height:0; }
body.jperp-workbench-mode .tab-content { height:100%; }

.jp-shell { height:100%; background:#fff; color:#3f4b5b; border:0; border-radius:0; box-shadow:none; overflow:hidden; font-size:12px; }
.jp-toolbar { height:34px; padding:2px 8px; display:flex; align-items:center; gap:3px; border-bottom:1px solid #d9dfe6; background:#fafafa; position:relative; overflow:visible; z-index:8; }
.jp-search-group { display:flex; align-items:center; height:27px; min-width:0; }
.jp-search-field { width:102px; height:27px; padding:0 5px; border:1px solid #cfd6df; border-radius:2px 0 0 2px; background:#fff; color:#475569; font-size:12px; outline:none; }
.jp-search { height:27px; width:210px; padding:3px 9px; border:1px solid #cfd6df; border-left:0; border-radius:0; font-size:12px; outline:none; }
.jp-search:focus { border-color:#3d9cff; }
.jp-search-button,.jp-search-clear,.jp-search-filter { height:27px; padding:0 8px; border:1px solid #cfd6df; border-left:0; background:#fff; color:#526170; cursor:pointer; font-size:12px; }
.jp-search-button { background:#168fd1; border-color:#168fd1; color:#fff; }
.jp-search-button:hover { background:#087fc1; }
.jp-search-clear { font-size:16px; line-height:1; }
.jp-search-clear:hover,.jp-search-filter:hover { background:#edf7ff; color:#168fd1; }
.jp-search-filter { margin-left:3px; border-left:1px solid #cfd6df; border-radius:2px; }
.jp-search-summary { min-width:35px; padding-left:7px; color:#738091; white-space:nowrap; }
.jp-search-filter-panel { display:none; position:absolute; top:33px; left:50px; z-index:1500; width:min(650px,calc(100vw - 150px)); padding:13px; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:11px 13px; border:1px solid #bfcbd8; border-radius:3px; background:#fff; box-shadow:0 9px 28px rgba(15,23,42,.2); }
.jp-search-filter-panel.open { display:grid; }
.jp-search-filter-panel > div { min-width:0; }
.jp-search-filter-panel label { display:block; margin-bottom:5px; color:#607080; font-size:11px; }
.jp-search-filter-panel select,.jp-search-filter-panel input { width:100%; height:29px; padding:3px 7px; border:1px solid #cbd5df; border-radius:2px; background:#fff; color:#3f4b5b; font-size:12px; }
.jp-search-filter-panel .jp-date-range { display:grid; grid-template-columns:1fr 16px 1fr; align-items:center; gap:3px; }
.jp-search-filter-panel .jp-date-range b { color:#8a96a3; text-align:center; font-weight:400; }
.jp-search-filter-panel .jp-filter-actions { display:flex; align-items:flex-end; gap:7px; }
.jp-search-filter-panel .jp-filter-actions button { height:29px; padding:0 13px; border:1px solid #168fd1; border-radius:2px; background:#168fd1; color:#fff; cursor:pointer; font-size:12px; }
.jp-search-filter-panel .jp-filter-actions button:last-child { border-color:#cbd5df; background:#fff; color:#526170; }
.jp-tool { height:27px; min-width:28px; padding:0 8px; border:0; border-right:1px solid #e4e8ed; background:transparent; color:#657383; cursor:pointer; font-size:12px; }
.jp-tool:hover { color:#1890ff; background:#eef7ff; }
.jp-tool.primary { color:#1687d9; }
.jp-tool.danger { color:#d4380d; }
.jp-spacer { flex:1; }
.jp-product-grid { height:calc(100% - 60px); display:grid; grid-template-columns:185px 40px minmax(450px,1fr) 40px minmax(380px,.82fr); min-height:0; }
.jp-order-grid { height:calc(100% - 60px); display:grid; grid-template-columns:185px minmax(760px,1fr); min-height:0; }
.jp-tree { min-width:0; background:#e9f8ff; border-right:1px solid #cadde8; overflow:auto; padding:7px 7px 35px; }
.jp-tree-filter { color:#1598e6; font-size:15px; height:27px; display:flex; align-items:center; }
.jp-tree-group { margin:4px 0; }
.jp-tree-row { height:28px; padding:0 7px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; border-radius:2px; white-space:nowrap; }
.jp-tree-row:hover,.jp-tree-row.active { background:#ccefff; color:#168fd1; }
.jp-tree-row.child { margin-left:21px; border-left:1px dotted #8fa8b8; }
.jp-tree-row.child:before { content:'└'; margin-right:4px; color:#7794a7; }
.jp-count { margin-left:8px; color:#7b8998; font-size:11px; }
.jp-rail { border-right:1px solid #d9dfe6; background:#f8f8f8; display:flex; flex-direction:column; align-items:center; padding-top:6px; gap:2px; }
.jp-rail button { width:32px; height:31px; border:0; background:transparent; color:#677686; cursor:pointer; font-size:16px; }
.jp-rail button:hover { background:#e8f5ff; color:#138ddb; }
.jp-pane { min-width:0; min-height:0; overflow:auto; border-right:1px solid #d9dfe6; }
.jp-table { border-collapse:collapse; min-width:100%; width:max-content; font-size:12px; background:#fff; }
.jp-table th { position:sticky; top:0; z-index:2; height:36px; padding:0 10px; border-right:1px solid #e5e8ec; border-bottom:1px solid #dfe4e9; background:#fafafa; color:#3e4a58; font-weight:500; white-space:nowrap; text-align:left; }
.jp-table td { height:34px; padding:0 10px; border-right:1px solid #edf0f2; border-bottom:1px solid #edf0f2; white-space:nowrap; }
.jp-order-thumb-wrap,.jp-order-thumb-fallback { display:inline-flex; width:32px; height:32px; align-items:center; justify-content:center; vertical-align:middle; }
.jp-order-thumb { display:block; width:30px; height:30px; object-fit:cover; border:1px solid #dbe3eb; border-radius:3px; background:#fff; }
.jp-order-thumb-fallback { font-size:16px; color:#94a3b8; background:#f8fafc; border:1px solid #dbe3eb; border-radius:3px; }
.jp-order-thumb-fallback[hidden] { display:none; }
.jp-table tbody tr { cursor:pointer; }
.jp-table tbody tr:hover { background:#f3faff; }
.jp-table tbody tr.selected { background:#dff3ff; }
.jp-table .link { color:#168fd1; font-weight:600; }
.jp-table th.jp-sortable { cursor:pointer; user-select:none; }
.jp-table th.jp-sortable:hover { background:#edf7ff; color:#168fd1; }
.jp-table th.jp-sort-active { background:#e5f4ff; color:#168fd1; font-weight:600; }
.jp-table.jp-density-comfortable th { height:42px; padding-left:13px; padding-right:13px; }
.jp-table.jp-density-comfortable td { height:41px; padding-left:13px; padding-right:13px; }
.jp-table.jp-wrap-cells td { max-width:260px; white-space:normal; line-height:1.45; padding-top:6px; padding-bottom:6px; }
.jp-table .jp-pinned-left,.jp-table .jp-pinned-right { position:sticky; z-index:3; background:#fff; box-shadow:1px 0 0 #dfe4e9; }
.jp-table th.jp-pinned-left,.jp-table th.jp-pinned-right { z-index:5; background:#fafafa; }
.jp-table tr:hover .jp-pinned-left,.jp-table tr:hover .jp-pinned-right { background:#f3faff; }
.jp-table tr.selected .jp-pinned-left,.jp-table tr.selected .jp-pinned-right { background:#dff3ff; }
.jp-grid-thumb { display:block; width:30px; height:30px; object-fit:cover; border:1px solid #dce3ea; border-radius:2px; transition:transform .15s ease,box-shadow .15s ease; transform-origin:left center; }
.jp-image-zoom-enabled .jp-grid-thumb:hover { position:relative; z-index:8; transform:scale(3.2); box-shadow:0 5px 18px rgba(15,23,42,.25); }
.jp-grid-thumb-empty { display:block; width:30px; text-align:center; color:#9aa5b1; }
.jp-empty { height:220px; text-align:center; color:#a0a8b2; }
.jp-detail-tabs { height:34px; display:flex; align-items:flex-end; border-bottom:1px solid #d9dfe6; background:#fff; position:sticky; top:0; z-index:4; }
.jp-detail-tab { height:34px; padding:9px 11px 7px; cursor:pointer; white-space:nowrap; }
.jp-detail-tab.active { border-top:2px solid #1598e6; border-left:1px solid #d9dfe6; border-right:1px solid #d9dfe6; background:#fff; font-weight:600; }
.jp-detail-content { min-width:0; overflow:auto; height:calc(100% - 34px); }
.jp-statusbar { height:26px; display:flex; align-items:center; padding:0 10px; border-top:1px solid #d7dde4; background:#fafafa; color:#687687; }
.jp-statusbar .pager { margin-left:auto; display:flex; align-items:center; gap:8px; }
.jp-statusbar button { border:0; background:transparent; color:#637283; cursor:pointer; }
.jp-statusbar button:disabled { color:#c4cbd2; cursor:not-allowed; }
.jp-statusbar select { height:22px; border:1px solid #cbd4dd; background:#fff; color:#596675; font-size:11px; }
.jp-order-main { min-width:0; min-height:0; display:grid; grid-template-rows:minmax(280px,56%) minmax(210px,44%); }
.jp-order-top { min-width:0; min-height:0; display:grid; grid-template-columns:minmax(720px,1fr) 150px; border-bottom:1px solid #d9dfe6; }
.jp-order-actions { padding:12px 10px; background:#fafafa; border-left:1px solid #d9dfe6; }
.jp-order-actions button { width:100%; height:31px; margin-bottom:8px; border:1px solid #9ea8b2; background:#fff; color:#606d79; cursor:pointer; }
.jp-order-actions button.primary { border-color:#168fd1; background:#168fd1; color:#fff; }
.jp-order-actions select { width:100%; height:30px; margin-bottom:7px; border:1px solid #c7d0d8; background:#fff; color:#4f5c69; font-size:12px; }
.jp-action-title { margin:13px 0 7px; padding-top:10px; border-top:1px solid #d9dfe6; color:#6b7785; font-weight:600; }
.jp-order-bottom { min-height:0; display:grid; grid-template-columns:minmax(660px,1fr) 205px; }
.jp-order-notes { background:#ffffdb; border-left:1px solid #e5e5b6; padding:10px; color:#77775b; }
.jp-order-subtabs { height:34px; display:flex; border-bottom:1px solid #d9dfe6; }
.jp-order-subtab { padding:9px 13px 7px; cursor:pointer; }
.jp-order-subtab.active { border-top:2px solid #1598e6; font-weight:600; }
.jp-order-detail-wrap { height:calc(100% - 34px); overflow:auto; }
.jp-subtoolbar { min-height:38px; display:flex; align-items:center; gap:10px; padding:5px 8px; border-bottom:1px solid #d9e1ea; background:#f8fafc; color:#64748b; }
.jp-subtoolbar b { margin-left:auto; color:#536171; font-weight:500; }
.jp-detail-card { margin:18px; padding:18px; border:1px solid #dce3ea; background:#fafcff; }
.jp-detail-card h4 { margin:0 0 10px; font-size:14px; }
.jp-detail-card p { min-height:42px; color:#657383; }
.jp-check-ok { color:#389e0d; font-weight:600; }
.jp-check-bad { color:#d46b08; font-weight:600; }
.jp-order-notes hr { border:0; border-top:1px solid #e5e5b6; margin:10px 0; }
.jp-context-menu { position:fixed; z-index:1600; min-width:176px;max-width:210px; padding:5px; border:1px solid #bfcbd8; border-radius:3px; background:#fff; box-shadow:0 9px 26px rgba(15,23,42,.24); }
.jp-context-menu-wide{width:188px; }
.jp-context-title { padding:7px 10px 8px; border-bottom:1px solid #e1e7ee; margin-bottom:4px; overflow:hidden; }
.jp-context-title strong,.jp-context-title span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jp-context-title strong { color:#243446; font-size:12px; }
.jp-context-title span { margin-top:2px; color:#8a97a5; font-size:11px; }
.jp-context-menu button { width:100%; min-height:31px; padding:0 10px; border:0; border-radius:2px; background:#fff; color:#3f4b5b; display:flex; align-items:center; justify-content:space-between; gap:10px; text-align:left; cursor:pointer; font-size:12px; }
.jp-context-menu button span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jp-context-menu button small { max-width:108px; overflow:hidden; text-overflow:ellipsis; color:#9aa5b1; font-size:10px; white-space:nowrap; }
.jp-context-menu button:hover,.jp-context-menu button:focus { background:#eaf5ff; color:#168fd1; outline:none; }
.jp-context-menu button.jp-context-primary { color:#168fd1; font-weight:600; }
.jp-context-menu button.jp-context-danger { color:#d4380d; }
.jp-context-menu button:disabled { color:#b7c0ca; background:#fff; cursor:not-allowed; }
.jp-context-divider { height:1px; margin:4px 5px; background:#e1e7ee; }
.jp-confirm-message { min-height:115px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; color:#475569; }
.jp-confirm-message strong { color:#243446; font-size:15px; }
.jp-view-card { width:min(640px,92vw); }
.jp-view-card .jp-modal-body { min-height:250px; }
.jp-view-tip { margin:0 0 14px; color:#738091; }
.jp-view-options { display:flex; gap:20px; margin-bottom:12px; padding:8px 10px; background:#f7fafc; border:1px solid #e2e8ef; }
.jp-column-picker { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.jp-column-item { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 8px; border:1px solid #dce3ea; border-radius:3px; background:#fff; }
.jp-column-item:hover { border-color:#8ccaf0; background:#f5fbff; }
.jp-column-item.locked { color:#7c8794; background:#f7f8fa; }
.jp-column-item > label { display:flex; align-items:center; gap:7px; min-width:85px; cursor:pointer; }
.jp-column-actions { display:flex; align-items:center; gap:3px; }
.jp-column-actions button { width:25px; height:25px; border:1px solid #cbd4dd; background:#fff; color:#637283; cursor:pointer; }
.jp-column-actions button:disabled { color:#c5cbd2; cursor:not-allowed; }
.jp-column-actions select { height:25px; max-width:90px; border:1px solid #cbd4dd; background:#fff; color:#596675; font-size:11px; }
.jp-safety-head { min-height:68px; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:10px 12px; border-bottom:1px solid #dce3ea; background:#f8fafc; }
.jp-safety-head > div { display:flex; align-items:center; gap:10px; }
.jp-safety-editor label { color:#657383; }
.jp-safety-editor input { width:90px; height:28px; padding:3px 7px; border:1px solid #cbd4dd; }
.jp-safety-state { display:inline-block; padding:3px 8px; border-radius:10px; font-size:11px; font-weight:600; }
.jp-safety-state.safe { background:#edf8e9; color:#389e0d; }
.jp-safety-state.warning { background:#fff3e6; color:#d46b08; }

.jp-modal-card { width:min(820px,94vw); max-height:90vh; background:#fff; display:flex; flex-direction:column; border-radius:3px; box-shadow:0 14px 45px rgba(0,0,0,.28); }
.jp-modal-head { height:43px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; border-bottom:1px solid #dde2e7; }
.jp-modal-head h3 { font-size:14px; font-weight:500; margin:0; }
.jp-modal-close { border:0; background:transparent; font-size:20px; cursor:pointer; }
.jp-modal-tabs { display:flex; padding:0 16px; border-bottom:1px solid #dce2e8; }
.jp-modal-tab { height:38px; padding:11px 17px 8px; cursor:pointer; }
.jp-modal-tab.active { color:#168fd1; border-bottom:2px solid #168fd1; }
.jp-modal-body { padding:16px 24px; overflow:auto; min-height:430px; }
.jp-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:11px 22px; }
.jp-form-row { display:grid; grid-template-columns:92px 1fr; align-items:center; min-width:0; }
.jp-form-row label { text-align:right; margin-right:10px; color:#596675; }
.jp-form-row.required label:before { content:'* '; color:#ff4d4f; }
.jp-form-row input,.jp-form-row select,.jp-form-row textarea { width:100%; min-width:0; height:30px; padding:4px 8px; border:1px solid #ccd4dd; border-radius:2px; font-size:12px; }
.jp-form-row textarea { height:70px; resize:vertical; }
.jp-form-row.span2 { grid-column:span 2; }
.jp-form-separator { grid-column:span 2; margin:7px 0 1px; border-top:1px solid #dce2e8; text-align:center; color:#7a8795; }
.jp-form-separator span { position:relative; top:-9px; background:#fff; padding:0 10px; }
.jp-checks { display:flex; flex-wrap:wrap; gap:13px; padding:4px 0; }
.jp-image-paste { min-height:78px; border:1px dashed #b8c4ce; background:#fafafa; display:flex; align-items:center; justify-content:center; color:#8a97a5; }
.jp-variant-editor-head { display:flex; align-items:center; gap:12px; min-height:38px; margin-bottom:8px; color:#566474; }
.jp-variant-editor-head strong { color:#2f3a47; }
.jp-variant-editor-head span { color:#8793a0; }
.jp-variant-editor-head button { margin-left:auto; }
.jp-variant-editor-table { max-height:390px; overflow:auto; border:1px solid #dce2e8; }
.jp-variant-editor-table .jp-table { width:100%; }
.jp-variant-editor-table input { width:120px; height:27px; padding:3px 6px; border:1px solid #cbd4dd; border-radius:2px; font-size:12px; }
.jp-variant-editor-table td:nth-child(2) input { width:180px; }
.jp-variant-editor-table td:last-child { text-align:center; }
.jp-modal-foot { height:50px; display:flex; justify-content:flex-end; align-items:center; gap:9px; padding:0 18px; border-top:1px solid #dce2e8; }
.jp-modal-foot button { height:30px; padding:0 18px; border:1px solid #c7d0d8; background:#fff; cursor:pointer; }
.jp-modal-foot .primary { border-color:#168fd1; background:#168fd1; color:#fff; }

.jp-order-item-editor { width:min(1040px,96vw); }
.jp-order-item-editor .jp-modal-body { min-height:500px; padding:14px 18px; }
.jp-order-item-editor-grid { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(340px,.88fr); gap:18px; }
.jp-order-item-editor-section { min-width:0; padding:0 4px; }
.jp-order-item-editor-section h4 { margin:0 0 12px; padding:0 0 8px; border-bottom:1px solid #dce2e8; color:#ef7d22; font-size:13px; font-weight:500; }
.jp-order-item-editor-section .jp-form-row { margin-bottom:9px; }
.jp-map-picker { align-items:start; }
.jp-map-picker select { width:100%; min-height:126px; padding:4px; border:1px solid #ccd4dd; color:#3f4b5b; font-size:12px; }
.jp-map-picker option { padding:4px 6px; }
#jp-order-map-result { margin-top:5px; color:#64748b; }
.jp-order-map-summary { display:grid; grid-template-columns:128px minmax(0,1fr); gap:11px; margin:3px 0 10px 102px; padding:10px; border:1px solid #e1e7ed; background:#fafcfe; }
.jp-order-map-image { width:126px; height:126px; display:flex; align-items:center; justify-content:center; border:1px dashed #c6d0da; background:#fff; color:#9aa5b1; text-align:center; }
.jp-order-map-image img { max-width:100%; max-height:100%; object-fit:contain; }
.jp-order-map-numbers { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.jp-order-map-numbers .jp-form-row { grid-template-columns:70px 1fr; }
.jp-order-item-external input:disabled,.jp-order-item-external textarea:disabled,.jp-order-map-summary input:disabled { color:#5f6b78; background:#f5f7f9; opacity:1; }
.jp-order-external-amount { display:grid; grid-template-columns:minmax(70px,1fr) 16px minmax(70px,1fr) 16px minmax(70px,1fr) 16px minmax(70px,1fr); align-items:end; margin:11px 0; padding:11px; border:1px solid #dce3ea; background:#fafcfe; }
.jp-order-external-amount > div { display:flex; min-width:0; flex-direction:column; gap:4px; }
.jp-order-external-amount span { color:#7b8794; font-size:11px; }
.jp-order-external-amount strong { overflow:hidden; color:#334155; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.jp-order-external-amount b { align-self:end; padding-bottom:2px; color:#8c98a5; text-align:center; font-weight:400; }
.jp-order-item-link { height:30px; display:flex; align-items:center; color:#168fd1; text-decoration:none; }
.jp-order-item-readonly-tip { margin:13px 0 0 102px; padding:8px 10px; border-left:3px solid #f5b041; background:#fff8e8; color:#8a6a28; line-height:1.55; }
.jp-order-item-editor-foot { justify-content:flex-end; }
.jp-order-item-editor-foot > div { margin-right:auto; display:flex; align-items:center; gap:7px; }
.jp-order-item-editor-foot button:disabled { color:#b8c0c8; background:#f6f7f8; cursor:not-allowed; }
.jp-order-item-editor-foot span { margin-left:4px; color:#7a8795; }

@media (max-width:1100px) {
  .jp-product-grid { grid-template-columns:155px 36px minmax(400px,1fr) 36px minmax(330px,.75fr); }
  .jp-order-grid { grid-template-columns:155px minmax(700px,1fr); }
  .jp-order-item-editor-grid { grid-template-columns:1fr; }
  .jp-order-map-summary { margin-left:0; }
}

/* order table fixed header 20260923 */
.jp-order-top > .jp-pane { position:relative; overflow:auto; overscroll-behavior:contain; }
.jp-order-top .jp-table { border-collapse:separate; border-spacing:0; }
.jp-order-top .jp-table thead { position:sticky; top:0; z-index:20; }
.jp-order-top .jp-table thead th { position:sticky; top:0; z-index:21; background:#f7f9fc; box-shadow:0 1px 0 #dfe4e9; }
