/* WB batch workspace. All rules are scoped to the staff-only workbench. */
.wbw[hidden], .wbw [hidden], .wbw-dialog [hidden] { display:none !important; }
.wbw { --wbw-line:#bac4ce; --wbw-muted:#626d79; color:#19211e; min-width:0; }
.wbw *, .wbw-dialog * { box-sizing:border-box; }
.wbw-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.wbw-stat { background:#fff; border:1px solid #dce2e7; border-radius:18px; padding:20px; }
.wbw-stat span { display:block; color:var(--wbw-muted); font-size:14px; }
.wbw-stat strong { display:block; margin-top:10px; font-size:32px; line-height:1.1; }
.wbw-stat-attention { border-color:#efc7a4; background:#fff9f3; }
.wbw-scope { display:flex; flex-wrap:wrap; align-items:end; gap:14px; margin-bottom:18px; }
.wbw label, .wbw-dialog label { display:flex; flex-direction:column; gap:7px; font-size:14px; font-weight:600; min-width:0; }
.wbw input, .wbw select, .wbw textarea, .wbw-dialog input, .wbw-dialog select, .wbw-dialog textarea { width:100%; min-width:0; max-width:100%; border:1px solid #bfc9d2; border-radius:10px; background:#fff; padding:11px 12px; font:inherit; color:#19211e; }
.wbw input[type=checkbox], .wbw-dialog input[type=checkbox] { width:20px; height:20px; padding:0; flex:none; }
.wbw-scope label { flex:1 1 220px; max-width:440px; }
.wbw-tabs { display:flex; flex-wrap:wrap; gap:7px; border-bottom:2px solid var(--wbw-line); padding-bottom:12px; margin-bottom:18px; }
.wbw-tabs button { border:1px solid transparent; border-radius:10px; padding:11px 16px; background:transparent; font:inherit; font-weight:600; cursor:pointer; color:#57626d; }
.wbw-tabs button[aria-selected=true] { color:var(--wms-brand-link); background:var(--wms-brand-soft); border-color:#e6bcaa; }
.wbw-panel { border:1px solid #dce2e7; background:#fff; border-radius:18px; padding:20px; margin-bottom:18px; min-width:0; }
.wbw-panel h2, .wbw-panel h3 { margin:0 0 10px; overflow-wrap:anywhere; }
.wbw-muted, .wbw-help { color:var(--wbw-muted); font-size:14px; line-height:1.55; }
.wbw-help { margin:8px 0 16px; }
.wbw-toolbar, .wbw-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.wbw-toolbar { margin-bottom:16px; }
.wbw-toolbar > input { flex:1 1 230px; width:auto; }
.wbw-toolbar > select { flex:0 1 200px; width:auto; }
.wbw .wbw-btn, .wbw-dialog .wbw-btn { border:1px solid #bcc7cd; color:#19211e; background:#fff; border-radius:10px; padding:10px 15px; min-height:42px; font:inherit; font-size:14px; line-height:1.3; font-weight:700; cursor:pointer; }
.wbw .wbw-btn-primary, .wbw-dialog .wbw-btn-primary { background:var(--wms-brand-accent,#ff5b24); border-color:var(--wms-brand-accent,#ff5b24); color:#16251f; }
.wbw .wbw-btn-danger, .wbw-dialog .wbw-btn-danger { color:#a42323; border-color:#dca8a8; }
.wbw .wbw-btn:disabled, .wbw-dialog .wbw-btn:disabled { opacity:.48; cursor:default; }
.wbw .wbw-btn:hover:not(:disabled), .wbw-dialog .wbw-btn:hover:not(:disabled) { background:var(--wms-brand-soft); }
.wbw .wbw-btn-primary:hover:not(:disabled), .wbw-dialog .wbw-btn-primary:hover:not(:disabled) { background:var(--wms-brand-hover); }
.wbw-selection { position:sticky; top:10px; z-index:3; background:#fff5ee; border:1px solid #e8bea8; border-radius:12px; padding:12px 16px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:16px; box-shadow:0 4px 12px #17201c0a; }
.wbw-selection > strong { margin-right:auto; }
.wbw-list { display:grid; gap:0; }
.wbw-order { display:grid; grid-template-columns:26px minmax(150px,1.2fr) minmax(135px,1fr) minmax(130px,1fr) minmax(140px,.85fr); gap:14px; align-items:center; padding:18px 0; border-bottom:2px solid var(--wbw-line); }
.wbw-mark-order { grid-template-columns:minmax(120px,1fr) minmax(140px,2fr) auto; }
.wbw-order:last-child { border-bottom:0; }
.wbw-order > * { min-width:0; }
.wbw-order strong, .wbw-order span, .wbw-order small { overflow-wrap:anywhere; }
.wbw-order small { display:block; margin-top:5px; color:var(--wbw-muted); font-size:13px; line-height:1.4; }
.wbw-order .wbw-label { display:block; margin-bottom:5px; color:var(--wbw-muted); font-size:12px; font-weight:500; }
.wbw-badge { display:inline-flex; border-radius:20px; background:#edf2f6; color:#344555; padding:5px 9px; font-size:12px; font-weight:700; width:fit-content; line-height:1.35; }
.wbw-badge-good { background:#e2f7e8; color:#236d3c; }
.wbw-badge-warn { background:#fff0d7; color:#81560b; }
.wbw-badge-error { background:#fff0ed; color:#9b352a; }
.wbw-empty { padding:34px 18px; text-align:center; color:var(--wbw-muted); line-height:1.6; }
.wbw-empty strong { display:block; color:#34403b; margin-bottom:7px; font-size:18px; }
.wbw-message { padding:12px 16px; margin:0 0 16px; border-radius:10px; background:#edf6ed; border:1px solid #b7d0b9; color:#285b31; overflow-wrap:anywhere; }
.wbw-message.error { background:#fff1ee; border-color:#d9aaa0; color:#9a3428; }
.wbw-batches { display:grid; gap:16px; }
.wbw-batch { border:1px solid #d7dfe4; border-bottom:3px solid var(--wbw-line); border-radius:14px; padding:18px; }
.wbw-batch-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:12px; }
.wbw-batch-head strong { display:block; overflow-wrap:anywhere; }
.wbw-batch-head .wbw-muted { display:block; margin-top:5px; }
.wbw-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:14px 0; }
.wbw-meta dt { color:var(--wbw-muted); font-size:12px; margin-bottom:5px; }
.wbw-meta dd { margin:0; font-weight:600; font-size:14px; overflow-wrap:anywhere; }
.wbw-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.wbw-form-grid .wbw-full { grid-column:1/-1; }
.wbw-form-grid input[type=file] { padding:10px; }
.wbw-table-scroll { overflow:auto; max-width:100%; }
.wbw table { width:100%; border-collapse:collapse; font-size:14px; table-layout:auto; }
.wbw th, .wbw td { padding:12px 10px; text-align:left; vertical-align:top; border-bottom:2px solid var(--wbw-line); overflow-wrap:anywhere; white-space:normal; }
.wbw th { font-size:12px; color:#64717c; background:#f6f8fa; }
.wbw table tr:last-child td { border-bottom:0; }
.wbw-upload-preview { margin:16px 0; padding:16px; background:#f6f8f7; border-radius:12px; }
.wbw-check { flex-direction:row !important; align-items:flex-start; gap:10px !important; font-weight:500 !important; line-height:1.5; }
.wbw-filename { max-width:250px; word-break:break-word; }
.wbw-dialog-backdrop { position:fixed; z-index:1100; inset:0; background:#10201988; display:flex; justify-content:center; align-items:center; padding:20px; }
.wbw-dialog { width:780px; max-width:100%; max-height:calc(100dvh - 40px); overflow:auto; background:#fff; border-radius:20px; padding:26px; color:#19211e; }
.wbw-dialog h2 { margin:0 0 16px; font-size:24px; }
.wbw-dialog h3 { margin:18px 0 9px; font-size:17px; }
.wbw-dialog p { line-height:1.5; }
.wbw-dialog .wbw-actions { margin-top:20px; justify-content:flex-end; }
.wbw-dialog .wbw-review-group { border:1px solid #d8e0e4; border-radius:12px; padding:14px; margin:12px 0; }
.wbw-dialog ul { padding-left:22px; line-height:1.6; }
.wbw-dialog .wbw-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
.wbw-dialog .wbw-muted { color:#626d79; }
.wbw-dialog .wbw-message { margin-top:12px; }
.wbw .wbw-loading { pointer-events:none; opacity:.7; }
.wbw-step-note { padding:12px 14px; background:#f5f7f6; border-left:3px solid var(--wms-brand-accent); border-radius:4px; line-height:1.55; font-size:14px; }
.wbw button:focus-visible, .wbw-dialog button:focus-visible { outline:3px solid var(--wms-brand-link); outline-offset:3px; }
@media(max-width:1250px) {
  .wbw-order { grid-template-columns:26px minmax(0,1fr) minmax(0,1fr); align-items:start; }
  .wbw-order > .wbw-order-place { grid-column:2; }
  .wbw-order > .wbw-order-status { grid-column:3; }
  .wbw-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .wbw-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .wbw-stat { padding:15px; border-radius:13px; }
  .wbw-stat strong { font-size:27px; }
  .wbw-scope label { max-width:none; }
  .wbw-panel { padding:15px; border-radius:13px; }
  .wbw-tabs { gap:4px; }
  .wbw-tabs button { flex:1 1 auto; padding:10px 9px; font-size:13px; }
  .wbw-order { grid-template-columns:24px minmax(0,1fr); gap:12px; padding:18px 0; }
  .wbw-mark-order { grid-template-columns:minmax(0,1fr); }
  .wbw-mark-order > * { grid-column:1; }
  .wbw-order > .wbw-order-product, .wbw-order > .wbw-order-place, .wbw-order > .wbw-order-status { grid-column:2; }
  .wbw-selection { position:static; padding:12px; }
  .wbw-selection > strong { width:100%; }
  .wbw-selection .wbw-btn { flex:1 1 auto; }
  .wbw-batch { padding:14px; }
  .wbw-batch-head { flex-wrap:wrap; }
  .wbw-form-grid { grid-template-columns:1fr; }
  .wbw-actions .wbw-btn { flex:1 1 auto; }
  .wbw-dialog-backdrop { padding:10px; }
  .wbw-dialog { padding:19px; max-height:calc(100dvh - 20px); border-radius:15px; }
  .wbw-dialog h2 { font-size:21px; }
  .wbw .wbw-document-list table, .wbw .wbw-document-list tbody, .wbw .wbw-document-list tr, .wbw .wbw-document-list td { display:block; width:100%; }
  .wbw .wbw-document-list thead { display:none; }
  .wbw .wbw-document-list tr { border-bottom:2px solid var(--wbw-line); padding:12px 0; }
  .wbw .wbw-document-list td { border:0; padding:5px 0; }
  .wbw-filename { max-width:none; }
}
@media(prefers-reduced-motion:reduce) { .wbw *, .wbw-dialog * { scroll-behavior:auto !important; transition:none !important; } }
