.pw-workspace { margin: 1.2rem 0; min-width: 0; }
.pw-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.pw-heading h3 { font-size: 1.5rem; margin: 0 0 .5rem; }
.pw-heading p { margin: .4rem 0; max-width: 75ch; }
.pw-heading > button { flex-shrink: 0; }
.pw-flow, .pw-guidance, .pw-import-guidance { color: #3f6559; line-height: 1.6; }
.pw-flow { padding: .75rem 1rem; background: #eef8f2; border-radius: .6rem; }
.pw-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.pw-tabs button { border: 1px solid #a8c5b7; border-radius: .6rem; color: #17533f; background: white; padding: .8rem 1rem; min-height: 44px; font-weight: 700; }
.pw-tabs button.active { color: white; background: #076347; border-color: #076347; }
.pw-tabs span { margin-left: .35rem; opacity: .8; }
.pw-filters { display: grid; grid-template-columns: minmax(15rem, 2fr) minmax(10rem, 1fr) minmax(12rem, 1fr); gap: .8rem; margin: 1rem 0; }
.pw-filters label, .pw-allocation-form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; min-width: 0; }
.pw-filters input, .pw-filters select, .pw-allocation-form input, .pw-allocation-form select, .pw-allocation-form textarea, .pw-allocation-actions input { box-sizing: border-box; min-height: 44px; width: 100%; padding: .65rem; border: 1px solid #b8cfc5; border-radius: .5rem; background: #fff; color: #193f32; font: inherit; }
.pw-table-scroll { overflow-x: auto; background: white; border: 1px solid #d6e5dd; border-radius: .75rem; }
.pw-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.pw-table th { background: #edf5f0; color: #214a3a; text-align: left; padding: .8rem .65rem; white-space: nowrap; }
.pw-table td { vertical-align: top; padding: .9rem .65rem; border-top: 1px solid #e3ebe6; min-width: 6rem; }
.pw-table td small { display: block; margin-top: .4rem; color: #517568; font-size: .8rem; }
.pw-orders-table tr:hover td { background: #f7fbf8; }
.pw-order-link { border: 0; padding: .15rem 0; background: none; font: inherit; font-weight: 750; color: #006849; text-align: left; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.pw-lines-table td:first-child { min-width: 17rem; max-width: 25rem; }
.pw-lines-table td strong { display: block; }
.pw-lines-table td:last-child { min-width: 10rem; }
.pw-status { display: inline-block; border-radius: 1rem; padding: .3rem .6rem; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #e9f0ed; color: #355447; }
.pw-status--quarantined, .pw-status--rejected { color: #a42a22; background: #fff0ed; }
.pw-status--pending_approval, .pw-status--needs_allocation, .pw-status--partially_ready, .pw-status--partially_shipped { color: #8f4a00; background: #fff0db; }
.pw-status--ready, .pw-status--shipped, .pw-status--approved { color: #1c633d; background: #dcf4e4; }
.pw-progress { display: inline-block; border-left: 4px solid #c15348; padding: .2rem .5rem; white-space: nowrap; font-weight: 700; }
.pw-progress--partial { border-color: #e78819; }
.pw-progress--done { border-color: #21874d; }
.pw-progress small { display: inline !important; font-weight: 400; }
.pw-order-detail { margin-top: 1rem; }
.pw-order-detail > .pw-heading { margin-top: 1.4rem; }
.pw-order-detail h4 { margin: 1.5rem 0 1rem; }
.pw-order-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; padding: 1rem; background: #f5f9f6; border-radius: .6rem; }
.pw-order-facts dt { font-size: .85rem; color: #527263; }
.pw-order-facts dd { margin: .25rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.pw-order-source, .pw-import-panel, .pw-technical-panel { border: 1px solid #d4e3da; padding: 1rem; border-radius: .7rem; margin: 1rem 0; background: #fbfdfb; }
.pw-order-source summary, .pw-import-panel > summary, .pw-technical-panel > summary, .pw-import-id summary { cursor: pointer; font-weight: 700; color: #2c5945; }
.pw-order-source code { overflow-wrap: anywhere; }
.pw-import-panel .card, .pw-technical-panel .card { box-shadow: none; }
.pw-import-id { min-width: 0; }
.pw-import-id > label { margin-top: .5rem; }
.pw-empty, .pw-locked { color: #536e61; padding: 1.3rem; }
.pw-allocation-form { display: grid; gap: .8rem; padding: 1.25rem; margin: 1rem 0; background: #f1f8f3; border: 1px solid #b8d3bf; border-radius: .75rem; }
.pw-allocation-form h4, .pw-allocation-form p { margin: 0; }
.pw-form-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; }
.pw-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.pw-allocation-actions { display: grid; gap: .5rem; min-width: 12rem; }
.pw-feedback { padding: 1rem; border: 1px solid #aad1b3; background: #e7f8eb; border-radius: .6rem; }
.pw-feedback--error { border-color: #e6aea2; background: #fff1ed; }
.pw-workspace button:disabled { opacity: .5; cursor: not-allowed; }
.pw-workspace [hidden], .pw-import-panel[hidden], .pw-technical-panel[hidden] { display: none !important; }
@media (max-width: 900px) { .pw-heading { flex-wrap: wrap; } .pw-filters { grid-template-columns: 1fr; } .pw-order-facts { grid-template-columns: repeat(2,minmax(0,1fr)); } .pw-form-grid { grid-template-columns: 1fr; } }
@media print { .pw-tabs, .pw-filters, .pw-import-panel, .pw-technical-panel, .pw-workspace button, .pw-allocation-form { display: none !important; } .pw-table-scroll { overflow: visible; } .pw-table { font-size: 8pt; } }
.pw-box-basis { border: 1px solid #d2e3d7; padding: 12px; border-radius: 9px; background: #f4faf5; }
.pw-box-basis p { margin: 0 0 8px; font-size: .84rem; }
.pw-box-confirm { display: flex !important; align-items: flex-start; gap: 10px; }
.pw-box-confirm[hidden] { display: none !important; }
.pw-box-confirm input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; }
