.intake-toolbar {display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:22px 0 14px;}
.intake-toolbar label {display:grid;gap:6px;}
.intake-toolbar select {width:180px;}
.intake-toolbar input[type=date] {width:160px;}
.intake-heading {border-bottom:1px solid var(--line);padding-bottom:16px;}
.intake-table {max-width:100%;overflow:auto;}
.intake-table img,.order-line-image img {max-width:130px;max-height:90px;object-fit:contain;border-radius:5px;display:block;}
.intake-note {white-space:pre-wrap;min-width:180px;max-width:300px;overflow-wrap:anywhere;}
.order-line-image {min-width:180px;max-width:230px;}
.order-line-image input {width:100%;font-size:12px;}
.order-draft-table textarea {min-width:180px;max-width:250px;resize:vertical;}
@media(max-width:600px){.intake-toolbar{gap:10px;}.intake-toolbar input[type=date]{width:145px;}.intake-toolbar select{width:145px;}}
.intake-table td.intake-note {min-width:0;max-width:none;white-space:pre-wrap;}
.order-workspace .order-draft-table {min-width:1300px;table-layout:fixed;}
.order-workspace .order-draft-table th:nth-child(1){width:100px;}
.order-workspace .order-draft-table th:nth-child(2){width:130px;}
.order-workspace .order-draft-table th:nth-child(3){width:220px;}
.order-workspace .order-draft-table th:nth-child(4){width:140px;}
.order-workspace .order-draft-table th:nth-child(5){width:100px;}
.order-workspace .order-draft-table th:nth-child(6){width:100px;}
.order-workspace .order-draft-table th:nth-child(7){width:210px;}
.order-workspace .order-draft-table th:nth-child(8){width:220px;}
.order-workspace .order-draft-table th:nth-child(9){width:80px;}
.order-workspace .order-draft-table td textarea {width:100%;min-width:0;max-width:100%;}
.order-workspace .order-line-image {min-width:0;width:100%;max-width:100%;}
.intake-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:10px 12px;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;}
.intake-actions label {display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.intake-actions input[type=date] {width:auto;min-width:130px;}
.intake-actions small {color:var(--muted);}
#intakeFeedback:empty {display:none;}
.intake-table table {width:100%;min-width:1380px;}
.intake-table th,.intake-table td {min-width:75px;white-space:normal;overflow-wrap:anywhere;}
.intake-table td.intake-note {min-width:110px;}
.intake-table .intake-check {min-width:46px;text-align:center;}
.intake-table input[type=checkbox] {width:auto;min-width:0;}
#intakeRows .intake-row-action {position:sticky;right:0;z-index:1;min-width:100px;background:var(--surface);box-shadow:-1px 0 var(--line);}
#intakeRows th.intake-row-action {background:#edf1f5;}
.intake-table .intake-row-action button {white-space:nowrap;}
.intake-table td small {display:block;color:var(--muted);white-space:nowrap;}

.intake-toolbar #intakeDateType,.intake-toolbar #intakeStatus {width:136px;}
.intake-toolbar input[type=search] {width:min(190px,100%);}
.intake-table summary {color:var(--primary);cursor:pointer;}
.intake-table td details small {white-space:normal;}

.intake-filter-actions {display:flex;flex-wrap:wrap;gap:8px;}

/* Keep each draft field inside its column, including mixed-product details. */
#orderItems .order-draft-table { width:100%; min-width:1640px; table-layout:fixed; }
#orderItems .order-draft-table th:nth-child(1) { width:110px; }
#orderItems .order-draft-table th:nth-child(2) { width:150px; }
#orderItems .order-draft-table th:nth-child(3) { width:290px; }
#orderItems .order-draft-table th:nth-child(4) { width:120px; }
#orderItems .order-draft-table th:nth-child(5) { width:120px; }
#orderItems .order-draft-table th:nth-child(6) { width:130px; }
#orderItems .order-draft-table th:nth-child(7) { width:250px; }
#orderItems .order-draft-table th:nth-child(8) { width:260px; }
#orderItems .order-draft-table th:nth-child(9) { width:90px; }
#orderItems .order-draft-table td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
#orderItems .order-draft-table td small { display:block; margin-top:6px; color:var(--muted); line-height:1.5; }
#orderItems .order-draft-table input,
#orderItems .order-draft-table textarea { box-sizing:border-box; min-width:0; max-width:100%; }
#orderItems .order-draft-table input[data-order-qty] { display:block; width:100%; margin-top:6px; }
#orderItems .order-line-image { min-width:0; max-width:100%; }
#orderItems .order-line-image input[type=file] { display:block; width:100%; padding:7px; font-size:12px; }
#orderItems .order-draft-table textarea { display:block; width:100%; min-width:0; max-width:100%; }
#orderItems .order-assembly-grid { gap:12px; padding:4px 0; }
#orderItems .order-assembly-line { display:grid; grid-template-columns:minmax(220px,1fr) 130px 150px 170px 160px; gap:16px; max-width:1100px; padding:12px; align-items:end; background:var(--surface-2); border-radius:6px; }
#orderItems .order-assembly-line > strong:first-child { align-self:center; line-height:1.5; }
#orderItems .order-assembly-line label { display:grid; gap:6px; min-width:0; }
#orderItems .order-assembly-line input { width:100%; }
.intake-toolbar .sourcing-filter select { width: 120px; }
