/* Densitate compactă pentru lucru zilnic pe desktop */
body{font-size:13px;line-height:1.32}
.app-shell{grid-template-columns:205px 1fr}
.sidebar{padding:16px 10px}
.brand{padding:0 0 18px}
.sidebar nav{gap:3px}.nav-item{padding:9px 8px;border-radius:7px;gap:9px;font-size:12px}.nav-item span{font-size:9px}
.sidebar-foot{padding:13px 7px 0}.sidebar-foot strong,.sidebar-foot small{font-size:10px}
.topbar{min-height:76px;padding:12px 22px}.topbar h1,.section-tools h2,.sheet-toolbar h2{font-size:20px}.eyebrow{font-size:9px}
.view{padding:17px 22px 32px}.primary,.secondary,.text-btn{padding:8px 11px;border-radius:7px;font-size:12px}
.global-search,.global-search span{font-size:9px}.global-search input,.table-search input{min-width:230px}
.notice{padding:9px 12px;margin-bottom:10px}.notice span{font-size:10px}.badge{padding:4px 8px;font-size:10px!important}
.kpi-grid{gap:9px;margin-bottom:9px}.kpi{padding:11px 13px}.kpi span{font-size:11px}.kpi strong{font-size:25px}.kpi small{font-size:10px}
.dashboard-grid{gap:9px}.panel{padding:14px}.panel-head{margin-bottom:10px}.panel h2{font-size:16px}
.order-row{grid-template-columns:62px 1.1fr 1.5fr 80px 100px;padding:8px 3px;font-size:12px}.order-row small,.task-list small{font-size:10px}.status{padding:3px 7px;font-size:10px}
.task-list button{padding:10px 0}.task-count{width:30px;height:30px;border-radius:7px}.flow-steps{padding:5px}.flow-steps i{width:28px;height:28px;font-size:11px}.flow-steps small{font-size:9px}
.section-tools,.sheet-toolbar{margin-bottom:10px}.segmented button{padding:6px 9px;font-size:11px}.order-filter-tools,.order-toolbar-right{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.order-toolbar-right{margin-left:auto;justify-content:flex-end}.client-filter{position:relative}.client-filter-button{height:31px;border:1px solid #c8d1dc;border-radius:7px;background:#fff;color:#3f4d61;padding:5px 9px;font-size:11px;font-weight:750;display:flex;align-items:center;gap:8px}.client-filter-button span{color:#718096}.client-filter-panel{display:none;position:absolute;z-index:20;top:calc(100% + 5px);left:0;width:260px;max-height:330px;overflow:auto;background:#fff;border:1px solid #cbd4df;border-radius:8px;box-shadow:0 12px 30px rgba(26,38,56,.18);padding:6px}.client-filter.open .client-filter-panel{display:block}.client-filter-panel label{display:flex;align-items:center;gap:7px;padding:6px 7px;border-radius:5px;font-size:11px;cursor:pointer}.client-filter-panel label:hover{background:#f1f4f8}.client-filter-panel input{width:14px;height:14px;margin:0;accent-color:var(--navy)}.client-filter-all{border-bottom:1px solid #e2e7ed;border-radius:0!important;font-weight:800}.client-filter-panel p{margin:8px;color:var(--muted);font-size:10px}.expand-all-button{height:31px;border:1px solid #c8d1dc;border-radius:7px;background:#fff;color:#3f4d61;padding:4px 9px;font-size:11px;font-weight:800;display:flex;align-items:center;gap:6px}.expand-all-button span{font-size:20px;line-height:1;color:#365b88}.expand-all-button.mixed span{color:#c08412}.expand-all-button:disabled{opacity:.5}
input,select{padding:7px 9px;border-radius:6px}th{font-size:10px;padding:8px 10px}td{font-size:11px;padding:8px 10px}.table-foot{padding:8px 11px;font-size:11px}
.form-grid{gap:11px}.form-grid label,.compact-form label{font-size:11px}.line-row{grid-template-columns:80px minmax(280px,1fr) 110px 150px 42px;padding:8px;gap:7px}
.prepress-board{gap:9px}.prep-column{padding:9px;min-height:360px}.prep-card{padding:10px;margin-bottom:7px}.prep-card small{font-size:10px}
.production-sheet{font-size:12px}.sheet-meta span{padding:6px 3px}.sheet-section{margin-top:18px}.sheet-metrics span{padding:8px;font-size:10px}.sheet-metrics strong{font-size:14px}.sheet-route{margin-top:20px}.sheet-route span{min-height:62px;font-size:10px}
@media(max-width:1050px){.app-shell{grid-template-columns:185px 1fr}}
@media(max-width:760px){body{font-size:14px}.app-shell{display:block}.sidebar{width:225px}.view{padding:15px}.topbar{padding:11px 14px}.topbar h1{font-size:19px}}

/* Poziții expandabile și evidența livrărilor */
.section-tools{flex-wrap:wrap}
.expand-order{border:0;background:transparent;color:var(--ink);display:inline-flex;align-items:center;gap:6px;padding:0;font-weight:800}
.expand-order span{display:grid;place-items:center;width:16px;height:16px;color:#42658f;font-size:14px}
.order-main.expanded td{background:#f6f8fb;border-bottom:0}.status.partial{background:#e9eefb;color:#35547e}.status.done{background:var(--green);color:#24643e}
.order-detail-row>td{padding:0 10px 10px;background:#f6f8fb}.expanded-lines{border:1px solid #cfd7e2;border-radius:7px;background:#fff;overflow:hidden;margin-left:20px}
.expanded-head,.expanded-line{display:grid;grid-template-columns:80px minmax(260px,1fr) 100px 115px 105px 90px;align-items:center;gap:10px;padding:7px 10px}
.expanded-head{background:#e9edf3;color:#606b7c;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.expanded-line{border-top:1px solid #e5e9ef;font-size:11px}.expanded-line>span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.expanded-line b{text-align:right}.expanded-line label{display:block}.delivered-input{height:28px;padding:3px 7px;text-align:right;font-size:11px}.remaining{color:#9a5d18}.remaining.zero{color:#257247}.line-delivery{justify-self:start;border-radius:999px;padding:3px 7px;font-size:9px;font-weight:800}.line-delivery.open{background:#eef1f5;color:#5f6979}.line-delivery.partial{background:var(--cream);color:#765715}.line-delivery.done{background:var(--green);color:#24643e}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){.expanded-head,.expanded-line{grid-template-columns:65px minmax(200px,1fr) 80px 95px 85px}.expanded-head span:last-child,.expanded-line .line-delivery{display:none}}

/* Registru principal: termen programat și istoric de livrare */
.scheduled-date{min-width:118px;height:27px;padding:2px 5px;font-size:10px;background:#fff}
.expanded-head,.expanded-line{grid-template-columns:60px minmax(205px,1fr) 118px 70px 70px 135px minmax(245px,1fr) 135px}
.expanded-head span:nth-child(3),.expanded-head span:nth-child(4),.expanded-head span:nth-child(5){text-align:center}
.ordered-qty,.remaining{text-align:center!important}
.line-requested-date{height:28px;padding:3px 5px;font-size:10px}.next-due{display:inline-block;white-space:nowrap;font-weight:800;color:#46566c;padding:4px 7px;border-radius:5px;border-left:3px solid transparent}.next-due.overdue{color:#b42318;background:#fff0ef;border-left-color:#b42318}.next-due.due-soon{color:#946200;background:#fff4cc;border-left-color:#d59a00}
.delivery-entry{display:grid;grid-template-columns:95px 30px;gap:5px;align-items:center}
.delivery-entry input{height:28px;padding:3px 6px;font-size:10px}.delivery-entry .delivery-qty{text-align:right}.delivery-entry button{height:28px;border:0;border-radius:5px;background:var(--navy);color:#fff;font-weight:900}.delivery-entry button:disabled{background:#b8c0cc;cursor:not-allowed}
.delivery-history{display:flex;flex-wrap:wrap;gap:4px}.delivery-record{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;background:#eef2f6;border-radius:5px;padding:3px 5px;font-size:9px;white-space:nowrap}.delivery-record>span:first-child{display:flex;flex-direction:column}.delivery-record small{color:#a43c33;font-weight:800}.delivery-record label{display:flex!important;align-items:center;gap:2px;padding-left:5px;border-left:1px solid #cbd3de;color:#8b3b32;font-weight:800;cursor:pointer}.delivery-record .return-toggle{width:12px;height:12px;margin:0;accent-color:#b42318}.return-editor{display:none!important;flex:1 0 100%;grid-template-columns:105px 80px 62px;gap:4px;padding-top:4px}.delivery-record.returning .return-editor{display:grid!important}.return-editor input{width:100%;height:25px;padding:2px 4px;font-size:9px}.return-editor button{height:25px;border:0;border-radius:4px;background:#8f352e;color:#fff;font-size:9px;font-weight:800}.cancellation-record{display:inline-flex;align-items:center;gap:3px;background:#e8f6ee;color:#257247;border-radius:5px;padding:5px 7px;font-size:9px;white-space:nowrap}.delivery-history em{font-size:9px;color:var(--muted)}
.pending-toggle{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:9px;font-weight:700;color:#536071;cursor:pointer}.pending-toggle input{width:14px;height:14px;margin:0;accent-color:var(--navy)}
.product-cell{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}.product-cell small{color:#58677a;font-size:9px;font-weight:700}.product-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;padding:4px 7px;border-radius:5px;border-left:3px solid transparent}.product-name.delivered{color:#1f7a49;background:#e8f6ee;border-left-color:#1f7a49}.product-name.overdue{color:#b42318;background:#fff0ef;border-left-color:#b42318;font-weight:800}.product-name.due-soon{color:#946200;background:#fff4cc;border-left-color:#d59a00;font-weight:800}
.position-close{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.position-close button{border:1px solid #b9c4d2;background:#fff;color:#40506a;border-radius:5px;padding:4px 6px;font-size:9px;font-weight:800}.close-choices{display:none;gap:3px}.position-close.choosing .close-choices{display:flex}.position-close.choosing .toggle-close{display:none}.position-close .danger{color:#a42b24;border-color:#e1aaa6}.closed-position{color:#257247;font-size:9px;font-weight:800}.reopen-position{color:#526273!important}
.all-delivered-message{padding:13px;text-align:center;color:#257247;background:#f0f8f3;font-size:11px;font-weight:700;border-top:1px solid #e5e9ef}
.print-work-button{height:31px;border:1px solid #27364e;border-radius:7px;background:#27364e;color:#fff;padding:4px 10px;font-size:11px;font-weight:800}.work-print-title{display:none}.work-groups{columns:470px;column-gap:10px}.work-groups>.work-client{display:inline-block;width:100%;vertical-align:top;break-inside:avoid;margin-bottom:10px}.work-client{background:#fff;border:1px solid #ccd5e0;border-radius:9px;overflow:hidden;box-shadow:0 3px 10px rgba(28,39,58,.05)}.work-client>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#27364e;color:#fff}.work-client h3{margin:0;font-size:13px}.work-client>header span{font-size:10px;color:#cbd4e1}.work-client-body{display:grid;gap:8px;padding:8px}.work-order{border:1px solid #cfd7e1;border-radius:6px;overflow:hidden}.work-order-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 9px;background:#f6f8fa;color:#34445b;font-size:10px}.work-order-title span{color:#6a7586;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-head,.work-line{display:grid;grid-template-columns:minmax(0,1fr) 75px 88px 70px;gap:6px;align-items:center;padding:6px 8px}.work-head{background:#e9edf3;color:#5e6a7c;font-size:9px;font-weight:800;text-transform:uppercase}.work-head span:nth-child(n+2){text-align:center}.work-line{border-top:1px solid #e4e8ee;font-size:10px}.work-line>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-line b{text-align:center}.work-status{text-align:center;font-weight:700;color:#3f526e;white-space:nowrap}.work-due{justify-self:center;padding:3px 6px;border-radius:5px;font-weight:800;white-space:nowrap}.work-due.overdue{color:#b42318;background:#fff0ef;border-left:3px solid #b42318}.work-due.due-soon{color:#946200;background:#fff4cc;border-left:3px solid #d59a00}.work-foot{margin-top:10px;color:#5f6b7c;font-size:11px}.work-empty{padding:24px;background:#fff;border:1px solid #d4dbe4;border-radius:9px;text-align:center;color:#657184}
@page{size:A3 landscape;margin:8mm}
@media print{body{background:#fff!important;color:#000;font-size:8pt}.sidebar,.topbar,.section-tools,#orders-panel,#toast,#dashboard,#orders,#new-order,#prepress,#job-sheet,#stock,.work-foot{display:none!important}.app-shell,main,#work.view,#work-panel{display:block!important;min-height:0!important}#work.view{padding:0!important}.work-print-title{display:flex;align-items:flex-end;justify-content:space-between;border-bottom:.35mm solid #222;margin-bottom:3mm;padding-bottom:1.5mm}.work-print-title h1{margin:0;font-size:13pt;letter-spacing:.04em}.work-print-title span{font-size:7pt;color:#444}.work-groups{display:block!important;column-width:auto!important;column-count:3;column-gap:4mm}.work-groups>.work-client{display:inline-block;width:100%;margin:0 0 4mm;border:0;border-radius:0;box-shadow:none;break-inside:auto;page-break-inside:auto}.work-client>header{break-after:avoid;padding:2mm 2.5mm;background:#dfe5ec!important;color:#000!important;border:.25mm solid #777;-webkit-print-color-adjust:exact;print-color-adjust:exact}.work-client h3{font-size:9pt}.work-client>header span{font-size:6.5pt;color:#333}.work-client-body{display:block;padding:0}.work-order{margin-top:2mm;border:.25mm solid #777;border-radius:0;break-inside:avoid;page-break-inside:avoid}.work-order-title{padding:1.4mm 1.8mm;background:#f3f5f7!important;font-size:7pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}.work-order-title span{font-size:6pt}.work-head,.work-line{grid-template-columns:minmax(0,1fr) 14mm 19mm 16mm;gap:1mm;padding:1.2mm 1.5mm}.work-head{background:#edf0f4!important;color:#333;font-size:6pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}.work-line{font-size:7pt}.work-line>span:first-child{white-space:normal;overflow:visible}.work-line b{text-align:center}.work-status{text-align:center;font-weight:700;color:#3f526e;white-space:nowrap}.work-due{justify-self:stretch;text-align:center;padding:.5mm .7mm;white-space:nowrap}.work-due.overdue,.work-due.due-soon{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media(max-width:1150px){.expanded-head,.expanded-line{grid-template-columns:55px minmax(185px,1fr) 110px 65px 65px 125px minmax(220px,1fr) 125px}.delivery-entry{grid-template-columns:90px 28px}}
@media(max-width:760px){.work-groups{columns:1}.work-client{overflow:auto}.work-head,.work-line{min-width:470px}}

.work-toolbar{flex-wrap:wrap}.work-toolbar-title{flex-basis:100%}.work-view-controls{margin-right:auto;justify-content:flex-start}.work-toolbar>.print-work-button{margin-left:auto}.work-stage-head{margin:8px 8px 0}.work-stage-empty{padding:8px 10px;color:#687386;font-size:11px}
@media print{.work-stage-head{margin:2mm 0 0}.work-stage-empty{padding:1.2mm 1.5mm;font-size:7pt}}

@media(max-width:760px){.work-view-controls{justify-content:flex-start}.work-toolbar>.print-work-button{margin-left:auto}}

.work-groups.by-status .work-client-body{display:block;padding:0 8px 8px}.work-client-code{text-align:left!important;color:#27364e}.work-code-separator{color:#8793a3}.work-stage-lines .work-line{border-left:1px solid #e4e8ee;border-right:1px solid #e4e8ee}.work-stage-lines .work-line:last-child{border-bottom:1px solid #e4e8ee;border-radius:0 0 5px 5px}
@media print{.work-groups.by-status .work-client-body{padding:0}.work-stage-lines .work-line{break-inside:avoid;page-break-inside:avoid}.work-client-code{color:#000}}

/* Trasee de producție și comenzi grupate pe etapă. */
.work-groups.by-status{columns:600px}
.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(0,1fr) 66px 88px minmax(100px,1fr) 135px;gap:6px}
.work-next{font-weight:700;color:#465a73;line-height:1.35;overflow-wrap:anywhere}
.work-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:3px}
.work-actions button,.work-actions select{height:25px;width:auto;max-width:100%;padding:2px 5px;border:1px solid #ccd4df;border-radius:5px;background:#fff;color:#34445b;font-size:10px;font-weight:700}
.work-actions .next-stage{background:#27364e;border-color:#27364e;color:#fff}
.work-actions .next-stage:disabled{opacity:.4}
.work-actions .change-stage{width:74px}
.work-actions .edit-work-route{font-size:9px}
.work-catalog{margin-top:2px}.catalog-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.catalog-toolbar h2{margin:0}.catalog-toolbar p{margin:3px 0 0;color:#667287;font-size:12px}.catalog-toolbar input{width:min(320px,100%)}
.catalog-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,1fr) auto;align-items:center;gap:12px;border-top:1px solid #e3e8ee;padding:9px 0;font-size:12px}.catalog-row small{display:block;color:#6f7b8b}.catalog-row>span:nth-child(2){color:#53627a}.catalog-row button{font-size:11px}
.route-dialog-body{padding:26px;min-width:min(480px,calc(100vw - 40px))}.route-dialog-body h2{margin:0}.route-dialog-body p{color:#53627a;font-size:13px}.route-stage-list{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:16px 0}.route-stage-list label{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid #dae1e9;border-radius:7px;font-size:13px}.route-stage-list input{width:16px;height:16px;margin:0}.route-actions{display:flex;justify-content:flex-end;gap:8px}.line-route-preview{display:block;color:#627087;font-size:11px;font-weight:500}
@media(max-width:760px){.work-groups.by-status{columns:1}.work-groups.by-status .work-head,.work-groups.by-status .work-line{min-width:600px}.catalog-toolbar{flex-direction:column;align-items:stretch}.catalog-row{grid-template-columns:1fr auto}.catalog-row>span:nth-child(2){grid-column:1/-1;grid-row:2}}
@media print{.work-groups.by-status{column-count:3}.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(0,1fr) 14mm 19mm 32mm;gap:1mm}.work-actions{display:none!important}.work-next{font-size:6.5pt;color:#000}.work-catalog{display:none!important}}

.catalog-import-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.catalog-import-tools a{text-decoration:none;font-size:11px;white-space:nowrap}.catalog-upload-label{cursor:pointer;font-size:11px;white-space:nowrap}.catalog-import-tools input[type="search"]{min-width:230px}.import-dialog-body{padding:25px;min-width:min(590px,calc(100vw - 40px))}.import-dialog-body h2{margin:0}.import-dialog-body p{font-size:13px;color:#53627a}#import-preview{max-height:260px;overflow:auto;margin:14px 0;border-top:1px solid #dae1e9}#import-preview>div{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #dae1e9;padding:8px 2px;font-size:11px}#import-preview span{color:#526781;text-align:right}.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(0,1fr) 66px 88px minmax(190px,1fr)}.work-followup{display:grid;gap:4px;min-width:0}.work-followup .work-actions{justify-content:flex-start}.work-followup .work-next{font-weight:700}
@media(max-width:760px){.catalog-import-tools{justify-content:flex-start}.catalog-import-tools input[type="search"]{width:100%}.work-groups.by-status .work-head,.work-groups.by-status .work-line{min-width:600px}}
@media print{.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(0,1fr) 14mm 19mm 36mm}.work-followup .work-actions{display:none!important}.work-groups.by-status .work-head span:last-child{display:block!important}}

/* Detaliile etapei și traseul complet în vederea Pe status. */
.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(180px,2fr) 75px 100px minmax(180px,1.35fr) minmax(190px,1.2fr);gap:12px}
.work-groups.by-status .work-head span:nth-child(4),.work-groups.by-status .work-head span:nth-child(5){text-align:left}
.work-detail{display:grid;gap:5px;min-width:0}
.work-stage-detail{width:100%;min-height:38px;resize:vertical;border:1px solid transparent;border-radius:5px;padding:5px 6px;background:transparent;color:#53627a;font:inherit;line-height:1.4}
.work-stage-detail:hover,.work-stage-detail:focus{border-color:#ccd4df;background:#fff;outline:none}
.work-stage-detail::placeholder{color:#94a0af}
.work-detail .work-actions{justify-content:flex-start}
.work-followup{color:#465a73;line-height:1.4;overflow-wrap:anywhere}
.work-groups.by-status{columns:790px}
@media(max-width:760px){.work-groups.by-status .work-head,.work-groups.by-status .work-line{min-width:790px}}
@media print{.work-groups.by-status .work-head,.work-groups.by-status .work-line{grid-template-columns:minmax(0,2fr) 14mm 19mm minmax(0,1.3fr) minmax(0,1.3fr);gap:1mm}.work-stage-detail{border:0;padding:0;min-height:0;resize:none;background:transparent;font-size:6.5pt}.work-stage-detail::placeholder{color:transparent}.work-followup{font-size:6.5pt}}
.route-stage-list label{display:grid;grid-template-columns:18px 1fr;align-items:start}
.route-stage-detail{grid-column:1/-1;width:100%;min-height:52px;resize:vertical;border:1px solid #dae1e9;border-radius:6px;padding:7px;font:inherit;color:#34445b}
.route-stage-list{max-height:min(60vh,550px);overflow:auto}
.work-detail{white-space:pre-wrap;color:#53627a}

/* Spațiul de pregătire a montajelor în DTP. */
.dtp-workspace{padding:14px;display:grid;gap:14px}
.dtp-hint{margin:0;color:#52627a;font-size:12px;line-height:1.5}
.dtp-workspace h4{margin:0 0 9px;font-size:12px;color:#27364e}
.dtp-montages,.dtp-selection{border:1px solid #dce3ec;border-radius:8px;padding:12px;background:#fbfcfe}
.dtp-montages{display:grid;gap:8px}
.dtp-montage{border:1px solid #d5deea;border-radius:7px;background:#fff;padding:10px}
.dtp-montage-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px}
.dtp-montage-title strong{color:#27364e;font-size:13px}
.dtp-montage-title span{margin-right:auto;color:#52627a}
.dtp-montage-title button,.dtp-form button{border:1px solid #cbd5e1;background:#fff;border-radius:6px;padding:6px 9px;color:#27364e;cursor:pointer;font-size:11px;font-weight:700}
.dtp-montage-title .dtp-delete{color:#a32925}
.dtp-members{display:grid;gap:4px;margin-top:8px;color:#52627a;font-size:11px}
.dtp-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:6px;max-height:370px;overflow:auto}
.dtp-position{display:flex;align-items:start;gap:8px;padding:8px;border:1px solid #e0e6ed;border-radius:6px;background:#fff;cursor:pointer;font-size:11px}
.dtp-position input{flex:none;margin-top:2px}
.dtp-position span{display:grid;gap:3px;min-width:0}
.dtp-position small{color:#6b7789;font-size:10px}
.dtp-form{display:flex;flex-wrap:wrap;gap:9px;align-items:end;border-top:1px solid #dae2eb;margin-top:13px;padding-top:13px}
.dtp-form label{display:grid;gap:4px;color:#52627a;font-size:10px;font-weight:700}
.dtp-form input{height:31px;border:1px solid #ccd5e0;border-radius:6px;padding:4px 8px;color:#27364e;font-size:12px}
.dtp-name{width:min(240px,75vw)}.dtp-run{width:125px}.dtp-waste{width:95px}
.dtp-total{font-size:11px;color:#27364e;padding:7px 2px}
.dtp-form button[type=submit]{background:#27364e;border-color:#27364e;color:#fff}
@media print{.dtp-hint,.dtp-selection,.dtp-montage-title button{display:none!important}.dtp-workspace{padding:1mm}.dtp-montages,.dtp-montage{padding:1mm;border-radius:0;break-inside:avoid}.dtp-members{font-size:7pt}}

/* DTP: aceeași listă pe rânduri ca în celelalte etape. */
.work-groups.by-status .dtp-workspace{display:block;padding:0 8px 10px}
.dtp-workspace>.work-stage-head{margin:8px 0 0}
.dtp-workspace>.work-stage-lines .work-line{border-left:1px solid #e4e8ee;border-right:1px solid #e4e8ee}
.dtp-product{display:flex;align-items:center;gap:7px;cursor:pointer;min-width:0}
.dtp-product input{flex:none;width:15px;height:15px;margin:0;accent-color:#27364e}
.dtp-product input:disabled{cursor:not-allowed}
.dtp-product span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dtp-selection{margin-top:13px}
.dtp-selected-preview{font-size:11px;color:#52627a;line-height:1.5}
.dtp-selected-preview>p{margin:0}
.dtp-preview-lines{display:grid;gap:2px;margin:7px 0}
.dtp-recipe{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:7px;border-top:1px solid #e0e6ed;padding-top:8px}
.dtp-recipe b{color:#27364e}
.dtp-montages{margin-top:13px}
.dtp-montage-recipe{margin-top:7px;color:#52627a;font-size:10px}
.route-die-holder{margin-top:14px}
.route-die-holder label{display:grid;gap:5px;color:#34445b;font-size:12px;font-weight:700}
.route-die-holder input{width:100%;border:1px solid #dae1e9;border-radius:6px;padding:7px;font:inherit}
@media print{.dtp-workspace>.work-stage-lines{display:none}.dtp-selection{display:none!important}.dtp-montages{border:0}}

.stage-completion{display:flex;flex-wrap:wrap;align-items:end;gap:6px;margin-top:10px}.stage-completion label{display:flex;flex-direction:column;gap:4px;font-size:12px}.stage-completion input{width:105px;max-width:100%;padding:6px;border:1px solid #cbd5e1;border-radius:5px;background:white}.stage-completion button{padding:7px 9px;border:0;border-radius:5px;background:#156b55;color:white;font-weight:700;cursor:pointer}.production-history{margin-top:7px;font-size:12px}.production-history summary{cursor:pointer}.production-history div{margin-top:4px}@media print{.stage-completion{display:none!important}}

.montage-material{margin-top:14px;padding-top:12px;border-top:1px solid #cbd5e1}.montage-material h4{margin:0 0 8px}.montage-material p{font-size:14px}.material-fields{display:grid;grid-template-columns:minmax(200px,2fr) minmax(120px,1fr) minmax(140px,1fr);gap:12px}.material-fields label,.material-allocations label>span:last-child{display:flex;flex-direction:column;gap:5px;font-size:14px}.material-fields input,.material-fields select,.dtp-pieces{min-width:0;width:100%;padding:8px;border:1px solid #bac6d3;border-radius:5px;background:white;color:#152536}.material-allocations{display:grid;gap:8px;margin-top:12px}.material-allocations label{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px;align-items:center;padding:8px;background:#f1f5f9;border-radius:5px}.dtp-material-total{font-weight:700;color:#156b55}.stock-history{font-size:14px;white-space:normal}.stock-history div{padding:5px 0}.stage-completion small{display:block;flex-basis:100%;font-size:12px}.work-line>span>small{display:block;margin-top:5px}@media(max-width:700px){.material-fields{grid-template-columns:1fr}.material-allocations label{grid-template-columns:1fr}.material-allocations input{max-width:180px}}@media print{.montage-material{display:none!important}}

.work-groups.by-status .work-ready .work-head,.work-groups.by-status .work-ready .work-line{grid-template-columns:minmax(0,2fr) 100px 95px minmax(0,1.4fr)}
.work-ready .ready-production{margin-top:0;white-space:normal;min-width:0}
@media print{.work-groups.by-status .work-ready .work-head,.work-groups.by-status .work-ready .work-line{grid-template-columns:minmax(0,2fr) 18mm 19mm minmax(0,1.4fr)}}

@media screen{
  .work-groups:not(.by-status) .work-client-body,.work-groups:not(.by-status) .work-order{min-width:0}
  .work-groups:not(.by-status) .work-head,.work-groups:not(.by-status) .work-line{min-width:0;grid-template-columns:minmax(0,1fr) 52px 72px 55px;gap:3px;padding:6px}
  .work-groups:not(.by-status) .work-line>span:first-child{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .work-groups:not(.by-status) .work-due{padding:3px}
  .work-groups:not(.by-status) .work-status{white-space:normal;line-height:1.3}
}

.work-groups.by-status .work-operation .work-head,.work-groups.by-status .work-operation .work-line{grid-template-columns:minmax(120px,2fr) 70px 82px minmax(100px,1.3fr) 210px 48px;gap:6px;min-width:700px;align-items:center}
.work-operation .work-line>.work-detail{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.work-operation .stage-info{margin:0;min-width:0}
.work-operation .stage-info[open]{grid-column:1/-1}
.work-operation .stage-info[open]>summary{text-align:right}
.work-operation .stage-info-body{padding:10px;background:#f6f8fa;border:1px solid #e0e6ed;border-radius:5px;white-space:normal;line-height:1.5}
@media print{.work-groups.by-status .work-operation .work-head,.work-groups.by-status .work-operation .work-line{grid-template-columns:minmax(0,2fr) 14mm 19mm minmax(0,1.3fr) 0 10mm;gap:1mm;min-width:0}}

.work-operation .work-line>.stage-completion{margin:0;gap:5px}
.work-operation .work-line>.stage-completion label{font-size:10px;max-width:125px}
.work-operation .work-line>.stage-completion input{width:100px;padding:5px}
.work-operation .work-line>.stage-completion button{font-size:10px;padding:7px}
.work-operation .work-line>.stage-completion small{font-size:10px}
@media screen{.work-operation{overflow-x:auto}}
@media print{.work-operation .work-head>span:nth-child(5){visibility:hidden}.work-operation .work-line>.stage-completion{display:block!important;visibility:hidden;width:0;height:0;overflow:hidden}}

.dtp-partial{display:inline-block;padding:1px 5px;margin-left:4px;border-radius:4px;background:#fff0cf;color:#865400;font-size:11px;line-height:1.4}

.stage-actions{display:inline-flex;gap:5px;align-items:center;flex-shrink:0}
.work-operation .work-line>.stage-completion .stage-actions button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid;border-radius:4px;font-size:20px;line-height:1;cursor:pointer}
.work-operation .work-line>.stage-completion .stage-done{color:#187346;background:#e4f4e9;border-color:#a1d2b3}
.work-operation .work-line>.stage-completion .stage-back{color:#a63232;background:#fff0f0;border-color:#e3b1b1}
.stage-actions button:hover{filter:brightness(.94)}
.stage-actions button:focus-visible{outline:2px solid #245a98;outline-offset:2px}

.stage-return-dialog{max-width:480px;width:calc(100% - 32px)}.stage-return-message{line-height:1.5}.stage-return-dialog::backdrop{background:rgba(15,23,42,.45)}

.register-toolbar{gap:12px;flex-wrap:wrap}.hide-closed{display:flex;align-items:center;gap:6px;font-size:12px;color:#526176;cursor:pointer;white-space:nowrap}.hide-closed input{accent-color:var(--navy);margin:0}.order-file-actions{display:flex;gap:5px}.order-icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #c8d1dc;border-radius:6px;background:#fff;color:#3f4d61;cursor:pointer}.order-icon-button:hover{background:#edf2f7}.order-icon-button:focus-visible{outline:2px solid #245a98;outline-offset:2px}.register-toolbar .table-search input{width:260px;max-width:100%}@media(max-width:700px){.register-toolbar .order-toolbar-right{width:100%;margin-left:0;flex-wrap:nowrap}.register-toolbar .table-search{flex:1;min-width:0}.register-toolbar .table-search input{width:100%}}

.user-settings-grid{display:grid;grid-template-columns:minmax(260px,.82fr) minmax(420px,1.18fr);gap:14px;align-items:start}.user-setup-notice{margin-top:-2px}.user-accounts-panel,.user-permissions-panel{min-width:0}.user-access-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#e7f3eb;color:#256341;font-size:11px;font-weight:750;white-space:nowrap}.user-account-description{margin:0 0 16px;color:#657286;font-size:12px;line-height:1.5}.user-empty-state{display:grid;gap:3px;margin:0 0 14px;padding:14px;border:1px dashed #cbd4df;border-radius:8px;background:#f8fafc}.user-empty-state strong{font-size:12px}.user-empty-state span{font-size:11px;color:#687386}.user-accounts-panel>.secondary:disabled{opacity:.52;cursor:not-allowed}.permission-table th,.permission-table td{padding:8px 10px}.permission-table th:not(:first-child),.permission-table td:not(:first-child){width:92px;text-align:center}.permission-table input[type=checkbox]{width:15px;height:15px;margin:0;accent-color:#315f96;vertical-align:middle}.user-section-title{align-items:center}@media(max-width:900px){.user-settings-grid{grid-template-columns:1fr}}

/* Print specifications stay readable at every viewport width. */
.work-operation .work-line>.work-detail.work-print-detail{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.45}
.work-print-detail>span{display:block;white-space:normal;overflow-wrap:anywhere}
.work-line>span.work-product-cell{display:flex;align-items:center;gap:6px;min-width:0;white-space:normal;overflow:hidden;text-overflow:clip}.work-product-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-partial-badge{display:inline-flex;flex:0 0 auto;align-items:center;border:1px solid #ead18b;border-radius:999px;background:#fff4cc;color:#765715;padding:2px 6px;font-size:9px;font-weight:800;line-height:1.2;white-space:nowrap}
