.workspace:has(.order-workspace) .page-heading{margin:0 0 16px;align-items:center}.workspace:has(.order-workspace) h1{font-size:22px;letter-spacing:-.5px}.workspace:has(.order-workspace) .description{font-size:12px}.order-workspace{--ow-border:#e5e9f0;--ow-muted:#7c8799;--ow-bg:#f7f9fc;font-size:12px;color:#263348;line-height:1.45;min-width:0}.order-workspace button,.order-workspace input,.order-workspace select,.order-workspace textarea{font:inherit}.order-workspace .cw-button{border-radius:7px;padding:8px 12px;font-weight:500}.ow-muted,.ow-caption{color:var(--ow-muted)}.ow-caption{font-size:11px;line-height:1.7;margin:12px 2px}.ow-metrics{display:grid;grid-template-columns:1fr 1.6fr 1fr 1fr;gap:16px;margin:18px 0 24px}.ow-metrics>div{padding:14px 18px;border:1px solid var(--ow-border);border-radius:10px;background:white}.ow-metrics span{display:block;color:var(--ow-muted);font-size:11px;margin-bottom:6px}.ow-metrics strong{font-size:23px;font-weight:650;letter-spacing:-.5px;white-space:nowrap}.ow-metrics>div:nth-child(2){background:#f7f9ff;border-color:#e5eaff}.ow-status-tabs{display:flex;align-items:center;gap:5px;border-bottom:1px solid var(--ow-border);margin-bottom:16px;overflow-x:auto}.ow-status-tabs>button{padding:12px 13px;border-bottom:2px solid transparent;color:var(--ow-muted);white-space:nowrap}.ow-status-tabs>button.active{color:var(--blue);border-color:var(--blue);font-weight:600}.ow-status-tabs>button:hover{background:var(--ow-bg)}.ow-status-tabs>label{margin-left:auto;min-width:145px;padding:0 0 5px}.ow-status-tabs select{border:0;color:var(--ow-muted)}.ow-tools{display:flex;align-items:center;gap:10px;margin:14px 0}.ow-search{display:flex;align-items:center;gap:8px;min-width:230px;width:min(420px,100%);border:1px solid var(--ow-border);border-radius:8px;background:white;padding:0 12px}.ow-search span{font-size:23px;color:var(--ow-muted)}.commerce-workspace .ow-search input{border:0;box-shadow:none;padding:10px 0;font-size:12px}.ow-sort{margin-left:auto;min-width:175px}.order-workspace select,.order-workspace input,.order-workspace textarea{border:1px solid var(--ow-border);border-radius:6px;background:white;padding:9px;color:inherit}.ow-filter-panel{display:flex;align-items:end;gap:12px;padding:16px;background:var(--ow-bg);border:1px solid var(--ow-border);border-radius:8px;margin-bottom:14px}.ow-filter-panel label{display:grid;gap:6px;min-width:170px;color:#66758b;font-size:11px}.ow-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--ow-border);border-radius:9px;background:white}.ow-table{border-collapse:collapse;width:100%;min-width:1020px;font-size:12px;text-align:left}.ow-table th{padding:12px 14px;background:var(--ow-bg);color:#7b8799;font-size:10px;font-weight:600;letter-spacing:.25px;border-bottom:1px solid var(--ow-border);white-space:nowrap}.ow-table td{padding:14px;border-bottom:1px solid #edf0f5;vertical-align:middle;max-width:240px}.ow-table tr:last-child td{border-bottom:0}.ow-table tbody tr:hover{background:#f9fbff}.ow-table strong{font-weight:550;display:block}.ow-table small{display:block;color:var(--ow-muted);font-size:10px;line-height:1.55;margin-top:4px}.ow-table .ow-numeric{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.ow-order-link{font-weight:600;color:var(--blue);padding:0;text-align:left;white-space:nowrap}.ow-order-link:hover{text-decoration:underline}.ow-comment{color:var(--ow-muted);overflow-wrap:anywhere;font-size:11px}.ow-badge{display:inline-flex;align-items:center;gap:6px;max-width:100%;white-space:nowrap;border-radius:5px;padding:4px 7px;font-size:10px;line-height:1.35;background:#f0f3f8;color:#607088}.ow-badge i{width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.ow-reserved,.ow-picking{background:#edf1ff;color:#4261b7}.ow-shipped,.ow-delivered,.ow-paid,.ow-quoted{background:#eaf7f0;color:#328569}.ow-pending,.ow-invoiced,.ow-awaiting_supplier,.ow-partially_paid,.ow-requires_review{background:#fff6e6;color:#b0802b}.ow-cancelled,.ow-returned,.ow-refunded{background:#f8edf0;color:#b36677}.ow-pager{display:flex;align-items:center;gap:24px;padding:15px 2px;color:var(--ow-muted);font-size:11px}.ow-pager label{display:flex;align-items:center;gap:8px}.ow-pager select{width:68px;padding:5px}.ow-pager>div{margin-left:auto;display:flex;gap:8px}.ow-empty{padding:44px 18px;text-align:center;color:var(--ow-muted)}.ow-empty>span{display:block;font-size:30px;opacity:.5;margin-bottom:12px}.ow-empty strong{display:block;color:#516079;font-size:14px}.ow-empty p{margin:6px auto;max-width:400px;font-size:12px}.ow-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:18px 0}.ow-card-header h2{font-size:25px!important;letter-spacing:-.5px;margin:5px 0 12px!important;font-weight:650}.ow-kicker{text-transform:uppercase;letter-spacing:.8px;color:var(--ow-muted);font-size:10px}.ow-card-header-actions,.ow-card-badges{display:flex;align-items:center;gap:8px}.ow-flow{display:flex;align-items:center;padding:16px 20px;background:var(--ow-bg);border:1px solid var(--ow-border);border-radius:9px;margin:22px 0;gap:14px;overflow:auto}.ow-flow>span{display:flex;align-items:center;gap:8px;white-space:nowrap;color:#96a0b1;font-size:11px;flex:1}.ow-flow>span:not(:last-child):after{content:'';height:1px;background:#dde3ed;flex:1;margin-left:10px;min-width:12px}.ow-flow b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid #dce2ed;background:white;font-weight:500}.ow-flow .current{color:var(--blue);font-weight:600}.ow-flow .current b{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 0 0 4px #335cff12}.ow-flow .done{color:#3d9478}.ow-flow .done b{background:#e3f1eb;border-color:#e3f1eb}.ow-card-layout{display:grid;grid-template-columns:minmax(0,1fr) 288px;gap:20px;align-items:start}.ow-card-main{min-width:0}.ow-section{border:1px solid var(--ow-border);border-radius:10px;background:white;padding:20px;margin-bottom:18px;min-width:0}.order-workspace h2{font-size:13px;font-weight:600;margin:0}.ow-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}.ow-panel-heading h2 span{font-weight:500;color:var(--ow-muted);margin-left:6px}.ow-panel-heading>.ow-muted{font-size:10px}.ow-details-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:22px 28px;margin:0}.ow-field{min-width:0}.ow-field dt{color:var(--ow-muted);font-size:10px;margin-bottom:5px}.ow-field dd{margin:0;font-size:12px;overflow-wrap:anywhere}.ow-note{border-top:1px solid var(--ow-border);padding-top:15px;margin-top:20px}.ow-note span{font-size:10px;color:var(--ow-muted)}.ow-note p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.ow-tab-section{padding:0;overflow:hidden}.ow-card-tabs{display:flex;border-bottom:1px solid var(--ow-border);padding:0 16px;gap:18px;overflow:auto}.ow-card-tabs button{padding:15px 0;border-bottom:2px solid transparent;font-size:11px;color:var(--ow-muted);white-space:nowrap}.ow-card-tabs button[aria-selected=true]{color:var(--blue);border-color:var(--blue);font-weight:600}.ow-card-tabs span{font-size:9px;margin-left:6px;background:var(--ow-bg);padding:2px 5px;border-radius:4px}.ow-card-tabs+div{padding:20px}.ow-card-tabs+div .ow-table-wrap{border-radius:6px}.ow-items{min-width:920px}.ow-items td,.ow-items th{padding:12px 10px}.ow-items td:nth-child(2){min-width:210px}.ow-row-index{color:var(--ow-muted);font-size:10px}.ow-position-foot{display:flex;justify-content:space-between;gap:12px;color:var(--ow-muted);font-size:10px;padding-top:15px}.ow-total dl{margin:16px 0}.ow-total dl>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;align-items:baseline}.ow-total dt{color:var(--ow-muted);font-size:11px}.ow-total dd{margin:0;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}.ow-total .ow-grand-total{padding-top:16px;margin-top:8px;border-top:1px solid var(--ow-border)}.ow-total .ow-grand-total dd{font-size:21px;font-weight:650;letter-spacing:-.5px}.ow-total .ow-grand-total dt{font-size:12px;color:inherit}.ow-total>p{font-size:10px;color:var(--ow-muted);margin:0 0 8px}.ow-operations h2{margin-bottom:16px}.ow-operations .cw-form-grid{display:grid;grid-template-columns:1fr;gap:12px}.ow-operations .cw-form-grid label{font-size:10px;color:var(--ow-muted);display:grid;gap:5px}.ow-operations .cw-form-actions{display:flex;flex-direction:column;gap:8px;margin-top:14px}.ow-operations .cw-form-actions button{width:100%}.ow-operations fieldset{border:0;padding:0;margin:0;min-width:0}.ow-operations details{border-top:1px solid var(--ow-border);padding-top:12px;margin-top:15px;font-size:11px}.ow-operations details summary{cursor:pointer;color:#9f6b71}.ow-operations details p{color:var(--ow-muted);font-size:10px}.ow-operations .cw-check{display:flex;align-items:center;gap:8px;font-size:10px;margin-bottom:10px}.ow-operations .cw-check input{width:auto}.ow-document-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ow-document{display:flex;gap:12px;border:1px solid var(--ow-border);border-radius:8px;padding:15px}.ow-document-icon{width:36px;height:42px;display:grid;place-items:center;background:#f1f4ff;color:var(--blue);font-size:22px;border-radius:6px}.ow-document small,.ow-document time{color:var(--ow-muted);font-size:10px}.ow-document h3{font-size:12px;margin:3px 0}.ow-document p{font-size:11px;margin:3px 0 10px}.ow-timeline{list-style:none;margin:0;padding:0 0 0 6px}.ow-timeline li{display:flex;gap:14px;position:relative;padding-bottom:23px}.ow-timeline li:not(:last-child):before{content:'';position:absolute;width:1px;background:var(--ow-border);top:11px;bottom:0;left:4px}.ow-timeline-dot{width:9px;height:9px;border:2px solid #6c82da;border-radius:50%;background:white;margin-top:4px;z-index:1;flex-shrink:0}.ow-timeline strong{font-size:12px;font-weight:550}.ow-timeline p{margin:5px 0;font-size:11px}.ow-timeline small{color:var(--ow-muted);font-size:10px}.ow-edit{border:1px solid #cbd5fc;border-radius:10px;padding:20px;margin-bottom:18px;background:#fbfcff}.ow-edit h2{margin-bottom:18px}.ow-edit fieldset{border:0;padding:0;margin:0;min-width:0}.ow-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ow-edit-grid label{display:grid;gap:6px;color:#6c798c;font-size:11px}.ow-edit-grid input,.ow-edit-grid textarea{width:100%}.ow-wide{grid-column:1/-1}.ow-edit-actions{display:flex;gap:8px;margin-top:16px}@media(min-width:1800px){.ow-card-layout{grid-template-columns:minmax(0,1fr) 320px}.ow-section{padding:24px}}@media(max-width:1100px){.ow-metrics{gap:8px}.ow-metrics>div{padding:12px}.ow-metrics strong{font-size:18px}.ow-card-layout{grid-template-columns:minmax(0,1fr)}.ow-card-side{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ow-card-side>.ow-caption{grid-column:1/-1;margin-top:0}.ow-details-grid{grid-template-columns:1fr 1fr}.ow-filter-panel{flex-wrap:wrap}.ow-items{min-width:900px}}@media(max-width:650px){.ow-metrics{grid-template-columns:1fr 1fr;margin-top:12px}.ow-metrics strong{font-size:18px}.ow-tools{flex-wrap:wrap}.ow-search{width:100%;max-width:none}.ow-sort{flex:1}.ow-tools>.cw-button{order:1}.ow-filter-panel{display:grid;grid-template-columns:1fr 1fr}.ow-filter-panel label{min-width:0}.ow-filter-panel>label:first-child{grid-column:1/-1}.ow-card-header{flex-direction:column}.ow-card-header h2{font-size:21px!important;overflow-wrap:anywhere}.ow-card-header-actions{width:100%}.ow-card-header-actions button{flex:1}.ow-card-side{display:block}.ow-section{padding:16px}.ow-details-grid{gap:18px}.ow-card-tabs{gap:15px}.ow-card-tabs+div{padding:16px}.ow-flow{padding:14px;gap:9px}.ow-flow>span{font-size:10px}.ow-flow b{width:20px;height:20px}.ow-pager{flex-wrap:wrap;gap:12px}.ow-pager>div{width:100%;justify-content:space-between}.ow-document-grid{grid-template-columns:1fr}.ow-edit-grid{grid-template-columns:1fr}.ow-wide{grid-column:auto}.ow-panel-heading>.ow-muted{display:none}}@media print{body:has(.ow-card) .top,body:has(.ow-card) .l2,body:has(.ow-card) .recent,body:has(.ow-card) #page-actions,body:has(.ow-card) .ow-card-header-actions,body:has(.ow-card) .ow-operations,body:has(.ow-card) .ow-card-tabs,body:has(.ow-card) .cw-topline,body:has(.ow-card) .ow-flow,body:has(.ow-card) .breadcrumbs,body:has(.ow-card) .page-actions,body:has(.ow-card) .ow-edit,body:has(.ow-card) #control-session-recovery{display:none!important}body:has(.ow-card) .app-layout{display:block!important}body:has(.ow-card) .workspace{width:100%;padding:0}.ow-card-layout{display:block}.ow-card-side{display:block}.ow-total{max-width:350px;margin-left:auto}.ow-table{min-width:0;font-size:9px}.ow-table td,.ow-table th{padding:5px}.ow-table-wrap{overflow:visible}.ow-section{break-inside:avoid}.ow-card-tabs+div{padding:10px}.ow-card-header h2{font-size:18px!important}}

/* Full order editing, scoped to the order card. */
.ow-edit .ow-full-buyer{display:grid;gap:8px}.ow-edit .ow-full-buyer p,.ow-edit .ow-full-help{margin:0;color:#58677d;font-size:12px}.ow-edit .ow-full-search{display:flex;gap:8px;margin-top:12px;align-items:center}.ow-edit .ow-full-search input{flex:1;min-width:0}.ow-edit .ow-full-results{display:grid;gap:4px;margin-top:7px;color:#536176}.ow-edit .ow-full-results [data-ow-result]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-bottom:1px solid #e0e6ee}.ow-edit .ow-full-results small,.ow-edit .ow-full-table small{display:block;color:#65758a;margin-top:3px}.ow-edit .ow-full-items{margin:20px 0 4px}.ow-edit .ow-full-items h3{font-size:15px;margin:0 0 10px}.ow-edit .ow-full-table{overflow-x:auto}.ow-edit .ow-full-table table{border-collapse:collapse;width:100%;min-width:470px}.ow-edit .ow-full-table th{text-align:left;background:#f2f5f9;color:#42536a;font-size:12px}.ow-edit .ow-full-table th,.ow-edit .ow-full-table td{padding:10px;border-bottom:1px solid #dde4ed}.ow-edit .ow-full-table input[type=number]{width:80px;min-width:70px}.ow-edit .ow-full-warning{color:#704d06;background:#fff8e8;padding:12px;border-radius:6px}.ow-edit .ow-full-help{margin-top:10px}@media(max-width:650px){.ow-edit .ow-full-search{flex-wrap:wrap}.ow-edit .ow-full-search input{flex-basis:100%}}

/* Order actions stay together above the document; operational forms remain server commands. */
.ow-card-header-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.ow-operation-disclosure{margin:0 0 14px;border:1px solid var(--ow-border);border-radius:8px;background:#fff}
.ow-operation-disclosure>summary{cursor:pointer;padding:10px 14px;font-weight:600;color:#42536a}
.ow-operation-disclosure>.ow-operations{border:0;border-top:1px solid var(--ow-border);border-radius:0;margin:0}
.ow-operation-disclosure .cw-form-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.ow-print-items{display:none}
@media(max-width:650px){.ow-card-header-actions button{flex:initial}.ow-card-header-actions{width:auto}}
@media print{body:has(.ow-card) .ow-operation-disclosure,body:has(.ow-card) .ow-tab-section{display:none!important}.ow-print-items{display:block}}

/* Order overview above a full-width working table. */
.ow-card-body{min-width:0}.ow-card-body>.ow-section,.ow-card-body>.ow-edit{margin-bottom:12px}.ow-card-header{margin-bottom:12px}.ow-card-header h2{margin-bottom:4px}.ow-card-manager{display:inline-block;margin:0 12px 0 0}.ow-card-badges{display:inline-flex;gap:6px}.ow-summary{padding:14px 16px}.ow-summary-title{display:flex;align-items:center;gap:12px;margin-bottom:10px}.ow-summary-title h2{font-size:14px;margin:0}.ow-summary .ow-details-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px 18px}.ow-summary .ow-note{margin-top:10px;padding-top:8px}.ow-summary .ow-note p{margin:3px 0 0}.ow-card-body>.ow-total{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;padding:12px 16px}.ow-card-body>.ow-total h2,.ow-card-body>.ow-total p{margin:0}.ow-card-body>.ow-total dl{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;margin:0 0 0 auto}.ow-card-body>.ow-total dl>div{display:flex;gap:8px;align-items:baseline}.ow-card-body>.ow-total .ow-grand-total{border:0;margin:0;padding:0}.ow-card-body>.ow-caption{margin:4px 0 12px}.ow-card-body .ow-tab-section{width:100%}.ow-flow{margin-bottom:12px}@media(max-width:650px){.ow-summary .ow-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ow-card-body>.ow-total dl{width:100%;margin:0;justify-content:space-between}.ow-card-body>.ow-total{gap:8px}.ow-card-body>.ow-total dl>div{gap:4px}}@media print{.ow-card-body>.ow-total{display:block}.ow-card-body>.ow-total dl{display:block}.ow-card-body>.ow-total dl>div{display:flex;justify-content:space-between}.ow-card-body>.ow-caption{display:none}}

#ow-document-issue{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:16px;margin:12px 0;border:1px solid var(--ow-border);border-radius:8px;background:var(--ow-bg)}
#ow-document-issue p{flex-basis:100%;margin:0;color:#66758b}
#ow-document-issue label{display:grid;gap:5px;min-width:180px}
#ow-document-issue textarea{min-width:260px;max-width:100%;resize:vertical}
.ow-waybill-form h3,.ow-waybill-section,.ow-waybill-fields,.ow-waybill-form .ow-doc-preview-actions{flex-basis:100%;margin:0}
.ow-waybill-fields{min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:10px;padding:12px;border:1px solid var(--ow-border);border-radius:6px}
#ow-document-issue .ow-waybill-fields label{min-width:0}
.ow-waybill-fields input{min-width:0;width:100%}
.ow-waybill-section summary{cursor:pointer;margin-bottom:6px}

/* Compact order overview keeps the working table close to the top. */
.ow-card .ow-card-header{align-items:center;gap:16px;margin:12px 0}
.workspace:has(.ow-card) .page-heading{display:none}
.ow-card .ow-card-header h1{font-size:21px;line-height:1.25;letter-spacing:-.4px;margin:0 0 8px;font-weight:650}
.ow-card .ow-card-date{font-weight:400;color:#69778a}
.ow-header-total{flex:none;text-align:right;padding:4px 0 4px 18px;border-left:1px solid var(--ow-border)}
.ow-header-total span{display:block;color:#748095;font-size:11px;margin-bottom:3px}
.ow-header-total strong{font-size:20px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ow-process{display:contents}
.ow-flow-disclosure,.ow-process .ow-operation-disclosure{border:1px solid var(--ow-border);border-radius:7px;background:#fff;margin:0}
.ow-flow-disclosure>summary,.ow-process .ow-operation-disclosure>summary{cursor:pointer;padding:7px 10px;color:#4d5d74;font-weight:600;white-space:nowrap}
.ow-flow-disclosure[open],.ow-process .ow-operation-disclosure[open]{flex-basis:100%}
.ow-card .ow-flow{padding:10px 16px;margin:0;min-width:0}
.ow-card .ow-summary{padding:12px 16px}
.ow-card .ow-summary-title{display:none}
.ow-card .ow-key-details{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 20px}
.ow-card .ow-summary .ow-note{margin-top:10px;padding-top:8px;display:grid;grid-template-columns:125px minmax(0,1fr);gap:10px;align-items:baseline}
.ow-card .ow-summary .ow-note p{margin:0;color:#34445a}
.ow-summary-more{margin-top:9px;border-top:1px solid var(--ow-border)}
.ow-summary-more summary{cursor:pointer;color:#4964c5;font-weight:600;padding:8px 0 0;list-style:none}
.ow-summary-more summary::-webkit-details-marker{display:none}
.ow-summary-more summary::before{content:'▸';display:inline-block;margin-right:7px}
.ow-summary-more[open] summary::before{transform:rotate(90deg)}
.ow-summary-more .ow-details-grid{margin-top:12px}
.ow-print-details{display:none}
.ow-card .ow-tab-section{padding-top:0}
.ow-card .ow-card-tabs button{padding:10px 0}
.ow-card .ow-card-tabs+div{padding:12px 16px}
.ow-card .ow-panel-heading{margin:0 0 10px}
@media(max-width:900px){.ow-card .ow-key-details{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.ow-card .ow-card-header{flex-direction:row;align-items:flex-start}.ow-card .ow-card-header h1{font-size:18px}.ow-header-total{padding-left:10px}.ow-header-total strong{font-size:16px}.ow-card .ow-key-details{gap:10px 14px}.ow-card .ow-flow{padding:9px 12px}.ow-summary-more summary{padding-top:9px}.ow-card .ow-summary .ow-note{grid-template-columns:1fr;gap:3px}}
@media(max-width:420px){.ow-card .ow-card-header{flex-wrap:wrap}.ow-header-total{text-align:left;border-left:0;border-top:1px solid var(--ow-border);padding:8px 0 0;width:100%}}
@media print{.ow-process,.ow-summary-more{display:none}.ow-print-details{display:block}.ow-header-total{border:0}.ow-card .ow-key-details{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Order details stay visible while the positions remain the main working area. */
.ow-card .ow-summary{padding:14px 16px}
.ow-order-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px 24px}
.ow-order-fields dl{display:grid;align-content:start;gap:7px;margin:0;min-width:0}
.ow-order-fields .ow-field{display:grid;grid-template-columns:minmax(95px,36%) minmax(0,1fr);align-items:start;gap:8px}
.ow-order-fields dt{padding-top:6px;color:#66758b;font-size:11px}
.ow-order-fields dd{min-height:28px;margin:0;padding:5px 8px;background:#f8faff;border:1px solid #e2e8f0;border-radius:4px;overflow-wrap:anywhere}
.ow-card .ow-card-tabs{gap:22px}
.ow-card .ow-card-tabs button{font-size:12px;padding:11px 0}
.ow-card .ow-items th{padding:8px 10px}
.ow-card .ow-items td{padding:9px 10px}
.ow-position-tools{display:flex;align-items:center;gap:12px;margin:0 0 10px}
.ow-position-tools input{width:min(340px,100%);padding:6px 9px}
.ow-position-tools span{color:#66758b;font-size:11px}
.ow-card .ow-edit-grid{gap:12px 16px}
.ow-card .ow-full-items h3{border-bottom:2px solid #315efb;padding-bottom:9px}
@media(max-width:1150px){.ow-order-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.ow-order-fields{grid-template-columns:1fr;gap:7px}.ow-order-fields .ow-field{grid-template-columns:minmax(105px,34%) minmax(0,1fr)}.ow-card .ow-card-tabs{gap:15px}}
@media print{.ow-order-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.ow-order-fields dd{background:white}.ow-position-tools{display:none}}

/* Match the compact buttons, bordered cards and key/value details of the local workbench. */
.ow-card-header-actions{align-items:center;gap:6px;margin-bottom:10px}
.ow-card .ow-card-header-actions>.cw-button,.ow-action-menu>summary{min-height:30px;padding:5px 9px;border-radius:6px;font-size:12px}
.ow-action-menu{position:relative}
.ow-action-menu>summary{display:flex;align-items:center;gap:6px;list-style:none;cursor:pointer;border:1px solid var(--ow-border);background:#fff;color:#42536a;font-weight:500;white-space:nowrap}
.ow-action-menu>summary::-webkit-details-marker{display:none}
.ow-action-menu>summary::after{content:'⌄';color:#7c8799}
.ow-action-menu[open]>summary,.ow-action-menu>summary:hover{background:#f7f9fc}
.ow-action-menu>summary:focus-visible{outline:2px solid #315efb;outline-offset:2px}
.ow-menu-panel{position:absolute;top:calc(100% + 5px);left:0;z-index:30;width:280px;max-width:calc(100vw - 32px);max-height:65vh;overflow:auto;padding:6px;background:#fff;border:1px solid #dbe2eb;border-radius:8px;box-shadow:0 10px 24px #172b4d26}
.ow-actions-menu .ow-menu-panel{left:auto;right:0;width:440px}
.ow-menu-panel>a,.ow-menu-panel>button{display:block;width:100%;padding:8px 10px;border:0;border-radius:5px;text-align:left;color:#263348;text-decoration:none;background:transparent}
.ow-menu-panel>a:hover,.ow-menu-panel>button:hover{background:#f2f5fa}
.ow-menu-panel>a small{float:right;color:#708096}
.ow-menu-panel>p{margin:6px 10px;color:#748095;font-size:11px}
.ow-menu-label{padding:9px 10px 5px;color:#748095;font-size:11px;font-weight:600}
.ow-actions-menu .ow-flow-disclosure{border:0;border-radius:5px}
.ow-actions-menu .ow-flow-disclosure>summary{padding:8px 10px;font-weight:500}
.ow-actions-menu .ow-flow{overflow-x:auto}
.ow-actions-menu .ow-operations{border:0;border-radius:0;margin:0;padding:4px 10px 10px}
.ow-order-fields dt{padding-top:1px}
.ow-order-fields dd{min-height:0;padding:0;background:none;border:0;border-radius:0;color:#263348}
@media(max-width:650px){.ow-actions-menu .ow-menu-panel{position:fixed;top:auto;right:16px;left:16px;width:auto;max-width:none}.ow-card-header-actions{gap:5px}}
@media print{.ow-action-menu{display:none!important}}

/* Order workspace aligned with MoySklad customerorder reference:
   top action toolbar + owner meta, inline title/date boxes + posted/reserve flags,
   3-column boxed form parameters above tabs, light-blue position sub-toolbar,
   and bottom split with comment box on the left and totals on the right. */
.ow-card .ow-card-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid #e2e8f0}
.ow-card .ow-card-header-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px;margin:0}
.ow-card .ow-card-header-actions>.cw-button,.ow-card .ow-action-menu>summary{min-height:28px;height:28px;padding:4px 10px;font-size:12px;line-height:18px;border-radius:4px}
.ow-card .ow-card-header-actions>.cw-button:not(.cw-primary),.ow-card .ow-action-menu>summary{border:1px solid #cbd5e1;background:#fff;color:#263348;box-shadow:0 1px 1px #0f172a08}
.ow-card .ow-card-header-actions>.cw-button:not(.cw-primary):hover,.ow-card .ow-action-menu>summary:hover,.ow-card .ow-action-menu[open]>summary{background:#f1f5f9;border-color:#94a3b8}
.ow-card .ow-card-header-actions>.ow-btn-save{background:#7ec128;border:1px solid #6cab1d;color:#fff;font-weight:600;box-shadow:0 1px 1px #0f172a14}
.ow-card .ow-card-header-actions>.ow-btn-save:hover{background:#71b020;border-color:#5f9918}
.ow-card .ow-print-menu .ow-menu-panel,.ow-card .ow-doc-menu .ow-menu-panel{left:0;right:auto;width:320px}
.ow-card .ow-actions-menu .ow-menu-panel{left:0;right:auto;width:460px}
.ow-status-menu>summary{padding:2px 6px!important;height:26px!important;min-height:26px!important;border-radius:4px!important;background:#fff!important}
.ow-status-menu>summary .ow-badge{padding:2px 6px;font-size:11px;font-weight:600}
.ow-status-panel{left:0;right:auto;width:360px}
.ow-status-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 8px;border-radius:5px}
.ow-status-row.is-current{background:#eff6ff;border:1px solid #bfdbfe}
.ow-status-row.is-done{opacity:.88}
.ow-status-state{font-size:11px;color:#64748b;white-space:nowrap}
.ow-status-act{padding:4px 9px!important;font-size:11px!important;min-height:24px!important;height:auto!important;width:auto!important}
.ow-doc-item{display:block;width:100%;padding:7px 10px;border:0;border-top:1px solid #f1f5f9;border-radius:4px;text-align:left;background:transparent;color:#1e293b;text-decoration:none;cursor:pointer}
.ow-doc-item:hover{background:#f1f5f9}
.ow-doc-item strong{display:block;font-size:11px;font-weight:600;color:#1d4ed8}
.ow-doc-item small{display:block;font-size:10px;color:#64748b;margin-top:2px;float:none!important}
.ow-cp-link{color:#1d4ed8;font-weight:600;text-decoration:none}
.ow-cp-link:hover{text-decoration:underline}
.ow-contact-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px;font-size:11px;color:#475569}
.ow-contact-chips:empty{display:none}
.ow-contact-chip{padding:3px 8px!important;font-size:11px!important;background:#eff6ff!important;border:1px solid #bfdbfe!important;color:#1d4ed8!important}
.ow-card-meta{display:flex;align-items:center;gap:14px;margin-left:auto;font-size:11px;color:#475569}
.ow-meta-item{display:grid;text-align:right;line-height:1.25}
.ow-meta-item strong,.ow-meta-item b{color:#2563eb;font-weight:500}
.ow-meta-item small{color:#64748b;font-size:10px}
.ow-meta-avatar{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#dbeafe;color:#1d4ed8;font-weight:600;font-size:11px;flex-shrink:0}
.ow-card .ow-overview{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:4px 0 10px;margin-bottom:8px;border:0;border-bottom:1px solid #e2e8f0;border-radius:0;background:transparent}
.ow-card .ow-overview-main{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.ow-card .ow-overview-main h1{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:18px;line-height:1.25;letter-spacing:-.2px;margin:0 4px 0 0;font-weight:600;color:#1e293b}
.ow-ms-input-box{display:inline-flex;align-items:center;height:26px;padding:0 8px;border:1px solid #cbd5e1;border-radius:3px;background:#fff;font-size:13px;font-weight:500;color:#1e293b;font-variant-numeric:tabular-nums}
.ow-ms-from{font-weight:400;font-size:13px;color:#64748b}
.ow-ms-check{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#475569;padding:2px 6px;user-select:none}
.ow-ms-check i{display:inline-grid;place-items:center;width:14px;height:14px;border:1px solid #cbd5e1;border-radius:3px;background:#fff;font-style:normal;font-size:10px;color:transparent}
.ow-ms-check.is-on i{background:#2563eb;border-color:#2563eb;color:#fff}
.ow-card .ow-overview-amount{display:flex;align-items:baseline;gap:8px;white-space:nowrap;margin-left:auto}
.ow-card .ow-overview-amount>span{font-size:11px;color:#64748b}
.ow-card .ow-overview-amount>strong{font-size:16px;color:#0f172a;font-variant-numeric:tabular-nums}
.ow-card .ow-summary{padding:8px 0 14px;border:0;border-bottom:1px solid var(--ow-border);margin:0 0 10px;background:transparent}
.ow-card .ow-summary h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.ow-card .ow-order-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 24px}
.ow-card .ow-order-fields dl{display:grid;gap:6px;align-content:start}
.ow-card .ow-order-fields .ow-field{grid-template-columns:128px minmax(0,1fr);align-items:center;gap:8px;min-height:26px;padding:0;border:0}
.ow-card .ow-order-fields dt{padding:0;font-size:11px;color:#334155;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ow-card .ow-order-fields dd{min-height:26px;padding:3px 8px;border:1px solid #cbd5e1;border-radius:3px;background:#fff;text-align:left;font-size:12px;color:#0f172a;display:flex;align-items:center;overflow-wrap:anywhere}
.ow-card .ow-card-body>.ow-tab-section{border:0;border-radius:0;padding:0;background:transparent;margin:0}
.ow-card-tabs-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ow-border);margin-bottom:8px;flex-wrap:wrap}
.ow-card .ow-card-tabs{padding:0;gap:20px;border-bottom:0}
.ow-card .ow-card-tabs button{padding:9px 0;font-size:12px}
.ow-tabs-actions{display:flex;align-items:center;gap:10px;margin-left:auto;padding-bottom:4px}
.ow-tab-link{border:0;background:none;color:#2563eb;font-size:11px;cursor:pointer;padding:4px 6px}
.ow-tab-link:hover{text-decoration:underline}
.ow-card .ow-add-btn{height:26px;padding:3px 10px;font-size:11px;border-color:#93c5fd;color:#1d4ed8;background:#eff6ff}
.ow-card .ow-add-btn:hover{background:#dbeafe}
.ow-card .ow-card-tabs-bar+#ow-panel{padding:0}
.ow-card .ow-position-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;padding:6px 10px;background:#eef4fb;border:1px solid #dbe6f3;border-bottom:0;border-radius:6px 6px 0 0}
.ow-pos-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:3px;background:#fff;border:1px solid #93c5fd;color:#1d4ed8;font-size:11px;font-weight:600}
.ow-pos-chip{color:#2563eb;font-size:11px;padding:0 4px}
.ow-pos-search{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #cbd5e1;border-radius:4px;padding:0 8px;width:min(300px,100%);height:26px}
.ow-pos-search input{border:0!important;padding:2px 0!important;font-size:11px;width:100%;outline:none;background:transparent}
.ow-pos-search span{color:#64748b;font-size:13px}
.ow-pos-flags{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:11px;color:#334155}
.ow-pos-flag{display:inline-flex;align-items:center;gap:5px}
.ow-pos-flag i{width:14px;height:8px;border-radius:8px;background:#2563eb;display:inline-block}
.ow-card [data-ow-positions] .ow-table-wrap{border-radius:0 0 6px 6px}
.ow-card .ow-items th{padding:7px 9px;background:#f8fafc}
.ow-card .ow-items td{padding:7px 9px}
.ow-card .ow-position-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:8px 2px 4px;font-size:11px;color:#475569}
.ow-inline-action{border:0;background:none;color:#2563eb;font-size:11px;font-weight:500;cursor:pointer;padding:0}
.ow-inline-action:hover{text-decoration:underline}
.ow-pos-stat strong{color:#0f172a}
.ow-ms-footer{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;align-items:start;margin-top:10px;padding-top:10px;border-top:1px solid var(--ow-border)}
.ow-ms-comment-col{min-width:0}
.ow-ms-comment-box{min-height:60px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#1e293b;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.ow-ms-footer .ow-total{border:0;border-radius:0;padding:0;margin:0;background:transparent}
.ow-ms-footer .ow-total h2{display:none}
.ow-ms-footer .ow-total dl{margin:0;display:grid;gap:4px}
.ow-ms-footer .ow-total dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:2px 0}
.ow-ms-footer .ow-total .ow-grand-total{margin-top:4px;padding-top:6px;border-top:1px solid #e2e8f0}
.ow-ms-footer .ow-total .ow-grand-total dt{font-size:14px;font-weight:650;color:#0f172a}
.ow-ms-footer .ow-total .ow-grand-total dd{font-size:18px;font-weight:700;color:#0f172a}
.ow-total-meta{display:flex;align-items:center;justify-content: flex-end;gap:8px;margin-top:6px;font-size:11px;color:#64748b}
@media(max-width:1050px){.ow-card .ow-order-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px}.ow-ms-footer{grid-template-columns:1fr}}
@media(max-width:650px){.ow-card .ow-card-header{align-items:flex-start;flex-wrap:wrap}.ow-card .ow-card-header-actions{width:100%}.ow-card-meta{margin-left:0}.ow-card .ow-overview{align-items:flex-start;flex-direction:column;gap:6px}.ow-card .ow-order-fields{grid-template-columns:1fr}.ow-card .ow-card-tabs{gap:14px}}
@media print{.ow-card .ow-overview{border:0;padding:0}.ow-card .ow-summary{display:block}.ow-card .ow-print-items .ow-summary{display:block}.ow-card-meta,.ow-tabs-actions,.ow-ms-comment-col{display:none!important}}

/* CRM order overview and paginated status board. */
.ow-views{display:flex;gap:4px;margin:0}.ow-board-hint{font-size:11px;color:#64748b;margin:8px 0}
.ow-board{display:flex;gap:10px;overflow-x:auto;align-items:flex-start;padding-bottom:10px}
.ow-board-column{flex:0 0 232px;min-width:0;padding:10px;border:1px solid #e2e8f0;border-radius:7px;background:#f8fafc}
.ow-board-column header{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#334155}.ow-board-column header span{font-weight:700}
.ow-board-amount{min-height:20px;margin:5px 0 8px;font-size:11px;color:#64748b;overflow-wrap:anywhere}.ow-board-cards{display:grid;gap:8px}
.ow-board-card{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:10px;border:1px solid #dce5ef;border-radius:6px;background:#fff;overflow-wrap:anywhere;transition:border-color .15s ease,box-shadow .15s ease}
.ow-board-card:hover{border-color:#93c5fd;box-shadow:0 3px 10px #0f172a0d}
.ow-board-card small,.ow-board-empty{font-size:11px;color:#64748b}.ow-board-card b{color:#0f172a;font-variant-numeric:tabular-nums}.ow-board-empty{padding:8px 2px}
.ow-board-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;font-size:11px;color:#64748b}

/* Register enhancements: status tab counts, inline view switcher, active filters strip & clean cells. */
.ow-status-tabs>button{display:inline-flex;align-items:center;gap:6px;padding:10px 11px;font-size:12px}
.ow-tab-count{font-size:10px;font-weight:600;color:#64748b;background:#f1f5f9;padding:1px 6px;border-radius:999px;font-variant-numeric:tabular-nums}
.ow-status-tabs>button.active .ow-tab-count{background:#dbeafe;color:#1d4ed8}
.ow-tools{flex-wrap:wrap;gap:8px 10px;margin:10px 0 12px}
.ow-tools .ow-sort{margin-left:0}
.ow-views{display:inline-flex;align-items:center;gap:2px;margin-left:auto;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:7px;padding:2px}
.ow-views .cw-button{height:28px;min-height:28px;padding:3px 10px;border:0;border-radius:5px;background:transparent;color:#475569;font-size:12px;box-shadow:none}
.ow-views .cw-button.cw-primary{background:#fff;color:#1d4ed8;font-weight:600;box-shadow:0 1px 2px #0f172a12}
.ow-active-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:7px 10px;margin-bottom:10px;border:1px solid #e2e8f0;border-radius:7px;background:#f8fafc;font-size:11px;color:#475569}
.ow-filter-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:5px;background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.ow-active-totals{margin-left:auto;color:#334155;font-weight:600;font-variant-numeric:tabular-nums}
.ow-cp-unp{display:inline-block;font-size:10px;color:#475569;background:#f1f5f9;border-radius:4px;padding:1px 5px;margin-top:3px}
.ow-table-link-cp{color:inherit;text-decoration:none;font-weight:550}
.ow-table-link-cp:hover{color:#1d4ed8;text-decoration:underline}
.ow-item-preview{max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#64748b}

/* Order card refinements: status button alignment, stepper, clean fields, document workspace. */
.ow-card .ow-card-header-actions>.ow-btn-edit{background:#fff;border:1px solid #93c5fd;color:#1d4ed8;font-weight:600}
.ow-card .ow-card-header-actions>.ow-btn-edit:hover{background:#eff6ff;border-color:#60a5fa}
.ow-status-menu>summary{border:1px solid #cbd5e1!important;box-shadow:none!important;background:#fff!important;display:inline-flex!important;align-items:center!important;gap:4px!important;line-height:1!important}
.ow-status-menu>summary::after{content:'▾';margin-left:2px;font-size:10px;line-height:1}
.ow-status-menu>summary .ow-badge{border-color:transparent!important;background:transparent!important;padding:1px 2px!important}
.ow-overview-stack{display:grid;gap:4px;min-width:0}
.ow-overview-sub{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:11px;color:#64748b}
.ow-overview-sub strong{color:#334155;font-weight:600}
.ow-overview-pill{display:inline-flex;align-items:center;gap:4px;padding:1px 7px;border-radius:4px;background:#f1f5f9;color:#475569;font-size:10px}
.ow-stepper{display:flex;align-items:center;gap:6px;padding:7px 10px;margin:0 0 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;overflow-x:auto}
.ow-stepper>span{display:inline-flex;align-items:center;gap:6px;flex:1 0 auto;font-size:11px;color:#94a3b8;white-space:nowrap}
.ow-stepper>span:not(:last-child)::after{content:'';flex:1;min-width:14px;height:1px;background:#e2e8f0;margin-left:4px}
.ow-stepper b{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;font-size:10px;font-weight:600}
.ow-stepper>span.done{color:#15803d}
.ow-stepper>span.done b{background:#dcfce7;border-color:#86efac;color:#15803d}
.ow-stepper>span.current{color:#1d4ed8;font-weight:600}
.ow-stepper>span.current b{background:#2563eb;border-color:#2563eb;color:#fff}
.ow-stepper>span.warn{color:#b91c1c;font-weight:600}
.ow-stepper>span.warn b{background:#fee2e2;border-color:#fca5a5;color:#b91c1c}
.ow-pos-flag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:4px;background:#fff;border:1px solid #dbe6f3;color:#475569;font-size:11px}
.ow-comment-label{display:block;font-size:11px;font-weight:600;color:#475569;margin-bottom:5px}
.ow-doc-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ow-doc-btn{padding:3px 9px!important;font-size:11px!important;min-height:24px!important;height:auto!important}
.ow-doc-preview{border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;padding:14px;margin-bottom:14px}
.ow-doc-preview-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.ow-doc-preview-actions{display:flex;flex-wrap:wrap;gap:6px}
.ow-doc-sheet{background:#fff;border:1px solid #dce3ed;border-radius:6px;padding:20px 24px;color:#0f172a;font-size:12px;line-height:1.5;overflow-x:auto}
.ow-doc-sheet h3{margin:0 0 4px;font-size:16px}
.ow-doc-sheet table{width:100%;border-collapse:collapse;margin:12px 0;font-size:11px}
.ow-doc-sheet th,.ow-doc-sheet td{border:1px solid #cbd5e1;padding:6px 8px;text-align:left}
.ow-doc-sheet th{background:#f1f5f9;font-weight:600}
.ow-doc-sheet .num{text-align:right;white-space:nowrap}
.ow-doc-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:10px 0 12px;font-size:11px}
.ow-doc-parties>div{padding:8px 10px;border:1px solid #e2e8f0;border-radius:5px;background:#fbfdff}
.ow-edit-sections{display:grid;gap:12px}
.ow-edit-group{border:1px solid #e2e8f0;border-radius:7px;background:#fff;padding:12px 14px}
.ow-edit-group h3{margin:0 0 10px;font-size:12px;font-weight:600;color:#334155}
.ow-edit-summary{display:flex;justify-content:flex-end;gap:16px;padding:8px 4px 0;font-size:12px;color:#334155}
@media(max-width:650px){.ow-doc-parties{grid-template-columns:1fr}.ow-views{margin-left:0}}

.ow-layout-card {min-width:0;max-width:100%}
.ow-layout-card .ow-card-body,.ow-layout-card .ow-tab-section {min-width:0}
.ow-order-head {display:grid;gap:12px;padding:14px 0;border-block:1px solid #dce3ea}
.ow-identity,.ow-figures,.ow-observed {display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px}
.ow-identity h1 {margin:0;font-size:clamp(16px,2vw,22px);overflow-wrap:anywhere;color:#182e44}
.ow-identity time {color:#566678;font-size:13px}
.ow-identity>div {min-width:0;overflow-wrap:anywhere}
.ow-figures {align-items:stretch;gap:12px}
.ow-figures .ow-overview-amount {display:grid;align-content:start;align-items:start;gap:3px;margin:0;white-space:normal;padding:6px 16px 6px 0;border-right:1px solid #dce3ea}
.ow-figures .ow-overview-amount:last-child {border:0}
.ow-figures .ow-overview-amount strong {line-height:1.25;font-size:19px}
.ow-figures .ow-overview-amount small {color:#475569}
.ow-figures .ow-overview-amount .ow-cost-warning {color:#77440b;background:#fff5de;border-left:3px solid #dba546;padding:3px 6px}
.ow-more,.ow-delivery-check {margin-block:12px;border-block:1px solid #dce3ea;padding:8px 0}
.ow-more>summary,.ow-delivery-check>summary {cursor:pointer;color:#214c71;font-weight:600;padding:4px}
.ow-parameters .ow-summary h2 {position:static;width:auto;height:auto;clip:auto;font-size:14px}
.ow-layout-card .ow-card-tabs {overflow-x:auto}
.ow-layout-card .ow-card-tabs-bar {max-width:100%}
.ow-logistics {display:grid;grid-template-columns:2fr 1fr;gap:20px}
.ow-logistics>section {min-width:0}
.ow-observed {margin:12px 0;gap:6px;font-size:13px}
.ow-observed span {background:#edf2f7;border-radius:4px;padding:3px 7px}
@media(max-width:720px){.ow-logistics{grid-template-columns:1fr}.ow-identity{gap:6px 12px}.ow-layout-card .ow-card-header-actions{flex-wrap:wrap}.ow-layout-card .ow-card-tabs-bar{display:block}.ow-figures .ow-overview-amount{min-width:0}}
@media print {.ow-more,.ow-delivery-check{display:none}}

/* Keep column controls with their own table, including on narrow cards. */
.ow-card [data-ow-positions] .ow-position-tools {
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.ow-card [data-ow-position-controls] { margin-inline-start: auto; }
.ow-card [data-ow-position-controls] .rt-toolbar { position: static; margin: 0; }
.ow-card .ow-items .ow-numeric { font-variant-numeric: tabular-nums; }
.ow-card .ow-items td { vertical-align: top; }
.ow-card .ow-items small { white-space: normal; }
.ow-card .ow-items .ow-line-basis { margin-block-start: .25rem; }
.ow-card .ow-items .ow-line-basis summary { color: #405b79; cursor: pointer; font-size: .75rem; }
.ow-card .ow-items .ow-line-basis small { overflow-wrap: anywhere; }
@media print {
  .ow-card [data-ow-positions] .ow-position-tools,
  .ow-card .ow-items .ow-line-basis { display: none; }
}

.ow-title-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.ow-title-actions>h1{min-width:0;margin:0;overflow-wrap:anywhere}
.ow-card .ow-title-actions>.ow-card-header-actions{margin:0;justify-content:flex-end}
.ow-title-actions .ow-card-header-actions{position:relative}
.ow-title-actions .ow-action-menu{position:static}
.ow-card .ow-title-actions .ow-action-menu>.ow-menu-panel{position:absolute;left:auto;right:0;top:calc(100% + 5px)}
@media(max-width:720px){
  .ow-card .ow-title-actions>.ow-card-header-actions{width:100%;justify-content:flex-start}
  .ow-order-head .ow-identity{position:relative}
  .ow-order-head .ow-identity .ow-status-menu{position:static}
  .ow-card .ow-title-actions .ow-action-menu>.ow-menu-panel,.ow-order-head .ow-identity .ow-status-panel{position:absolute;left:0;right:auto;top:calc(100% + 5px);max-width:100%;box-sizing:border-box}
}
@media print{.ow-title-actions>.ow-card-header-actions{display:none!important}}

[data-ow-bank-documents] .ow-document-grid {display:block}
[data-ow-bank-relation] {padding:10px 0;border-width:0 0 1px;border-radius:0}
[data-ow-bank-relation]>div {display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 20px}
[data-ow-bank-relation] h3 {order:-1;margin:0}
[data-ow-bank-relation] .ow-details-grid {display:flex;flex-wrap:wrap;gap:4px 14px;margin:0}
[data-ow-bank-relation] .ow-field {margin:0}
[data-ow-bank-relation] p {margin:0}

/* Keep view selection and column settings together when the order toolbar wraps. */
.ow-tools > .ow-view-actions {
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:4px;
  flex:0 0 auto;
  margin-inline-start:auto;
  order:2;
}
.ow-tools > .ow-view-actions > .rt-toolbar { margin-inline-start:0; }

/* Unified Deal-form styling applied to Customer Order cards (CRM & ERP). */
.ow-deal-card details.ow-action-menu { border: 0 !important; margin: 0; padding: 0; background: transparent; }
.ow-deal-card .ow-deal-head { border-top: 0; border-bottom: 1px solid #e2e8f0; padding: 2px 0 10px; gap: 8px; }
.ow-deal-card .ow-deal-title-wrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.ow-deal-card .ow-deal-title-wrap h1 { margin: 0; font-size: 20px; font-weight: 700; color: #0f172a; letter-spacing: -.02em; }
.ow-deal-card .ow-source-link { font-size: 12px; color: #64748b; text-decoration: none; white-space: nowrap; }
.ow-deal-card .ow-source-link:hover { color: #1d4ed8; text-decoration: underline; }
.ow-deal-card .ow-card-header-actions { gap: 8px; }
.ow-deal-card .ow-card-header-actions > .cw-button,
.ow-deal-card .ow-card-header-actions .ow-action-menu > summary { height: 34px; min-height: 34px; padding: 0 13px; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease; }
.ow-deal-card .ow-card-header-actions > .cw-button:not(.cw-primary):hover:not(:disabled),
.ow-deal-card .ow-card-header-actions .ow-action-menu > summary:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }
.ow-deal-card .ow-card-header-actions .ow-action-menu[open] > summary { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.ow-deal-card .ow-card-header-actions > .cw-button:focus-visible,
.ow-deal-card .ow-card-header-actions .ow-action-menu > summary:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.ow-deal-card .ow-card-header-actions > .ow-btn-edit,
.ow-deal-card .ow-card-header-actions > .ow-btn-save { background: #2563eb; border: 1px solid #2563eb; color: #fff; box-shadow: 0 1px 2px #1d4ed822; }
.ow-deal-card .ow-card-header-actions > .ow-btn-edit:hover,
.ow-deal-card .ow-card-header-actions > .ow-btn-save:hover { background: #1d4ed8; border-color: #1d4ed8; }
.ow-deal-card .ow-action-menu > summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 2px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: translateY(-1.5px) rotate(45deg); opacity: .65; transition: transform .15s ease, opacity .15s ease; flex-shrink: 0; }
.ow-deal-card .ow-action-menu[open] > summary::after { transform: translateY(1.5px) rotate(-135deg); opacity: 1; }
.ow-deal-card .ow-status-menu > summary { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; gap: 4px; }
.ow-deal-card .ow-status-menu > summary::after { width: 5px; height: 5px; margin-left: 1px; margin-right: 2px; color: #64748b; }
.ow-deal-card .ow-card-header-actions > .ow-btn-edit::before,
.ow-deal-card .ow-card-header-actions > .ow-btn-save::before,
.ow-deal-card .ow-actions-menu > summary::before,
.ow-deal-card .ow-doc-menu > summary::before,
.ow-deal-card .ow-print-menu > summary::before,
.ow-deal-card .ow-card-header-actions > [data-cw-action="refresh"]::before { content: ''; display: inline-block; width: 14px; height: 14px; flex-shrink: 0; background: currentColor; opacity: .88; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain; mask-position: center; mask-repeat: no-repeat; mask-size: contain; }
.ow-deal-card .ow-btn-edit::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-btn-save::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-actions-menu > summary::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'/%3E%3Cline x1='4' y1='10' x2='4' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12' y2='3'/%3E%3Cline x1='20' y1='21' x2='20' y2='16'/%3E%3Cline x1='20' y1='12' x2='20' y2='3'/%3E%3Cline x1='1' y1='14' x2='7' y2='14'/%3E%3Cline x1='9' y1='8' x2='15' y2='8'/%3E%3Cline x1='17' y1='16' x2='23' y2='16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'/%3E%3Cline x1='4' y1='10' x2='4' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12' y2='3'/%3E%3Cline x1='20' y1='21' x2='20' y2='16'/%3E%3Cline x1='20' y1='12' x2='20' y2='3'/%3E%3Cline x1='1' y1='14' x2='7' y2='14'/%3E%3Cline x1='9' y1='8' x2='15' y2='8'/%3E%3Cline x1='17' y1='16' x2='23' y2='16'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-doc-menu > summary::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-print-menu > summary::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-card-header-actions > [data-cw-action="refresh"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E"); }
.ow-deal-card .ow-menu-panel { border-radius: 10px; border: 1px solid #e2e8f0; box-shadow: 0 12px 28px rgba(15, 23, 42, .12); padding: 6px; }
.ow-deal-card .ow-menu-panel > button,
.ow-deal-card .ow-menu-panel > a { border-radius: 6px; padding: 8px 10px; font-size: 12.5px; font-weight: 500; color: #1e293b; }
.ow-deal-card .ow-menu-panel > button:hover,
.ow-deal-card .ow-menu-panel > a:hover { background: #eff6ff; color: #1d4ed8; }
.ow-deal-card .ow-deal-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding-top: 2px; }
.ow-deal-card .ow-identity { gap: 6px 8px; }
.ow-deal-card .ow-id-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 11px; font-weight: 600; color: #475569; font-variant-numeric: tabular-nums; }
.ow-deal-card .ow-badge-vat { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; font-weight: 600; }
.ow-deal-card .ow-deal-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 11px; font-weight: 600; cursor: pointer; }
.ow-deal-card .ow-deal-badge:hover { background: #d1fae5; }
.ow-deal-card .ow-kpi-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.ow-deal-card .ow-kpi-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 6px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 11px; color: #475569; }
.ow-deal-card .ow-kpi-chip small { font-size: 11px; color: #64748b; font-weight: 500; }
.ow-deal-card .ow-kpi-chip strong { font-size: 12px; color: #0f172a; font-weight: 700; font-variant-numeric: tabular-nums; }
.ow-deal-card .ow-kpi-chip.is-total { background: #eff6ff; border-color: #bfdbfe; }
.ow-deal-card .ow-kpi-chip.is-total strong { color: #1d4ed8; font-size: 13px; }
.ow-deal-card .ow-kpi-chips .ow-overview-amount { display: inline-flex; flex-direction: row; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 6px; background: #f8fafc; border: 1px solid #e2e8f0; margin: 0; }
.ow-deal-card .ow-kpi-chips .ow-overview-amount span { font-size: 11px; color: #64748b; margin: 0; }
.ow-deal-card .ow-kpi-chips .ow-overview-amount strong { font-size: 12px; color: #0f172a; font-weight: 700; }
.ow-deal-card .ow-deal-headgrid { padding: 12px 0 6px; margin: 0 0 4px; border: 0; border-bottom: 0; background: transparent; }
.ow-deal-card .ow-deal-headgrid > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ow-ms-headgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 22px; align-items: start; }
.ow-ms-col { display: grid; gap: 7px; margin: 0; min-width: 0; align-content: start; }
.ow-hfield { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.ow-hfield.ow-hfield-top { align-items: start; }
.ow-hfield.ow-hfield-top > dt, .ow-hfield.ow-hfield-top > span { padding-top: 6px; }
.ow-hfield > dt, .ow-hfield > span { font-size: 11.5px; color: #64748b; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow-hfield > dd { margin: 0; min-width: 0; }
.ow-hbox, .ow-hfield > dd:not(.ow-hpair):not(.ow-hfree) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 29px; padding: 4px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; color: #0f172a; overflow-wrap: anywhere; min-width: 0; }
.ow-deal-card .ow-deal-headgrid .ow-hbox,
.ow-deal-card .ow-deal-headgrid .ow-hfield > dd:not(.ow-hpair):not(.ow-hfree),
.ow-ro-box { background: #f8fafc; border-color: #e2e8f0; }
.ow-hpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.ow-hpair:has(.ow-source-delivery) { grid-template-columns: minmax(0, 1.45fr) minmax(88px, 0.85fr); }
.ow-hpair > .ow-hbox { min-width: 0; overflow: hidden; }
.ow-source-delivery { min-width: 0; max-width: 100%; }
.ow-source-delivery > summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; cursor: pointer; font-size: 11.5px; }
.ow-hbox .cw-button { height: 24px; min-height: 24px; padding: 0 9px; font-size: 11.5px; font-weight: 600; border-radius: 5px; }
.ow-deal-card .ow-cp-link { font-weight: 600; }
.ow-deal-card .ow-cp-link::after { content: ' ↗'; font-size: 11px; opacity: .7; }
.ow-deal-card .ow-cp-ext::after { content: none; }
.ow-inline-dt { display: contents; margin: 0; }
.ow-inline-dt dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ow-inline-dt dd { margin: 0; min-width: 0; border: 0; padding: 0; min-height: 0; background: transparent; display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ow-cp-cell { display: grid; gap: 4px; min-width: 0; }
.ow-cp-req-bar { padding: 4px 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: 11px; line-height: 1.35; color: #475569; }
.ow-cp-req-txt { min-width: 0; overflow-wrap: anywhere; }
.ow-cp-req-ok { color: #15803d; font-weight: 600; white-space: nowrap; }
.ow-cp-req-miss { color: #94a3b8; white-space: nowrap; }
.ow-deal-edit { padding: 12px 0 6px; margin: 0 0 4px; border: 0; border-bottom: 0; background: transparent; border-radius: 0; }
.ow-deal-edit .ow-hfield input:not([type=hidden]):not([type=checkbox]),
.ow-deal-edit .ow-hfield select,
.ow-deal-edit .ow-edit-stack label input:not([type=checkbox]),
.ow-deal-edit .ow-edit-stack label select { height: 29px; min-height: 29px; padding: 3px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; width: 100%; min-width: 0; color: #0f172a; }
.ow-deal-edit .ow-hfield input:focus,
.ow-deal-edit .ow-hfield select:focus,
.ow-deal-edit .ow-edit-stack label select:focus,
.ow-deal-edit .ow-edit-stack label input:focus,
.ow-deal-edit textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, .15); }
.ow-deal-edit .ow-edit-stack > label,
.ow-deal-edit .ow-edit-stack > .ow-field { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 11.5px; color: #64748b; font-weight: 500; min-width: 0; }
.ow-deal-edit .ow-edit-stack > label.ow-hfield-top { align-items: start; }
.ow-deal-edit .ow-hfield textarea { min-height: 60px; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; width: 100%; min-width: 0; }
.ow-buyer-input-row { display: flex; align-items: center; gap: 6px; }
.ow-deal-edit .ow-full-buyer .ow-full-search { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ow-deal-edit .ow-full-buyer .ow-full-search input { flex: 1 1 100%; min-width: 0; }
.ow-cp-ext { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; line-height: 19px; }
.ow-deal-edit .ow-edit-positions { margin: 14px 0 6px; }
.ow-edit-tabs-bar { display: flex; align-items: center; border-bottom: 2px solid #e2e8f0; margin: 12px 0 10px; }
.ow-edit-tab-active { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; margin: 0 0 -2px 0; font-size: 15.5px; font-weight: 600; line-height: 1.25; color: #1d4ed8; background: #eff6ff; border-bottom: 3px solid #2563eb; border-radius: 8px 8px 0 0; }
.ow-edit-tab-active .ow-tab-icon { width: 20px; height: 20px; color: #2563eb; flex-shrink: 0; }
.ow-edit-tab-active .ow-tab-badge { background: #2563eb; color: #fff; }
.ow-deal-edit .ow-edit-table { width: 100%; min-width: 640px; table-layout: auto; }
.ow-deal-edit .ow-edit-table th.ow-numeric,
.ow-deal-edit .ow-edit-table td.ow-numeric { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ow-deal-edit .ow-edit-table th.ow-col-idx,
.ow-deal-edit .ow-edit-table td.ow-col-idx { width: 44px; text-align: center !important; color: #64748b; }
.ow-deal-edit .ow-edit-table th.ow-col-sku,
.ow-deal-edit .ow-edit-table td.ow-col-sku { width: 150px; white-space: nowrap; color: #475569; font-variant-numeric: tabular-nums; }
.ow-deal-edit .ow-edit-table th.ow-col-qty,
.ow-deal-edit .ow-edit-table td.ow-col-qty { width: 106px; text-align: center !important; }
.ow-deal-edit .ow-edit-table td.ow-col-qty input[type=number] { width: 76px; min-width: 68px; height: 30px; padding: 4px 8px; text-align: center; border: 1px solid #cbd5e1; border-radius: 6px; font-variant-numeric: tabular-nums; }
.ow-deal-edit .ow-edit-table th.ow-col-price,
.ow-deal-edit .ow-edit-table td.ow-col-price { width: 130px; }
.ow-deal-edit .ow-edit-table th.ow-col-sum,
.ow-deal-edit .ow-edit-table td.ow-col-sum { width: 140px; font-weight: 600; color: #0f172a; }
.ow-deal-edit .ow-edit-table th.ow-col-del,
.ow-deal-edit .ow-edit-table td.ow-col-del { width: 48px; text-align: center !important; }
.ow-icon-remove { width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid transparent; background: transparent; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.ow-icon-remove:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.ow-deal-edit .ow-inline-add-bar { margin-top: 10px; padding: 8px 10px; border: 1px dashed #93c5fd; border-radius: 8px; background: #f8fbff; display: flex; gap: 8px; align-items: center; max-width: 640px; }
.ow-deal-edit .ow-inline-add-bar input { flex: 1; min-width: 0; height: 32px; padding: 4px 10px; }
.ow-deal-edit .ow-edit-footer { border-top: 1px solid #e2e8f0; margin-top: 16px; padding-top: 16px; }
.ow-deal-edit .ow-comment-field { display: grid; gap: 6px; }
.ow-deal-edit .ow-comment-field textarea { min-height: 76px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; width: 100%; resize: vertical; }
.ow-deal-edit .ow-edit-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.ow-deal-card .ow-deal-tabs-row { border-top: 0; border-bottom: 2px solid #e2e8f0; margin: 8px 0 12px; padding: 0; overflow: visible; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; width: 100%; padding: 0; margin: 0; border: 0; overflow: visible !important; scrollbar-width: none; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs::-webkit-scrollbar { display: none; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab] { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; margin: 0 0 -2px 0; font-size: 15.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: #334155; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; background: transparent; white-space: nowrap; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab]:hover:not(:disabled) { color: #0f172a; background: #f1f5f9; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab]:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab]:disabled { opacity: .55; cursor: not-allowed; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab][aria-selected=true] { color: #1d4ed8; background: #eff6ff; border-bottom-color: #2563eb; }
.ow-deal-card .ow-tab-icon { width: 20px; height: 20px; flex-shrink: 0; color: #64748b; transition: color .15s ease; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab]:hover:not(:disabled) .ow-tab-icon { color: #334155; }
.ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab][aria-selected=true] .ow-tab-icon { color: #2563eb; }
.ow-deal-card .ow-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; background: #e2e8f0; color: #334155; margin-left: 1px; transition: background-color .15s ease, color .15s ease; }
.ow-deal-card .ow-tab-badge.is-zero { background: #f1f5f9; color: #94a3b8; font-weight: 600; }
.ow-deal-card .ow-card-tabs button[aria-selected=true] .ow-tab-badge { background: #2563eb; color: #fff; }
.ow-deal-card .ow-card-tabs button[aria-selected=true] .ow-tab-badge.is-zero { background: #dbeafe; color: #1d4ed8; }
.ow-deal-card [data-ow-positions] .ow-pos-bar { background: #fff; border: 0; border-radius: 0; padding: 4px 0 10px; gap: 8px; }
.ow-deal-card .ow-pos-pill { border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.ow-deal-card .ow-pos-search { height: 30px; border-radius: 6px; border: 1px solid #cbd5e1; width: min(280px, 100%); }
.ow-ms-table-wrap { border: 1px solid #e2e8f0; border-radius: 8px; overflow: auto; max-width: 100%; background: #fff; }
.ow-ms-table { border-collapse: collapse; width: 100%; }
.ow-ms-table th { background: #f8fafc !important; color: #64748b; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 8px 9px !important; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.ow-ms-table td { padding: 9px !important; border-bottom: 1px solid #eef2f6; font-size: 12px; overflow-wrap: normal; word-break: normal; }
.ow-ms-table td:nth-child(2), .ow-ms-table td.ow-col-title { overflow-wrap: break-word; min-width: 200px; }
.ow-ms-table td:nth-child(3) { white-space: nowrap; }
.ow-ms-table td.ow-cell-avail { background: #f0fdf4; color: #15803d; font-weight: 700; }
.ow-deal-card .ow-ms-footer { border-top: 0; padding-top: 14px; gap: 24px; }
.ow-deal-card .ow-ms-comment-box { min-height: 66px; border-radius: 6px; border: 1px solid #cbd5e1; padding: 10px 12px; }
.ow-total-meta-qty { display: flex; justify-content: flex-end; gap: 12px; font-size: 11.5px; color: #64748b; margin-bottom: 6px; }
@media (max-width: 1140px) { .ow-ms-headgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ow-ms-headgrid { grid-template-columns: 1fr; }
  .ow-deal-card .ow-kpi-chips { margin-left: 0; }
  .ow-hfield, .ow-deal-edit .ow-edit-stack > label, .ow-deal-edit .ow-edit-stack > .ow-field { grid-template-columns: 1fr; gap: 3px; }
  .ow-deal-card .ow-deal-tabs-row .ow-card-tabs { gap: 4px; }
  .ow-deal-card .ow-deal-tabs-row .ow-card-tabs button[role=tab] { min-height: 38px; padding: 8px 11px; font-size: 13.5px; gap: 6px; }
  .ow-deal-card .ow-tab-icon { width: 17px; height: 17px; }
}

/* Send header button icon, Positions weight/volume summary strip, Modals, Waybill form, Tasks tab, File Viewer toolbar */
.ow-deal-card .ow-btn-send::before { content: ''; display: inline-block; width: 14px; height: 14px; flex-shrink: 0; background: currentColor; opacity: .88; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain; mask-position: center; mask-repeat: no-repeat; mask-size: contain; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E"); }
.ow-pos-summary-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 20px; padding: 8px 12px; margin-top: 6px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; }
.ow-pos-summary-bar strong { color: #0f172a; font-weight: 700; }
.ow-modal-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 42, .52); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ow-modal-card { position: relative; width: min(980px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); overflow: hidden; }
.ow-modal-card.ow-send-modal { width: min(680px, 100%); }
#ow-document-issue.ow-waybill-form,
#ow-document-issue.ow-erp-issue-form { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; max-height: 92vh; width: 100%; }
.ow-wb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.ow-wb-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; }
.ow-wb-head p { margin: 3px 0 0; font-size: 12px; color: #64748b; }
.ow-modal-close { width: 30px; height: 30px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 15px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ow-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.ow-wb-body { padding: 14px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; flex: 1 1 auto; min-height: 0; }
.ow-wb-body > * { flex-shrink: 0; }
.ow-wb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
#ow-document-issue .ow-wb-field,
.ow-send-form .ow-wb-field { display: grid; gap: 4px; min-width: 0; font-size: 11.5px; color: #475569; font-weight: 500; align-content: start; }
#ow-document-issue .ow-wb-field > span,
.ow-send-form .ow-wb-field > span { font-size: 11.5px; color: #475569; }
#ow-document-issue .ow-wb-field input,
#ow-document-issue .ow-wb-field select,
#ow-document-issue .ow-wb-field textarea,
.ow-send-form .ow-wb-field input,
.ow-send-form .ow-wb-field select,
.ow-send-form .ow-wb-field textarea { width: 100%; min-width: 0; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; font-size: 12.5px; }
#ow-document-issue .ow-wb-field input:focus,
#ow-document-issue .ow-wb-field select:focus,
#ow-document-issue .ow-wb-field textarea:focus,
.ow-send-form .ow-wb-field input:focus,
.ow-send-form .ow-wb-field select:focus,
.ow-send-form .ow-wb-field textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .14); }
.ow-wb-hint { margin: 0 !important; font-size: 11.5px; color: #64748b !important; background: #f8fafc; border-left: 3px solid #93c5fd; padding: 6px 10px; border-radius: 4px; }
.ow-wb-alert { margin: 0; padding: 8px 12px; border-radius: 6px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 12px; }
.ow-wb-notice { margin: 0; padding: 8px 12px; border-radius: 6px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 12px; }
.ow-wb-tax-link { font-size: 11.5px; color: #2563eb; text-decoration: none; align-self: center; font-weight: 500; white-space: nowrap; }
.ow-wb-tax-link:hover { text-decoration: underline; }
#ow-document-issue erp-document-parties { display: grid; grid-template-columns: 165px minmax(220px, 1fr) auto; gap: 8px 12px; margin: 0; align-items: end; }
#ow-document-issue erp-document-parties > [data-party-error] { grid-column: 1 / -1; margin: 0; font-size: 11.5px; color: #b45309; }
#ow-document-issue erp-document-parties > [data-party-error]:empty { display: none; }
#ow-document-issue erp-document-parties > label { display: grid; gap: 4px; font-size: 11.5px; color: #475569; min-width: 0; max-width: none; }
#ow-document-issue erp-document-parties > label input,
#ow-document-issue erp-document-parties > label select { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; height: 32px; }
#ow-document-issue erp-document-parties > [data-tax-mode] { grid-column: auto; margin: 0; padding: 6px 10px; border-radius: 6px; background: #f1f5f9; border: 1px solid #e2e8f0; font-size: 11.5px; font-weight: 600; color: #334155; height: 32px; display: inline-flex; align-items: center; white-space: nowrap; }
#ow-document-issue .erp-party-columns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 2px 0 0; }
#ow-document-issue .erp-party-columns section { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
#ow-document-issue .erp-party-columns h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: #1e293b; }
#ow-document-issue .erp-party-columns dl { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 4px 10px; margin: 4px 0 0; font-size: 12px; }
#ow-document-issue .erp-party-columns dt { color: #64748b; }
#ow-document-issue .erp-party-columns dd { color: #0f172a; font-weight: 500; font-variant-numeric: tabular-nums; }
#ow-document-issue .erp-party-columns label { min-width: 0; display: grid; gap: 4px; font-size: 11.5px; margin-bottom: 6px; }
#ow-document-issue .ow-waybill-section { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; overflow: hidden; margin: 0; }
#ow-document-issue .ow-waybill-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: #1e293b; background: #f8fafc; list-style: none; user-select: none; }
#ow-document-issue .ow-waybill-section > summary::-webkit-details-marker { display: none; }
#ow-document-issue .ow-waybill-section > summary small { font-weight: 500; font-size: 11px; color: #64748b; }
#ow-document-issue .ow-waybill-section > summary small.is-ok,
.ow-wb-pill.is-ok { color: #15803d; }
#ow-document-issue .ow-waybill-section > summary small.is-warn,
.ow-wb-pill.is-warn { color: #b45309; }
#ow-document-issue .ow-waybill-section[open] > summary { border-bottom: 1px solid #e2e8f0; }
.ow-wb-details-body { padding: 12px !important; }
#ow-document-issue .ow-waybill-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 0; border: 0; border-radius: 0; }
#ow-document-issue .ow-waybill-fields label,
#ow-document-issue .ow-waybill-fields .ow-wb-field { display: grid; gap: 4px; min-width: 0; font-size: 11.5px; color: #475569; align-content: start; }
#ow-document-issue .ow-waybill-fields input,
#ow-document-issue .ow-waybill-fields select { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; font-size: 12.5px; width: 100%; min-width: 0; height: 32px; }
.ow-wb-field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ow-wb-field-head > span { font-size: 11.5px; color: #475569; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-wb-inline-btn,
.ow-wb-mini-btn { padding: 2px 7px; border: 1px solid #cbd5e1; border-radius: 5px; background: #f8fafc; color: #334155; font-size: 11px; font-weight: 600; cursor: pointer; line-height: 1.3; white-space: nowrap; flex-shrink: 0; }
.ow-wb-inline-btn:hover,
.ow-wb-mini-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.ow-wb-combo { display: grid; gap: 4px; }
.ow-wb-manual-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ow-wb-manual-wrap[hidden] { display: none; }
.ow-wb-manual-wrap .ow-wb-manual-input { flex: 1 1 auto; min-width: 0; }
.ow-wb-combo .ow-wb-manual-input[hidden] { display: none; }
.ow-wb-workspace { display: grid; gap: 10px; max-width: none; width: 100%; }
.ow-wb-topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }
.ow-wb-topbar-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-width: 0; }
.ow-wb-topbar-main h1 { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; line-height: 1.25; }
.ow-wb-topbar-main p { margin: 2px 0 0; font-size: 11.5px; color: #64748b; }
.ow-wb-kind-switch { display: inline-flex; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; gap: 2px; }
.ow-wb-kind-btn { padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ow-wb-kind-btn:hover:not(:disabled) { color: #0f172a; background: #eef2f6; }
.ow-wb-kind-btn.is-active { background: #2563eb; color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.ow-wb-kind-btn:disabled { opacity: .45; cursor: not-allowed; }
.ow-wb-top-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 5px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 11.5px; color: #64748b; font-variant-numeric: tabular-nums; margin-left: auto; }
.ow-wb-top-summary strong { color: #0f172a; font-weight: 700; }
.ow-wb-top-summary .is-total strong { color: #1d4ed8; }
.ow-wb-top-summary .is-warn { color: #b45309; font-weight: 600; }
.ow-wb-existing-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 14px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; font-size: 12px; color: #92400e; }
.ow-wb-existing-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ow-wb-existing-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ow-wb-mini-link { padding: 4px 9px !important; font-size: 11.5px !important; text-decoration: none; }
.ow-wb-topbar-actions,
.ow-doc-viewer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ow-wb-page-form { display: grid !important; gap: 10px !important; max-height: none !important; background: transparent !important; padding: 0 !important; }
.ow-wb-section-card { background: #fff; border: 1px solid #dce2ea; border-radius: 12px; padding: 12px 16px; display: grid; gap: 10px; }
.ow-wb-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 7px; border-bottom: 1px solid #eef2f7; }
.ow-wb-section-head h2 { margin: 0; font-size: 14px; font-weight: 700; color: #0f172a; }
.ow-wb-section-head p { margin: 2px 0 0; font-size: 11.5px; color: #64748b; }
.ow-wb-doc-row { display: grid; grid-template-columns: 145px minmax(220px, 2fr) 125px 145px 120px; gap: 10px 12px; align-items: end; }
.ow-wb-doc-row.is-ttn { grid-template-columns: 145px minmax(240px, 2fr) 140px 160px; }
.ow-wb-missing-addr { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 12px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; }
.ow-wb-parties { padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.ow-wb-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ow-wb-subcard { display: grid; gap: 9px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.ow-wb-subcard h3 { margin: 0; font-size: 12px; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: .03em; }
.ow-wb-subrow-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.ow-wb-lines-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ow-wb-bulk-rates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11.5px; color: #475569; }
.ow-wb-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: 11.5px; font-weight: 600; }
.ow-wb-pill.is-ok { background: #ecfdf5; color: #15803d; border: 1px solid #bbf7d0; }
.ow-wb-pill.is-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ow-wb-workspace .ow-wb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ow-wb-workspace .ow-wb-foot { border: 1px solid #dce2ea; border-radius: 12px; background: #fff; padding: 10px 16px; }
.ow-wb-workspace .ow-wb-table-wrap { max-height: 440px; }
.ow-doc-workspace { display: grid; gap: 12px; max-width: none; width: 100%; }
.ow-doc-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; }
.ow-doc-viewer-bar .cw-button { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.ow-doc-viewer-body { border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; overflow: hidden; min-height: 760px; }
.ow-doc-pdf-frame { display: block; width: 100%; height: calc(100vh - 205px); min-height: 760px; border: 0; background: #fff; }
.ow-doc-viewer-state { padding: 36px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; color: #475569; font-size: 14px; }
.ow-wb-table-wrap { max-height: 260px; overflow: auto; }
.ow-wb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ow-wb-table th { position: sticky; top: 0; background: #f8fafc; color: #64748b; font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 7px 8px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.ow-wb-table td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.ow-wb-table th.ow-wb-num,
.ow-wb-table td.ow-wb-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ow-wb-table tfoot td { position: sticky; bottom: 0; background: #f8fafc; border-top: 1px solid #cbd5e1; border-bottom: 0; font-weight: 700; color: #0f172a; padding: 8px; }
.ow-wb-table td.ow-wb-col-idx { width: 32px; color: #64748b; text-align: center; }
.ow-wb-table td.ow-wb-col-title { min-width: 190px; }
.ow-wb-table td.ow-wb-col-title small { display: block; color: #64748b; font-size: 11px; font-weight: 400; }
.ow-wb-table td.ow-wb-col-sum { white-space: nowrap; font-variant-numeric: tabular-nums; color: #0f172a; }
.ow-wb-table input { width: 100%; min-width: 68px; padding: 4px 7px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 12px; }
.ow-wb-table input[readonly] { background: #f8fafc; color: #475569; }
.ow-wb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.ow-wb-foot-note { font-size: 11.5px; color: #64748b; }
.ow-wb-foot .ow-doc-preview-actions { display: flex; gap: 8px; margin-left: auto; }
.ow-doc-links-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 8px; }
.ow-doc-links-row a { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 5px; border: 1px solid #cbd5e1; background: #fff; color: #1d4ed8; text-decoration: none; font-size: 11.5px; font-weight: 500; }
.ow-doc-links-row a:hover { background: #eff6ff; border-color: #93c5fd; }
.ow-doc-links-row a[data-ow-document-pdf] { background: #eff6ff; border-color: #bfdbfe; font-weight: 600; }
.ow-issued-docs-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 14px; border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; color: #1e3a8a; font-size: 12.5px; }
.ow-issued-docs-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 320px; }
.ow-issued-docs-main > strong { font-size: 12.5px; font-weight: 700; color: #1e3a8a; }
.ow-issued-docs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ow-issued-doc-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #bfdbfe; border-radius: 6px; background: #fff; color: #0f172a; font-size: 12px; }
.ow-issued-doc-label { font-weight: 600; }
.ow-issued-doc-pdf, .ow-issued-doc-src { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; text-decoration: none; }
.ow-issued-doc-pdf { background: #2563eb; color: #fff; }
.ow-issued-doc-pdf:hover { background: #1d4ed8; }
.ow-issued-doc-src { border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; }
.ow-issued-doc-src:hover { background: #eef2ff; border-color: #93c5fd; }
.ow-issued-docs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-shrink: 0; }
.ow-issued-docs-tab-btn, .ow-issued-docs-fin-btn { padding: 5px 10px !important; font-size: 12px !important; white-space: nowrap; text-decoration: none; }
@media print { .ow-modal-backdrop, .ow-fv-toolbar, .ow-doc-viewer-bar, .ow-issued-docs-banner { display: none !important; } }
.ow-tasks-panel { display: grid; gap: 12px; }
.ow-task-create-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 125px 120px 140px 175px auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.ow-task-create-bar input,
.ow-task-create-bar select { height: 32px; padding: 4px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12px; min-width: 0; }
.ow-task-create-bar button { height: 32px; white-space: nowrap; }
.ow-send-form { padding: 16px 20px; display: grid; gap: 12px; overflow-y: auto; }
.ow-send-channels { display: grid; gap: 10px; }
.ow-send-box { padding: 11px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; display: grid; gap: 8px; }
.ow-send-box h4 { margin: 0; font-size: 12.5px; font-weight: 700; color: #1e293b; }
.ow-send-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ow-send-row input,
.ow-send-row select { flex: 1 1 220px; min-width: 0; height: 32px; padding: 4px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 12.5px; }
.ow-send-connectors { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: #475569; }
.ow-conn-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; font-size: 11px; }
.ow-conn-pill.is-on { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.fv-dialog > header > strong { order: 1; flex: 1 1 auto; min-width: 0; }
.fv-dialog > header > .ow-fv-toolbar { order: 2; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fv-dialog > header > button[aria-label="Закрыть просмотр"] { order: 3; }
.ow-fv-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px !important; border: 1px solid #cbd5e1 !important; border-radius: 6px !important; background: #fff !important; color: #1e293b !important; font-size: 12.5px !important; font-weight: 600 !important; text-decoration: none !important; cursor: pointer !important; line-height: 1.2 !important; }
.ow-fv-btn:disabled { opacity: .5; cursor: not-allowed !important; }
.ow-fv-btn:hover { background: #f1f5f9 !important; border-color: #94a3b8 !important; }
.ow-fv-btn.is-primary { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
.ow-fv-btn.is-primary:hover { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }
@media (max-width: 1120px) {
  .ow-wb-doc-row, .ow-wb-doc-row.is-ttn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ow-wb-span-basis { grid-column: 1 / -1; }
  .ow-wb-top-summary { margin-left: 0; }
}
@media (max-width: 900px) {
  .ow-wb-grid, .ow-wb-workspace .ow-wb-grid, #ow-document-issue .ow-waybill-fields, #ow-document-issue .erp-party-columns, #ow-document-issue erp-document-parties, .ow-wb-two-col, .ow-wb-subrow-2, .ow-wb-doc-row, .ow-wb-doc-row.is-ttn { grid-template-columns: 1fr; }
  #ow-document-issue erp-document-parties > [data-tax-mode] { justify-self: start; }
  .ow-task-create-bar { grid-template-columns: 1fr 1fr; }
  .ow-task-create-bar input[type="text"], .ow-task-create-bar button { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .ow-modal-backdrop { padding: 8px; }
  .ow-wb-head, .ow-wb-body, .ow-wb-foot, .ow-send-form { padding: 12px; }
  .ow-task-create-bar { grid-template-columns: 1fr; }
}
@media print { .ow-modal-backdrop, .ow-fv-toolbar, .ow-doc-viewer-bar { display: none !important; } }
