:root{--nav:#121d32;--primary:#5356d9;--primary-dark:#3e40b5;--bg:#f5f6fa;--ink:#202a40;--muted:#768097;--border:#e6e9f1;--green:#188868;--amber:#b47b1d;--red:#c34854;--shadow:0 4px 20px #17234205}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 'Segoe UI',system-ui,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit;text-decoration:none}aside{width:238px;position:fixed;inset:0 auto 0 0;background:var(--nav);color:#a4afc3;display:flex;flex-direction:column;z-index:25}.brand{height:100px;display:flex;align-items:center;gap:12px;padding:24px;color:#fff;font-size:23px;font-weight:700;letter-spacing:-.8px}.brand-mark{background:linear-gradient(135deg,#7776f5,#4d51cf);border-radius:12px;padding:3px 11px;font-size:27px}.brand-pro{color:#a6a5ff}.brand small{display:block;font-size:9px;letter-spacing:2px;font-weight:500;color:#8593ae;margin-top:2px}nav{padding:10px 14px;overflow:auto}nav .group{font-size:10px;letter-spacing:1.8px;font-weight:600;padding:20px 14px 9px;color:#687792}nav a{display:flex;align-items:center;gap:12px;padding:11px 14px;margin:3px 0;border-radius:8px;font-size:13px}nav a:hover{background:#ffffff08;color:#fff}nav a.active{background:#5356d9;color:white;box-shadow:0 4px 12px #0002}.nav-icon{width:19px;text-align:center;font-size:16px}.sidebar-foot{margin-top:auto;padding:22px;font-size:11px;border-top:1px solid #ffffff0d}.sidebar-foot small{display:block;font-size:10px;color:#697993;margin-top:8px}.online-dot{display:inline-block;width:6px;height:6px;background:#65c9a5;border-radius:100%;margin-right:6px}.workspace{margin-left:238px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:70px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;padding:0 32px}.topbar #breadcrumb{font-size:12px;color:var(--muted)}.top-actions{margin-left:auto;display:flex;align-items:center;gap:16px}#save-state{font-size:11px;color:var(--muted)}.avatar{background:#eeedff;color:var(--primary);font-weight:700;border-radius:50%;padding:9px;font-size:10px}.icon-btn{border:0;background:none;color:var(--muted);font-size:19px}main{padding:30px 32px;max-width:1700px;width:100%;margin:auto;flex:1}.eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:1.6px;color:var(--primary);font-weight:700;margin-bottom:5px}h1{font-size:27px;letter-spacing:-.8px;margin:0;font-weight:650}h2{font-size:16px;margin:0 0 6px;letter-spacing:-.2px}h3{font-size:14px;margin:0 0 10px}p{margin:6px 0 14px}.subtle,.muted{color:var(--muted);font-size:12px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}.page-head p{margin:6px 0 0}.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.btn{border:1px solid var(--border);border-radius:7px;padding:8px 14px;background:#fff;color:var(--ink);font-size:12px;font-weight:600;white-space:nowrap}.btn:hover{background:#f5f5fd;border-color:#c9c9ee}.btn.primary{background:var(--primary);border-color:var(--primary);color:white}.btn.primary:hover{background:var(--primary-dark)}.btn.danger{color:var(--red)}.btn.green{color:var(--green);background:#eef9f3}.btn.small{padding:5px 9px;font-size:11px}.notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#eeedfd;border:1px solid #e0dffa;border-radius:9px;margin-bottom:22px;font-size:12px;color:#58539a}.notice.warn{background:#fff6e8;border-color:#f4dfb7;color:#95671b}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.stat{background:#fff;padding:20px;border:1px solid var(--border);border-radius:11px;box-shadow:var(--shadow)}.stat-label{font-size:11px;color:var(--muted);display:flex;justify-content:space-between}.stat-value{font-size:25px;letter-spacing:-.8px;font-weight:650;margin:10px 0 5px;font-variant-numeric:tabular-nums}.stat small{font-size:10px;color:var(--muted)}.stat-symbol{background:#f0efff;color:var(--primary);padding:3px 7px;border-radius:6px}.stat:nth-child(2) .stat-symbol{background:#eaf7f0;color:var(--green)}.stat:nth-child(3) .stat-symbol{background:#fff5e6;color:var(--amber)}.panel{background:white;border:1px solid var(--border);border-radius:11px;padding:22px;margin-bottom:20px;box-shadow:var(--shadow);min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:12px}.two-col{display:grid;grid-template-columns:1.1fr 1fr;gap:20px}.panel .table-wrap{margin:0 -22px -22px;border-radius:0 0 10px 10px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}th{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);background:#fafbfe;text-align:left;padding:13px 16px;border-bottom:1px solid var(--border);font-weight:600}td{padding:14px 16px;border-bottom:1px solid #edf0f6}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafaff}td small{display:block;color:var(--muted);font-size:10px}.numeric{text-align:right;font-variant-numeric:tabular-nums}.badge{font-size:10px;font-weight:600;padding:4px 8px;border-radius:5px;display:inline-block;background:#f0efff;color:var(--primary)}.badge.green{background:#eaf7f0;color:var(--green)}.badge.amber{background:#fff4df;color:var(--amber)}.badge.red{background:#ffeff1;color:var(--red)}.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:20px}.filters label{min-width:135px;flex:1}.filters label.search{min-width:220px;flex:2}label{display:block;font-size:11px;color:#657087;font-weight:600}input,select,textarea{width:100%;padding:9px 11px;border:1px solid #dce1ec;border-radius:6px;background:white;color:var(--ink);margin-top:5px;font-size:12px;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid #d9d7ff;border-color:var(--primary)}input[readonly]{background:#f3f4fa;color:var(--muted)}textarea{resize:vertical;min-height:66px}.field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.field-grid .wide{grid-column:1/-1}.chart-row{margin:18px 0}.chart-row .labels{display:flex;justify-content:space-between;gap:12px;font-size:11px;margin-bottom:7px}.track{height:8px;background:#f0f1f8;border-radius:10px;overflow:hidden}.fill{height:100%;background:#6966dd;border-radius:10px;max-width:100%}.fill.amber{background:#e6b257}.fill.green{background:#49ad90}.legend{font-size:10px;color:var(--muted);margin-top:16px}.empty{text-align:center;padding:35px;color:var(--muted);white-space:normal}.tabs{display:flex;gap:6px;margin-bottom:20px;flex-wrap:wrap}.tabs .btn.active{background:var(--primary);color:white;border-color:var(--primary)}.mini-total{display:flex;gap:30px;padding:14px 18px;background:#f6f6fc;border-radius:8px;margin:15px 0;flex-wrap:wrap}.mini-total span{font-size:11px;color:var(--muted)}.mini-total strong{display:block;font-size:17px;color:var(--ink);font-weight:650}.collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.collection-grid .panel{margin:0}.collection-grid .track{margin:9px 0}.info-row{display:flex;justify-content:space-between;font-size:11px;margin:14px 0 7px}.grade th,.grade td{text-align:center;padding:8px;border:1px solid var(--border)}.grade th{position:sticky;top:0}.grade input{width:63px;padding:6px;margin:0;text-align:center}.grade .target{background:#efeffb;font-weight:700}.grade .color-cell{font-weight:600;text-align:left}.chips{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 15px}.chip{background:#f9fafe;border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:12px;color:var(--ink);cursor:pointer}.chip:has(input:checked){background:#eeedff;border-color:var(--primary);color:var(--primary)}.chip input{width:auto;margin:0 4px 0 0}.cart-item{padding:13px;background:#f8f9fd;border:1px solid var(--border);border-radius:8px;margin:8px 0;display:flex;align-items:center;justify-content:space-between;gap:12px}.steps{display:flex;gap:12px;margin-bottom:24px}.step{flex:1;font-size:11px;color:var(--muted);padding:9px 0;border-bottom:2px solid var(--border)}.step.active{color:var(--primary);border-color:var(--primary);font-weight:700}dialog{width:min(1120px,95vw);max-height:92vh;border:0;border-radius:13px;padding:0;color:var(--ink);box-shadow:0 20px 90px #101a3a30}dialog::backdrop{background:#15203980;backdrop-filter:blur(3px)}.modal-head{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:white;z-index:2}.modal-head h2{margin:0}.modal-body{padding:24px}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:17px 24px;border-top:1px solid var(--border);background:#fafbfe;position:sticky;bottom:0}.modal-body .panel{box-shadow:none}.details-row td{background:#f6f7fc}.order-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.order-meta span{display:block;color:var(--muted);font-size:10px}.order-meta strong{font-size:12px}.store-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.store-card{padding:14px;border:1px solid var(--border);border-radius:7px;font-size:11px}.store-card strong{display:block;margin-bottom:6px}#toast{position:fixed;right:26px;bottom:25px;z-index:1000;background:#25314b;color:white;box-shadow:0 8px 30px #0002;padding:13px 20px;border-radius:9px;max-width:470px;display:none;font-size:12px}#toast.error{background:#973c48}#toast button{margin-left:14px;background:transparent;border:0;color:white;text-decoration:underline}footer{padding:12px 32px 20px;font-size:10px;color:#9ba4b7;display:flex;justify-content:space-between}#print-area{display:none}.error-box{padding:14px;background:#ffeff1;color:#a63746;border-radius:8px;margin-bottom:15px}.backup-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.inline-actions{margin-top:20px}.item-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0}.summary-table{margin:20px 0}.help{font-size:11px;color:var(--muted);margin:10px 0}.progress-label{font-size:10px;color:var(--muted)}
.cut-ratio-fields{display:grid;grid-template-columns:repeat(6,minmax(55px,1fr));gap:10px}.cut-grade th small{display:block;text-transform:none;letter-spacing:0;font-size:9px}.cut-grade input[type=text],.cut-grade input:not([type]){width:130px}.cut-grade td:first-child input{width:110px}.cut-grade select{min-width:80px}.cut-grade td small{white-space:normal;min-width:100px}.cut-grade [name=cycles]{display:block;width:100px;margin-bottom:5px}
.sheet-toolbar{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#64748b;margin-bottom:12px}.cut-sheet{border:2px solid #111;background:#fff;color:#111}.cut-sheet table{margin:0;border-collapse:collapse;white-space:normal;font-family:Arial,sans-serif}.cut-sheet-head{table-layout:fixed}.cut-sheet th,.cut-sheet td{border:1px solid #333;border-radius:0;padding:3px 4px;color:#111;font-size:11px;letter-spacing:0;vertical-align:middle}.cut-sheet th{font-weight:700;background:white;line-height:1.15}.cut-sheet .sheet-title{font-size:13px;text-align:center;padding:7px;background:#fff}.cut-sheet-head td{background:#bed8ed}.cut-sheet .sheet-yellow{background:#ffff63}.cut-sheet-head input,.cut-sheet-head select,.cut-sheet-head textarea,.sheet-ratio-strip input,.sheet-yield input,.sheet-yield select{border:0!important;border-radius:0;margin:0;padding:4px;box-shadow:none;width:100%;min-width:0;background:transparent;color:#111;font:12px Arial,sans-serif}.cut-sheet input:focus,.cut-sheet select:focus,.cut-sheet textarea:focus{outline:2px solid #2d9761!important;outline-offset:-2px;background:#f4fff4}.cut-sheet .sheet-observations{color:#d00000;font-size:10px}.sheet-notes{height:60px;white-space:pre-wrap}.cut-sheet-head textarea{min-height:58px;resize:vertical;display:block}.sheet-ratio-strip{display:grid;grid-template-columns:1fr 3fr 1.5fr;align-items:stretch;border-top:2px solid #111;font:11px Arial,sans-serif}.sheet-width,.sheet-paired{padding:6px;border-right:1px solid #222;display:flex;flex-direction:column;gap:5px;text-align:center}.sheet-ratio{display:grid;grid-template-columns:95px 1fr;text-align:center;align-items:center;border-right:2px solid #111}.sheet-ratio table{table-layout:fixed;height:100%}.sheet-ratio td{background:#bed8ed;text-align:center}.sheet-ratio th{text-align:center}.sheet-width input,.sheet-paired input{background:#bed8ed}.sheet-yield{table-layout:auto;min-width:1150px}.sheet-yield .sheet-section-title{text-align:left;background:#fff;padding:5px;color:#111}.sheet-yield .sheet-expected-title{border-left:3px solid #111;background:#fff9de;text-align:center}.sheet-expected-title small{display:block;text-transform:none;font-size:9px}.sheet-yield th,.sheet-yield td{text-align:center;font-size:10px;padding:2px;border:1px solid #333}.sheet-yield td:nth-last-child(6),.sheet-yield th:nth-last-child(6){border-left:3px solid #111}.sheet-yield .sheet-expected{min-width:32px;background:#fffcef;color:#888}.sheet-yield input[type=number]{width:44px;font-size:12px;padding:6px 2px}.sheet-yield input[type=text]{width:90px!important;text-align:left}.sheet-yield [name=fabric]{width:125px!important}.sheet-yield [name=printed]{font-size:11px;min-width:55px}.sheet-yield [data-row-state]{font-size:8px;min-width:66px;max-width:84px}.sheet-yield th small{font-size:8px;font-weight:400;min-width:35px}.sheet-yield tbody tr:hover{background:#f9fcff}.sheet-yield tfoot th{border-top:2px solid #111;background:#fff;font-size:11px;height:28px}.sheet-tools{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:14px 0}.sheet-tools label{max-width:300px}.sheet-fabric-description{text-align:left!important;min-width:150px}.sheet-blank{height:23px}.printed-cut .sheet-yield{min-width:1050px}dialog:has(.cut-sheet-form),dialog:has(.printed-cut){width:min(1520px,98vw)}
@media(max-width:650px){.sheet-toolbar{flex-direction:column}.cut-sheet-head th{font-size:9px}.cut-sheet-head input,.cut-sheet-head select{font-size:10px}.sheet-ratio-strip{grid-template-columns:80px 1fr}.sheet-paired{grid-column:1/-1;border-top:1px solid #111}.sheet-ratio{grid-template-columns:70px 1fr}.cut-sheet-form .cut-sheet-head{min-width:660px}.cut-sheet-form .cut-sheet{overflow:auto}}
@media print{.no-print,.sheet-toolbar,.sheet-tools{display:none!important}.cut-sheet{border:1.5px solid black;-webkit-print-color-adjust:exact;print-color-adjust:exact}.printed-cut .sheet-yield,.sheet-yield{min-width:0;width:100%;table-layout:fixed}.cut-sheet th,.cut-sheet td{font-size:8px;padding:2px}.cut-sheet .sheet-title{font-size:12px}.sheet-yield .sheet-expected{min-width:0}.sheet-fabric-description{min-width:0;font-size:8px}.cut-sheet-head td{background:#bed8ed!important}.cut-sheet .sheet-yellow{background:#ffff63!important}.sheet-blank{height:18px}.sheet-notes{height:45px}.sheet-ratio-strip{font-size:9px}.cut-sheet table{break-inside:auto}}
@media(min-width:1000px){#menu-toggle{display:none}}
@media(max-width:1150px){.stats{grid-template-columns:repeat(2,1fr)}.collection-grid{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.field-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:999px){aside{transform:translateX(-100%);transition:transform .2s}.menu-open aside{transform:translateX(0);box-shadow:0 0 0 100vmax #15203966}.workspace{margin-left:0}.topbar{padding:0 18px}main{padding:22px 18px}.page-head{align-items:flex-start}h1{font-size:24px}#save-state{display:none}}
@media(max-width:600px){.stats{gap:9px}.stat{padding:14px}.stat-value{font-size:21px}.collection-grid,.backup-grid,.field-grid,.store-grid{grid-template-columns:1fr}.page-head{flex-direction:column}.panel{padding:16px}.panel .table-wrap{margin:0 -16px -16px}.order-meta{grid-template-columns:repeat(2,1fr)}.modal-body{padding:16px}.top-actions{gap:8px}.cart-item{flex-direction:column;align-items:flex-start}.filters label{min-width:120px}.modal-foot{padding:14px}.notice{align-items:flex-start;flex-direction:column}}
@media print{@page{size:A4 landscape;margin:10mm}body{background:white;font-size:10px}body>aside,body>.workspace,dialog,#toast{display:none!important}#print-area{display:block}#print-area h1{font-size:20px}#print-area .actions{display:none}table{font-size:9px;white-space:normal}th,td,.grade td,.grade th{padding:5px;font-size:9px}.panel{box-shadow:none;border-radius:0;break-inside:avoid}thead{display:table-header-group}.table-wrap{overflow:visible}.order-meta{grid-template-columns:repeat(4,1fr)}.store-grid{grid-template-columns:repeat(3,1fr)}.mini-total{background:#eee!important}}
.workshop-picker{display:flex;gap:4px;align-items:center}.workshop-picker select{min-width:0;flex:1}.workshop-picker button{flex:none;font-size:20px;padding:2px 9px}
.roll-sheet table{white-space:nowrap}.roll-sheet th{background:#bed8ed;color:#16334a;border:1px solid #8ca9bf}.roll-sheet td{border:1px solid #d3dde6}.roll-cut-options{display:flex;flex-wrap:wrap;gap:16px;margin:12px 0}.roll-cut-options label{display:flex;align-items:center;gap:8px}.roll-cut-options input{width:auto}dialog:has(#roll-import-text){width:min(1450px,98vw)}#roll-import-text{width:100%;font-family:monospace}
.roll-sheet td,.roll-sheet th{padding:8px 10px}.roll-sheet .actions{flex-wrap:nowrap;min-width:max-content}.roll-sheet .btn{white-space:nowrap}.roll-sheet table{font-size:12px}
.history-mode{display:flex;align-items:center;gap:8px;margin:14px 0}.history-mode input{width:auto}
.cut-roll-picker{display:flex;flex-wrap:wrap;align-items:end;gap:10px;width:100%}.cut-roll-picker label{flex:1;min-width:170px}.cut-roll-picker label:has(select){flex:2;min-width:260px}.cut-roll-picker select{width:100%;max-width:100%}.cut-roll-picker .help{width:100%;margin:0}

/* Larguras por coluna física: os títulos agrupados não definem a grade. */
@media print {
 #print-area .printed-cut{width:100%;max-width:100%;margin:0;}
 #print-area .printed-cut .sheet-yield{table-layout:fixed;width:100%;min-width:0;}
 #print-area .printed-cut .sheet-yield th,#print-area .printed-cut .sheet-yield td{width:auto;min-width:0;position:static;padding:1.2mm .7mm;font:7pt/1.15 Arial,sans-serif;overflow-wrap:break-word;}
 #print-area .printed-cut .sheet-yield th{font-weight:bold;}
 #print-area .printed-cut .sheet-yield th small{min-width:0;font-size:6pt;}
 #print-area .printed-cut .sheet-fabric-description{text-align:left;word-break:normal;}
 #print-area .printed-cut .sheet-yield tr{break-inside:avoid;page-break-inside:avoid;}
 #print-area .printed-cut .sheet-yield thead{display:table-header-group;}
 #print-area .printed-cut .sheet-yield tfoot{display:table-row-group;}
 #print-area .printed-cut .sheet-yield .sheet-blank{height:5mm;}
 #print-area .printed-cut .sheet-yield tfoot th{height:6mm;}
 #print-area .printed-cut .cut-sheet-head{break-inside:avoid;}
 #print-area .printed-cut .sheet-ratio-strip{grid-template-columns:1fr 3fr 1.5fr;break-inside:avoid;}
 #print-area .printed-cut .sheet-paired{grid-column:auto;}
 #print-area .printed-cut .table-wrap{overflow:visible;}
}

.roll-photo-preview{display:block;max-width:240px;max-height:180px;object-fit:contain;margin:12px 0}.cut-print-photos{margin-top:18px;color:#111}.cut-print-photos h3{font:700 12px Arial,sans-serif}.cut-photo-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.cut-photo-grid figure{margin:0;border:1px solid #888;padding:6px;break-inside:avoid}.cut-photo-grid img{width:100%;height:125px;object-fit:contain;display:block}.cut-photo-grid figcaption{text-align:center;font:11px/1.3 Arial,sans-serif;margin-top:5px}.cut-photo-grid figcaption span{display:block}.cut-photo-grid strong{display:block}@media(max-width:650px){.cut-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media print{#print-area .cut-print-photos{margin-top:4mm}#print-area .cut-print-photos h3{font-size:9pt;break-after:avoid}#print-area .cut-photo-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3mm}#print-area .cut-photo-grid figure{padding:1.5mm;break-inside:avoid;page-break-inside:avoid}#print-area .cut-photo-grid img{height:29mm;max-width:100%;object-fit:contain}#print-area .cut-photo-grid figcaption{font-size:7pt;overflow-wrap:anywhere}}

.roll-check{width:17px;height:17px;margin:0;vertical-align:middle;cursor:pointer}.roll-check:disabled{cursor:not-allowed}.roll-bulk-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0;padding:14px;background:#eeedfd;border-radius:8px}.roll-bulk-bar small{width:100%;color:#657087}

.collection-name-list button{display:flex;justify-content:space-between;align-items:center;width:100%;border:0;border-bottom:1px solid #e3e6ee;padding:22px 16px;background:white;text-align:left;font-size:20px;color:#28365c}.collection-name-list button:hover{background:#eeedfd}.collection-controls{margin-bottom:20px}.collection-page{background:#fff;padding:24px;margin:18px 0;border:1px solid #dae0ec;box-shadow:0 3px 15px #13244008}.collection-report-head{display:flex;justify-content:space-between;align-items:start;border-bottom:2px solid #5356d9;padding-bottom:12px;margin-bottom:18px}.collection-report-head h1{font-size:26px}.collection-report-head small{color:#5356d9}.collection-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}.collection-kpis article{padding:14px;background:#f2f3fb;border-radius:8px}.collection-kpis span,.collection-kpis small{display:block;font-size:11px}.collection-kpis strong{display:block;font-size:22px;margin:8px 0}.collection-notes{font-size:12px;margin-top:24px}.collection-calendar{table-layout:fixed;white-space:normal}.collection-calendar th:first-child{width:24%}.collection-calendar th,.collection-calendar td{padding:8px;border:1px solid #d3dbea;vertical-align:top;letter-spacing:0}.collection-calendar th{background:#e8ebfa;color:#26365a;text-transform:none}.collection-calendar span,.collection-calendar strong,.collection-calendar small{display:block;font-size:11px}.collection-calendar .over-target{background:#fff1de}.monthly-target-row select{min-width:160px}.monthly-target-row td:nth-child(2) select{min-width:260px}.monthly-target-row input{min-width:105px}dialog:has(#monthly-form){width:min(1450px,98vw)}@media print{#print-area .collection-page{box-shadow:none;border:0;margin:0;padding:0;break-before:page;page-break-before:always}#print-area .collection-page:first-child{break-before:auto;page-break-before:auto}#print-area .collection-report-head{margin-bottom:3mm;padding-bottom:3mm}#print-area .collection-report-head h1{font-size:20pt}#print-area .collection-kpis{gap:3mm;margin:4mm 0}#print-area .collection-kpis article{padding:3mm;print-color-adjust:exact}#print-area .collection-kpis strong{font-size:15pt}#print-area .collection-notes{font-size:9pt;margin-top:5mm}#print-area .collection-calendar{width:100%;min-width:0}#print-area .collection-calendar th,#print-area .collection-calendar td{font-size:8pt;padding:2mm;position:static;print-color-adjust:exact}#print-area .collection-calendar span,#print-area .collection-calendar strong,#print-area .collection-calendar small{font-size:8pt;line-height:1.2}#print-area .collection-calendar tr{break-inside:avoid}#print-area .collection-page p{margin:2mm 0}#print-area .collection-report-head p{font-size:9pt}}

.roll-photo-toggle{display:inline-flex;align-items:center;gap:8px;margin:0;padding:8px 12px;cursor:pointer}.roll-photo-toggle input{width:16px;height:16px;margin:0}.roll-sheet-print-photo{display:block;width:88px;height:88px;object-fit:contain;margin-top:6px;border:1px solid #dce1ed;border-radius:5px;background:#fff}

.type-target-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(140px,2fr) 70px 120px auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #e2e6ef}.type-target-row label{margin:0}.type-target-row input{padding:0;accent-color:#5651df}.type-target-row output{font-weight:700}dialog:has(#type-target-sliders){width:min(1150px,96vw)}@media(max-width:700px){.type-target-row{grid-template-columns:1fr 1fr}.type-target-row label{grid-column:1/-1}}

#type-target-total{padding:12px;border-radius:6px;font-weight:700}.type-total-error{color:#b42318;background:#fff0ee;border:1px solid #f3aaa4}.type-total-ok{color:#166534;background:#edf9f0;border:1px solid #a6dbb6}

.yield-panel{margin-top:20px}.yield-panel input[type="checkbox"]{width:auto}.yield-input-table input{min-width:105px;width:100%}.yield-panel .field-grid{margin:15px 0}.yield-report{margin-top:20px}@media print{.yield-report{break-before:page}.yield-report table{width:100%;white-space:normal}.yield-report .mini-total{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}}
.yield-details{margin:12px 0}.yield-details summary{cursor:pointer;color:#5356d9;font-weight:600}.yield-simple .mini-total{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}@media print{.yield-details>table,.yield-details>.table-wrap{display:block!important}.yield-details summary{display:none}}

#companion-ref-field[hidden]{display:none!important}
.sheet-paired input[type="checkbox"]{width:auto;min-height:auto;margin-right:6px}
/* Listas ajustam textos à tela; em espaços menores cada registro vira um cartão. */
.workspace,main{min-width:0}
#main .responsive-list{white-space:normal;table-layout:fixed;width:100%}
#main .responsive-list th,#main .responsive-list td{overflow-wrap:anywhere;white-space:normal;padding:12px 10px}
#main .responsive-list input,#main .responsive-list select{max-width:100%}
.cut-list-compact{container-type:inline-size}
.cut-list-compact th:nth-child(1){width:13%}.cut-list-compact th:nth-child(2){width:11%}.cut-list-compact th:nth-child(3){width:18%}.cut-list-compact th:nth-child(4){width:12%}.cut-list-compact th:nth-child(5){width:9%}.cut-list-compact th:nth-child(6){width:12%}.cut-list-compact th:nth-child(7){width:14%}.cut-list-compact th:nth-child(8){width:11%}
.cut-icon-actions{display:flex;gap:4px;flex-wrap:wrap}.cut-action-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:4px}.cut-list-compact select{margin:0;padding:7px 3px;font-size:11px}
@media screen and (max-width:1100px){
#main .responsive-list,#main .responsive-list tbody{display:block}#main .responsive-list thead{display:none}#main .responsive-list tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border-bottom:1px solid var(--border);padding:15px}#main .responsive-list td{display:block;min-width:0;border:0;padding:0}#main .responsive-list td[data-label]::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:5px;font-weight:600}#main .responsive-list select{width:100%}.filters label{min-width:0;flex-basis:180px}
}
@media screen and (max-width:500px){#main .responsive-list tr{grid-template-columns:minmax(0,1fr)}.panel-head{flex-wrap:wrap}.field-grid{grid-template-columns:minmax(0,1fr)}}

#main table.responsive-list{min-width:0!important}

.dispatch-matrix input{min-width:65px;width:80px}.dispatch-matrix th,.dispatch-matrix td{padding:8px}.dispatch-matrix{white-space:normal}#dispatch-form h3{margin-top:20px}
.operational-sheet{font:12px/1.35 Arial,sans-serif;background:#fff;color:#111;padding:12px}.operational-sheet h1{text-align:center;font-size:18px;margin:0 0 12px}.operational-sheet h2{font-size:12px;margin:10px 0 4px}.op-ident{display:grid;grid-template-columns:1fr 1fr 1.3fr 2fr;border:1px solid #222}.op-ident>div{padding:7px;border-right:1px solid #222}.op-ident small,.op-ident strong,.op-ident span{display:block}.op-ident small{font-size:9px}.op-info p{margin:6px 0}.op-notes{white-space:pre-wrap;border:1px solid #777;padding:6px;min-height:32px}.operational-sheet table{table-layout:fixed;width:100%;min-width:0;white-space:normal;border-collapse:collapse}.operational-sheet th,.operational-sheet td{font:11px Arial,sans-serif;color:#111;border:1px solid #555;padding:5px;text-align:center;overflow-wrap:anywhere;height:23px}.operational-sheet th{font-weight:bold;background:#e4edf4;letter-spacing:0;text-transform:none}.operational-sheet td:first-child{text-align:left}.operational-sheet td small{display:block;font-size:9px}.op-distribution{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.op-distribution th:first-child{width:30%}.op-distribution section{break-inside:avoid}.op-distribution p{margin:4px 0}.op-photos{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:10px}.op-photos figure{margin:0;border:1px solid #888;padding:4px;break-inside:avoid}.op-photos img{width:100%;height:85px;object-fit:contain}.op-photos figcaption{font-size:10px;text-align:center}.op-sign{margin-top:18px;padding-top:8px;border-top:1px solid #555}dialog:has(.operational-sheet){width:min(1250px,98vw)}
@media print{#print-area .operational-sheet{padding:0;width:100%;font-size:9pt}#print-area .operational-sheet h1{font-size:14pt;margin-bottom:3mm}#print-area .operational-sheet h2{font-size:9pt;margin:2mm 0 1mm}#print-area .operational-sheet p{margin:1.5mm 0}#print-area .operational-sheet th,#print-area .operational-sheet td{font-size:8pt;padding:1mm;height:5mm;position:static}#print-area .op-ident{break-inside:avoid}#print-area .op-ident>div{padding:2mm}#print-area .op-distribution{gap:2mm 4mm;grid-template-columns:1fr 1fr}#print-area .op-distribution section{break-inside:avoid}#print-area .op-photos{grid-template-columns:repeat(5,1fr);gap:2mm}#print-area .op-photos img{height:23mm}#print-area .op-sign{margin-top:4mm}#print-area .operational-sheet tr{break-inside:avoid}#print-area .operational-sheet th{print-color-adjust:exact}}
.operational-sheet tbody tr:last-child td{border-bottom:1px solid #555}@media print{#print-area .op-distribution{grid-template-columns:repeat(3,minmax(0,1fr));gap:2mm 4mm}#print-area .op-distribution th,#print-area .op-distribution td{font-size:7.5pt;padding:.8mm}#print-area .operational-sheet tbody tr:last-child td{border-bottom:1px solid #555}}

.erp-highlight{display:block;padding:14px 18px;margin-bottom:14px;background:#edf3fa;border:2px solid #516789;border-radius:6px;font-size:14px;font-weight:700}.erp-highlight input{font-size:28px;font-weight:800;max-width:440px;margin-top:6px}.op-erp strong{font-size:24px;font-weight:800}.cut-erp-reference{font-size:22px;font-weight:800}.sewing-labor{padding:8px;border:1px solid #555;font-size:14px}.sewing-settings{margin-top:18px}@media print{#print-area .op-erp strong{font-size:18pt}#print-area .sewing-labor{font-size:10pt;padding:2mm}#print-area .cut-erp-reference{font-size:16pt}}
.gantt-legend{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0}.gantt-legend span{font-size:11px}.gantt-legend i{display:inline-block;width:12px;height:12px;margin-right:6px;border-radius:3px}.gantt-scale,.gantt-row{display:grid;grid-template-columns:minmax(210px,30%) minmax(0,1fr);gap:14px}.gantt-scale{margin:18px 0 10px;font-size:11px}.gantt-scale>div{display:flex;justify-content:space-between;gap:3px}.gantt-row{border-top:1px solid #e2e6ef;padding:12px 0}.gantt-label{min-width:0;overflow-wrap:anywhere}.gantt-label button{background:none;border:0;color:#26345b;text-align:left;padding:0;cursor:pointer}.gantt-label span,.gantt-label small{display:block;margin-top:4px}.gantt-label span{font-size:11px}.gantt-label small{font-size:10px;color:#65728b}.gantt-track{position:relative;background:repeating-linear-gradient(to right,#f4f6fb 0%,#f4f6fb calc(16.666% - 1px),#e0e5ef calc(16.666% - 1px),#e0e5ef 16.666%);border-radius:4px;min-height:46px;align-self:stretch}.gantt-bar{position:absolute;top:35%;height:30%;min-width:3px;border-radius:4px}.gantt-color-0{background:#8b93a8}.gantt-color-1{background:#4b81d2}.gantt-color-2{background:#8464cd}.gantt-color-3{background:#d99939}.gantt-color-4{background:#259966}.gantt-color-5{background:#228d9c}.gantt-today{position:absolute;top:0;bottom:0;border-left:2px dashed #d34d60}.gantt-panel{overflow:hidden}@media(max-width:650px){.gantt-row{grid-template-columns:1fr;gap:7px}.gantt-scale{grid-template-columns:1fr}.gantt-track{height:35px}.gantt-scale small{font-size:8px}}

.gantt-color-6{background:#8b93a8}.gantt-color-7{background:#4b81d2}.gantt-color-8{background:#259966}
/* Campos numéricos: preenchimento por digitação, sem botões de incremento. */
input[type="number"]{-moz-appearance:textfield;appearance:textfield}
input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
/* Grade dos pedidos: tamanhos com a mesma largura em todas as filiais. */
.order-branch-grade{table-layout:fixed;width:100%;min-width:0!important;white-space:normal}
.grade.order-branch-grade th,.grade.order-branch-grade td{min-width:0;width:auto;padding:3px 1px;letter-spacing:0;font-size:10px;text-align:center;overflow-wrap:anywhere}
.grade.order-branch-grade input[type="number"]{width:100%;min-width:0;max-width:100%;padding:5px 0;margin:0;text-align:center;font-size:11px;border-radius:4px}
.grade.order-branch-grade .color-cell{white-space:normal;text-align:left;padding-left:4px}
dialog:has(.order-branch-grade){width:min(1600px,98vw)}

/* Uma faixa pastel por filial, igual na consulta e no preenchimento. */
.branch-tone-0{--branch-bg:#e9efff;--branch-edge:#9baee4}
.branch-tone-1{--branch-bg:#e5f4ef;--branch-edge:#8dc4b2}
.branch-tone-2{--branch-bg:#fff1dc;--branch-edge:#d7b379}
.branch-tone-3{--branch-bg:#f2eaff;--branch-edge:#b7a0d9}
.branch-tone-4{--branch-bg:#e4f3fa;--branch-edge:#8ebdd4}
.branch-tone-5{--branch-bg:#fbe9ef;--branch-edge:#d7a0b1}
.branch-tone-6{--branch-bg:#eef3df;--branch-edge:#b4c389}
.branch-tone-7{--branch-bg:#f7ebe1;--branch-edge:#c9aa8e}
.grade.order-branch-grade .branch-cell{background:var(--branch-bg);color:#26334b}
.grade.order-branch-grade .branch-start{border-left:2px solid var(--branch-edge)}
.grade.order-branch-grade .branch-cell input{background:#ffffffb8;border-color:var(--branch-edge);color:#17243b}
.grade.order-branch-grade .branch-cell input:focus{background:#fff;outline:2px solid #5356d9;outline-offset:-2px}
@media print{.grade.order-branch-grade .branch-cell{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
.billing-print{margin-top:24px}.billing-print-group{border:1px solid #b9c4d8;padding:14px;margin:14px 0}.billing-print-group table{white-space:normal}.billing-group .chip input{width:auto}@media print{.billing-print-group{break-inside:avoid}.billing-print h2{break-after:avoid}}
.branch-surface,.branch-label{background:var(--branch-bg,#fff);border-color:var(--branch-edge,#dce2ee)}.branch-label{display:inline-block;padding:2px 5px;border-radius:4px;border:1px solid var(--branch-edge,#dce2ee)}.store-card.branch-surface{border-left:4px solid var(--branch-edge)}.billing-print-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.billing-print-group{margin:0;padding:10px;font-size:11px;border-top:4px solid var(--branch-edge,#b9c4d8)}.billing-print-group h3{font-size:12px}.billing-print-group td,.billing-print-group th{padding:5px;font-size:10px}.billing-print-group p{margin:5px 0}.atmosfera-document-brand{margin:0 0 12px;break-inside:avoid}.atmosfera-document-brand img{display:block;width:200px;height:42px;object-fit:contain;object-position:left}.billing-print h2{margin-bottom:10px}@media(max-width:650px){.billing-print-grid{grid-template-columns:1fr}}@media print{.print-private,.branded-order>.mini-total>span:nth-child(n+3),.branded-order .mini-total>span:nth-child(n+3){display:none!important}.billing-print{margin-top:4mm}.billing-print-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3mm}.billing-print-group{padding:2mm;font-size:8pt;break-inside:avoid}.billing-print-group h3{font-size:9pt}.billing-print-group p{margin:1mm 0}.billing-print-group td,.billing-print-group th{padding:1mm;font-size:7.5pt}.branch-surface,.branch-label{print-color-adjust:exact;-webkit-print-color-adjust:exact}.atmosfera-document-brand{margin-bottom:3mm}.atmosfera-document-brand img{width:48mm;height:10mm}.branded-order .store-grid{gap:2mm;margin:3mm 0}.branded-order .store-card{padding:2mm}.branded-order .order-meta{margin:3mm 0;gap:2mm}.branded-order .mini-total{margin:3mm 0}}
/* Compact order header */
.order-document-header{position:relative;border-bottom:1px solid var(--border);padding-bottom:8px;margin-bottom:10px;break-inside:avoid}
.order-document-header h1{margin:0 155px 2px 0;font-size:20px;line-height:1.2}
.order-document-header>.subtle{margin:0 155px 8px 0;font-size:11px}
.order-document-header>.atmosfera-document-brand{position:absolute;right:0;top:0;margin:0}
.order-document-header>.atmosfera-document-brand img{width:135px;height:30px;object-position:right}
.branded-order .order-document-header .order-meta{grid-template-columns:repeat(6,minmax(0,1fr));margin:6px 0;gap:8px}
.order-document-header .order-meta>div{min-width:0;overflow-wrap:anywhere}
.branded-order .order-document-header .mini-total{margin:6px 0 0;padding:6px 10px;gap:20px}
.order-document-header .mini-total strong{font-size:15px}
@media(max-width:600px){.branded-order .order-document-header .order-meta{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media print{
#print-area .order-document-header h1{font-size:14pt;margin-bottom:1mm}
.order-document-header{padding-bottom:1.5mm;margin-bottom:2mm}
.order-document-header>.subtle{margin-bottom:2mm;font-size:8pt}
.order-document-header>.atmosfera-document-brand img{width:32mm;height:7mm}
.branded-order .order-document-header .order-meta{grid-template-columns:repeat(6,minmax(0,1fr));gap:2mm;margin:1.5mm 0}
.order-document-header .order-meta strong{font-size:8pt;line-height:1.2;display:block}
.order-document-header .order-meta span{font-size:7pt}
.branded-order .order-document-header .mini-total{margin:1.5mm 0 0;padding:1mm 2mm;gap:6mm}
.order-document-header .mini-total strong{font-size:10pt}
}
/* Distribution sheet: compact identity, keeping ERP prominent. */
.distribution-compact-header{position:relative;break-inside:avoid}
.distribution-compact-header>.atmosfera-document-brand{position:absolute;top:0;right:0;margin:0}
.distribution-compact-header>.atmosfera-document-brand img{width:120px;height:25px;object-position:right}
.operational-sheet .distribution-compact-header h1{text-align:left;font-size:14px;line-height:1.25;margin:0 140px 8px 0;min-height:25px}
.distribution-compact-header .op-ident>div{padding:4px 6px}
.distribution-compact-header .op-ident strong{line-height:1.2}
.distribution-compact-header .op-erp strong{font-size:20px}
.distribution-compact-header .op-ident small,.distribution-compact-header .op-ident span{font-size:9px;line-height:1.15}
@media print{
#print-area .distribution-compact-header h1{font-size:10pt;min-height:6mm;margin:0 34mm 1mm 0;padding-top:1mm}
.distribution-compact-header>.atmosfera-document-brand img{width:30mm;height:6mm}
#print-area .distribution-compact-header .op-ident>div{padding:1mm 1.5mm}
#print-area .distribution-compact-header .op-ident small,#print-area .distribution-compact-header .op-ident span{font-size:6.5pt}
#print-area .distribution-compact-header .op-erp strong{font-size:14pt}
}
