:root {
    color-scheme: light;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    --blue: #164f86;
    --blue-dark: #0f385f;
    --border: #d6dce3;
    --surface: #ffffff;
    --surface-alt: #f5f7fa;
    --text: #18212b;
    --muted: #647180;
    --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1100px; background: var(--surface-alt); color: var(--text); }
body { font-size: 14px; }
a { color: var(--blue); }
h1 { margin: 0 0 4px; font-size: 26px; }
h2 { margin: 0 0 14px; font-size: 18px; }
.muted { color: var(--muted); }
.app-shell { min-height: 100vh; background: var(--surface-alt); }
.top-bar { height: 56px; display: flex; align-items: center; gap: 18px; padding: 0 28px; color: white; background: var(--blue-dark); }
.brand { margin-right: auto; display: flex; align-items: center; gap: 10px; color: white; font-size: 18px; font-weight: 700; text-decoration: none; }
.menu-customer-logo { width: 42px; height: 42px; object-fit: contain; }
.menu-proline-logo { width: 62px; height: 34px; object-fit: contain; }
.current-user { opacity: .9; }
.link-button { border: 0; padding: 0; color: white; background: transparent; cursor: pointer; font: inherit; text-decoration: underline; }
.top-bar-link { color: white; text-decoration: none; }.top-bar-link:hover { text-decoration: underline; }
.main-content { padding: 24px 28px 36px; }
.page-heading, .order-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filter-bar { display: flex; align-items: center; gap: 14px; min-height: 76px; margin: 16px 0 14px; padding: 8px 12px; border: 1px solid var(--border); background: var(--surface); }
.customer-hierarchy-select { display: block; width: 250px; margin-top: 4px; }
.order-number-with-logo { display: flex; align-items: center; gap: 8px; }
.order-number-with-logo img { width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; }
.order-global-search { min-width:300px; }
.order-global-search input { width:100%; }
.order-global-search input::placeholder { color:var(--muted); font-style:italic; opacity:.7; }
.thread-suggestion-select { font-family:Consolas,"Courier New",monospace; }
.thread-suggestion-select option { white-space:pre; }
.suggested-thread-color { position: relative; min-width: 0; width: 100%; }
.suggested-thread-toggle { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid #b8c1cc; border-radius: 4px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.suggested-thread-color.required-empty .suggested-thread-toggle { background: #fff6cb; }
.suggested-thread-arrow { margin-left: auto; }
.suggested-thread-swatch { flex: 0 0 17px; height: 17px; border: 1px solid #66717a; border-radius: 3px; }
.suggested-thread-menu { position: absolute; z-index: 30; top: 100%; left: 0; width: max(100%, 290px); padding: 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); box-shadow: 0 9px 24px rgb(0 0 0 / 22%); }
.suggested-thread-menu input { width: 100%; margin-bottom: 6px; }
.suggested-thread-options { max-height: 245px; overflow-y: auto; }
.suggested-thread-option { width: 100%; display: grid; grid-template-columns: 17px 65px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px; border: 0; border-radius: 3px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.suggested-thread-option:hover, .suggested-thread-option:focus-visible { background: var(--surface-alt); outline: 1px solid var(--blue); }
.suggested-thread-code { white-space: nowrap; }
.suggested-thread-empty { display: block; padding: 9px; color: var(--muted); }
.theme-dark .suggested-thread-color.required-empty .suggested-thread-toggle,
.theme-high-contrast .suggested-thread-color.required-empty .suggested-thread-toggle { color: #2b2500; background: #fff4b8; }
.theme-high-contrast .suggested-thread-menu { border-color: #fff; }
.order-changed-badge { display:inline-block; margin-left:4px; padding:2px 6px; border-radius:999px; background:#fff0a8; color:#5a4100; border:1px solid #d4a900; font-size:11px; font-weight:700; }
.checkbox-line { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px; }
.hide-filter-group { display: flex; align-items: center; gap: 18px; min-width: 245px; height: 58px; margin: 0; padding: 12px 14px 8px; border: 1px solid #aeb8c3; border-radius: 4px; }
.hide-filter-group legend { padding: 0 6px; color: #394655; font-size: 13px; font-weight: 700; }
.hide-filter-group label { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; margin: 0; white-space: nowrap; cursor: pointer; }
.hide-filter-group input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.validation-message { margin: 12px 0; padding: 11px 14px; border: 1px solid #f0b8b3; border-radius: 4px; color: var(--danger); background: #fff1f0; }
.success-message { margin: 12px 0; padding: 11px 14px; border: 1px solid #acd6b7; border-radius: 4px; color: #1d6832; background: #edf9f0; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #e9f0f7, #f9fbfd); }
.login-card { width: 410px; padding: 34px 38px; border: 1px solid var(--border); border-radius: 8px; background: white; box-shadow: 0 16px 50px rgb(16 48 78 / 14%); }
.login-logo { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: white; background: var(--blue); font-size: 20px; font-weight: 800; }
.login-proline-logo { display: block; width: 190px; height: 78px; margin: 0 auto 18px; object-fit: contain; }
.login-card h1, .login-card p { text-align: center; }
.form-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
input, select, textarea { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #b8c1cc; border-radius: 4px; background: white; }
input[type=checkbox] { width: auto; min-height: auto; }
textarea { min-height: 74px; resize: vertical; }
.primary-button { min-height: 38px; margin-top: 10px; border: 0; border-radius: 4px; color: white; background: var(--blue); font-weight: 700; cursor: pointer; }
.primary-action-button { min-height: 36px; padding: 7px 16px; border: 1px solid var(--blue-dark); border-radius: 4px; color: white; background: var(--blue); font-weight: 700; cursor: pointer; }.primary-action-button:hover { background: var(--blue-dark); }.primary-action-button:disabled { opacity: .65; cursor: wait; }
.forgot-link { display: block; margin-top: 18px; text-align: center; }
.order-header { position: sticky; z-index: 20; top: 0; flex-wrap: wrap; margin: -24px -28px 18px; padding: 14px 28px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / 96%); box-shadow: 0 3px 12px rgb(10 30 50 / 7%); }
.order-header-message { flex: 0 0 100%; width: 100%; margin: 4px 0 0; }
.customer-logo { width: 54px; height: 54px; float: left; margin: 0 12px 0 0; object-fit: contain; }
.order-presence-warning { margin: -6px 0 14px; padding: 9px 13px; border: 1px solid #d8a441; border-radius: 4px; color: #674400; background: #fff4cc; }
.back-link { display: inline-block; margin-bottom: 4px; font-size: 12px; text-decoration: none; }
.status-pill { display: inline-block; margin-right: 12px; padding: 3px 9px; border-radius: 12px; background: #dce8f5; font-weight: 700; }
.status-3 { background: #fff0c2; }.status-7 { background: #d9f0df; }.status-8 { background: #ececef; color: #666; }
.status-9 { background: #dce8f5; color: #24445f; }.status-10 { background: #f5e6c8; color: #654714; }.status-11 { background: #eee1f5; color: #553568; }
.save-panel { display: flex; align-items: center; gap: 10px; }
.save-state { min-width: 120px; color: var(--muted); text-align: right; }
.save-error { color: var(--danger); }
.order-form { margin: 0; padding: 0; border: 0; }
.order-form:disabled { opacity: .9; }
.form-section, .address-panels details, .operational-section { margin-bottom: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.collapsible-order-panel > summary { cursor: pointer; font-size: 18px; font-weight: 700; }
.collapsible-order-panel[open] > summary { margin-bottom: 14px; }
.changed-since-view { outline:3px solid #e4ad20; outline-offset:2px; box-shadow:0 0 0 4px rgba(255,210,71,.20); }
.changed-since-view > summary::after { content:"Changed"; display:inline-block; margin-left:10px; padding:2px 7px; border-radius:999px; background:#fff0a8; color:#5a4100; border:1px solid #d4a900; font-size:11px; vertical-align:middle; }
.collapsible-panel-body { min-width: 0; }
.names-entry-grid { display: grid; grid-template-columns: minmax(360px, 1fr) 240px; gap: 22px; align-items: start; }
.names-text-field textarea { min-height: 190px; resize: vertical; }
.names-options-column { display: grid; gap: 12px; }
.names-options-column select { width: 100%; }
.order-form-type-panel { display: flex; gap: 24px; }
.form-grid { display: grid; gap: 12px; }.four-columns { grid-template-columns: 2fr 1fr 1fr 1fr; }.three-columns { grid-template-columns: repeat(3, 1fr); }
label { display: flex; flex-direction: column; gap: 4px; color: #394655; font-size: 13px; font-weight: 600; }
.option-row { display: flex; align-items: end; gap: 24px; }.option-row label { min-width: 135px; }.option-row .checkbox-line { min-width: auto; align-self: center; }
.shipping-options .option-row label:not(.checkbox-line) { width: 210px; }
.customer-info-section > h2 { margin-bottom: 12px; }
.customer-info-heading { align-items: end; margin-bottom: 12px; }
.customer-info-heading h2 { margin: 0; }
.copy-previous-controls { display: flex; align-items: end; gap: 8px; }
.copy-previous-controls label { width: 390px; }
.copy-previous-controls button { min-height: 34px; padding: 6px 12px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }
.copy-previous-controls button:disabled { opacity: .55; cursor: default; }
.address-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.address-panels details { margin: 0; padding: 0; overflow: hidden; }
.address-panels summary { padding: 12px 14px; background: #edf2f7; font-size: 15px; font-weight: 700; cursor: pointer; }
.address-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 14px; }
.return-address-option { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.address-company { grid-column: span 3; }.address-street { grid-column: 1 / -1; }.address-city { grid-column: span 2; }
.address-contact-row { grid-column: 1 / -1; display: grid; grid-template-columns: .5fr 1fr 2.5fr; gap: 9px; }
.item-table { width: 100%; border-collapse: collapse; }.item-table th { padding: 8px; text-align: left; background: #edf2f7; }.item-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.item-parent-row { background: var(--surface); font-weight: 600; }
.item-child-row { background: var(--surface-alt); }
.item-child-row td { vertical-align: top; }
.item-child-label { display: inline-block; padding-left: 56px; font-weight: 700; color: var(--muted); }
.item-hierarchy-toggle { width: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.item-actions { display: flex; gap: 5px; white-space: nowrap; }.item-actions button, .section-heading button, .icon-button { min-height: 30px; padding: 4px 9px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }.danger-button { color: var(--danger); }.empty-grid-message { padding: 22px; text-align: center; color: var(--muted); }
.grid-delete-button { min-height: 30px; padding: 4px 9px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; font: inherit; line-height: normal; cursor: pointer; }
.item-status-cell { min-width: 170px; }.item-status-cell .checkbox-line { display: flex !important; margin-bottom: 4px; white-space: nowrap; }.compact-image-link { display: block; margin: 3px 0; font-size: 12px; font-weight: 600; }
.two-column-section { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.request-options-section { display: grid; grid-template-columns: 1.1fr 1.25fr 1fr; gap: 34px; }
.request-column { min-width: 0; }.request-column + .request-column { padding-left: 20px; border-left: 1px solid var(--border); }
.request-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.stacked-checkboxes { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-bottom: 9px; }
.two-fields { grid-template-columns: repeat(2, 1fr); }
.sew-out-column .three-columns { margin-top: 10px; }
.sew-out-workflow { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }.sew-out-file-card { display: flex; align-items: center; gap: 8px; }.sew-out-file-card .order-file-thumbnail { width: 1in; height: 1in; }
.loading-panel { padding: 40px; text-align: center; }
.modal-shade { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 28px; background: rgb(9 24 39 / 58%); }
.thread-picker { width: min(1120px, 95vw); height: min(760px, 90vh); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; border-radius: 7px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 35%); }
.thread-picker-header, .thread-picker-footer { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }.thread-picker-footer { border-top: 1px solid var(--border); border-bottom: 0; }
.thread-picker-header h2 { margin: 0; }.close-button { margin-left: auto; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.thread-picker-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 18px; background: var(--surface-alt); }
.thread-picker-body { overflow: auto; padding: 0 18px; }.thread-color-table { width: 100%; border-collapse: collapse; }.thread-color-table th { position: sticky; z-index: 1; top: 0; padding: 9px; text-align: left; background: #e9eef4; }.thread-color-table td { padding: 6px 9px; border-bottom: 1px solid #e4e8ed; }.thread-color-table tbody tr { cursor: pointer; }.thread-color-table tbody tr:hover { background: #eef6ff; }.thread-color-table tbody tr.selected { outline: 2px solid var(--blue); outline-offset: -2px; background: #e3f0fd; }
.thread-color-table tbody tr.thread-color-selected, .thread-color-table tbody tr.thread-color-selected:hover { outline: 2px solid var(--blue); outline-offset: -2px; background: #cfe5fa; }
.dss-finder-body { min-height: 0; display: grid; grid-template-columns: 245px 1fr; overflow: hidden; }.dss-customer-tree { overflow: auto; padding: 10px 8px; border-right: 1px solid var(--border); background: #f7f9fb; }.dss-tree-node { width: 100%; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 4px; padding: 8px 7px; border: 0; border-radius: 3px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }.dss-tree-node:hover { background: #e8f1fa; }.dss-tree-node.selected { color: white; background: var(--blue); }.dss-tree-root { font-weight: 700; }.dss-tree-child { padding-left: 22px; }.tree-count { min-width: 25px; text-align: right; opacity: .75; }.dss-grid-body { min-width: 0; overflow: auto; padding: 0 18px; }
.dss-image-cell { width: 108px; }.dss-thumbnail-button { width: 96px; height: 96px; display: grid; place-items: center; padding: 3px; overflow: hidden; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: zoom-in; }.dss-thumbnail-button img { max-width: 100%; max-height: 100%; object-fit: contain; }
.column-images-button { min-height: 30px; padding: 4px 9px; border: 1px solid #aeb8c3; border-radius: 3px; color: var(--blue); background: white; white-space: nowrap; cursor: pointer; }
.column-images-shade { position: fixed; z-index: 1350; inset: 0; display: grid; place-items: center; padding: 28px; background: rgb(9 24 39 / 76%); }.column-images-dialog { width: fit-content; max-width: 96vw; height: fit-content; max-height: 94vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-radius: 7px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 45%); }.column-images-scroll { min-width: 0; min-height: 0; max-height: calc(94vh - 132px); overflow: auto; padding: 16px; }.column-images-grid { width: max-content; display: grid; align-items: start; gap: 16px; }.column-images-grid.column-count-1 { grid-template-columns: max-content; }.column-images-grid.column-count-2 { grid-template-columns: repeat(2, max-content); }.column-images-grid.column-count-3 { grid-template-columns: repeat(3, max-content); }.column-images-grid.column-count-4 { grid-template-columns: repeat(4, max-content); }.column-images-grid.column-count-5 { grid-template-columns: repeat(5, max-content); }.column-image-tile { padding: 10px; border: 2px solid var(--border); border-radius: 5px; background: #f8fafc; cursor: pointer; }.column-image-tile.selected { border-color: var(--blue); background: #e3f0fd; }.column-image-tile > header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 8px; }.column-image-tile > img { display: block; width: auto; height: auto; max-width: none; max-height: none; background: white; }.missing-column-image { width: 300px; height: 180px; display: grid; place-items: center; color: var(--muted); background: #edf1f5; }.column-dst-image { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }.column-dst-image > span { display: block; margin-bottom: 5px; font-weight: 700; }.column-dst-image button { max-width: 100%; display: block; padding: 4px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: zoom-in; }.column-dst-image img { display: block; width: auto; height: auto; max-width: 320px; max-height: 220px; object-fit: contain; }
.dss-image-preview-shade { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 32px; background: rgb(9 24 39 / 78%); }.dss-image-preview { position: relative; max-width: 92vw; max-height: 92vh; padding: 42px 16px 16px; border-radius: 6px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 45%); }.dss-image-preview .close-button { position: absolute; top: 5px; right: 10px; }.dss-image-preview img { display: block; max-width: calc(92vw - 32px); max-height: calc(92vh - 58px); object-fit: contain; }
.color-name { display: block; min-width: 190px; padding: 7px 9px; border: 1px solid rgb(0 0 0 / 12%); border-radius: 3px; font-weight: 700; }.machine-color { color: #d58b00; text-align: center; }.footer-spacer { flex: 1; }.selected-color-preview { padding: 7px 11px; border-radius: 3px; font-weight: 700; }
.item-editor { width: min(1260px, 96vw); height: min(860px, 94vh); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; border-radius: 7px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 35%); }.item-editor-message { margin: 0; border-width: 0 0 1px; border-radius: 0; }.item-editor-body { overflow: auto; padding: 18px; }.item-primary-fields { grid-template-columns: 100px 1.4fr .7fr 1fr 1fr; }.description-field { grid-column: 2 / -1; }.design-selection, .file-selection { margin-top: 18px; padding: 15px; border: 1px solid var(--border); border-radius: 4px; }.design-selection legend, .file-selection legend { padding: 0 7px; font-weight: 700; }.design-toolbar, .column-choice, .run-order-heading, .file-buttons { display: flex; align-items: end; gap: 12px; }.design-toolbar label { width: 180px; }.selected-design { align-self: center; font-weight: 700; }.column-choice { margin-top: 14px; align-items: center; }.column-choice > label:first-child { width: 380px; }.choice-or { color: var(--muted); font-weight: 700; }.run-order-heading { justify-content: space-between; margin: 18px 0 8px; }.run-order-table { width: 100%; border-collapse: collapse; }.run-order-table th { padding: 7px; text-align: left; background: #edf2f7; }.run-order-table td { padding: 5px; border-bottom: 1px solid var(--border); }.run-order-table th:first-child { width: 40px; }.run-order-table th:last-child { width: 75px; }.color-select-button { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #b8c1cc; border-radius: 4px; background: white; cursor: pointer; }.small-color-chip { width: 20px; height: 20px; display: inline-block; border: 1px solid #777; border-radius: 2px; }.upload-guidance { margin-bottom: 0; color: var(--muted); }.nested-modal-shade { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 34px; background: rgb(9 24 39 / 68%); }.dss-finder { width: min(1150px, 94vw); height: min(700px, 88vh); display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; border-radius: 7px; background: white; }.nested-modal-shade + .modal-shade { z-index: 1200; }

.file-upload-button { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; overflow: hidden; border: 1px solid #b8c1cc; border-radius: 4px; background: white; font-weight: 600; cursor: pointer; }
.file-upload-button:hover { background: #f4f7fa; }
.file-upload-button.disabled { opacity: .55; cursor: default; }
.file-upload-button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selected-upload { align-self: center; }
.attached-file-list { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); align-items: start; gap: 12px; margin-top: 12px; }
.attached-file-card { min-width: 0; display: grid; grid-template-columns: 1in minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 4px; background: #f8fafc; }
.attached-file-card div { min-width: 0; }
.attached-file-card span { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.order-file-thumbnail { width: 1in; height: 1in; display: grid; place-items: center; padding: 3px; overflow: hidden; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: zoom-in; }
.order-file-thumbnail img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-download-button, .compact-download-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.compact-download-link { display: block; margin-top: 4px; font-size: 12px; }
.order-file-status { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.status-uploaded { color: #315d86; }.status-pending { color: #8a5a00; }.status-accepted { color: #18753c; }.status-rejected { color: var(--danger); }
.link-style-button { padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.preview-download { display: block; margin-top: 10px; text-align: center; }
.logistics-grid { display: grid; gap: 16px; }
.logistics-card { border: 1px solid var(--border); border-radius: 5px; background: white; }
.logistics-card > summary { padding: 11px 14px; background: var(--surface-alt); font-size: 17px; font-weight: 700; cursor: pointer; }
.compact-entry-table { width: 100%; border-collapse: collapse; }
.compact-entry-table th, .compact-entry-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.compact-entry-table th { background: #edf2f7; }
.compact-entry-table input { min-width: 80px; }
.entry-row { background: #f8fbfe; }
.logistics-record, .logistics-entry-form { margin: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 4px; }
.logistics-record > header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.logistics-record > header span { color: var(--muted); }
.logistics-record > header button { margin-left: auto; }
.logistics-fields { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.logistics-fields .wide-field { grid-column: span 2; }
.tracking-line, .tracking-entry { display: grid; grid-template-columns: 120px 120px 1fr auto; align-items: center; gap: 8px; padding: 5px 0; }
.tracking-heading { margin-top: 10px; }
.notes-list { display: grid; gap: 10px; padding: 12px; }
.note-block { padding: 12px; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 4px; background: #fbfdff; }
.note-block.internal-note { border-left-color: #a66a00; background: #fff9eb; }
.note-block header { display: flex; align-items: center; gap: 12px; }
.note-block time { color: var(--muted); }
.note-block p { margin-bottom: 4px; white-space: pre-wrap; }
.internal-badge { padding: 2px 6px; border-radius: 3px; color: #6e4300; background: #ffe2a7; font-size: 12px; font-weight: 700; }
.note-entry { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 10px; padding: 12px; border-top: 1px solid var(--border); }
.note-attachment-controls { min-width: 145px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }.note-attachment-controls > span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-entry textarea { min-height: 90px; }
.user-filter-bar label { width: 300px; }
.user-list-section { padding: 0; overflow: auto; }
.user-table { min-width: 1200px; }
.user-actions { display: flex; gap: 5px; white-space: nowrap; }
.user-actions button { min-height: 30px; padding: 4px 8px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }
.user-name-with-logo { display: flex; align-items: center; gap: 9px; }
.user-name-with-logo img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; }
.user-logo-upload-button { min-height: 30px; display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }
.user-logo-upload-button input[type=file] { display: none; }
.user-status { display: inline-block; padding: 3px 7px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.user-status.active { color: #1d6832; background: #d9f0df; }.user-status.inactive { color: #666; background: #ececef; }.user-status.locked { color: var(--danger); background: #ffe1de; }.user-status.temporary { color: #6e4300; background: #fff0c2; }
.user-editor { width: min(760px, 92vw); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 7px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 35%); }
.password-reset-dialog { width: min(520px, 90vw); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 7px; background: white; box-shadow: 0 22px 80px rgb(0 0 0 / 35%); }
.user-editor-body { display: grid; gap: 15px; padding: 20px; }
.user-editor-body .wide-field { grid-column: 1 / -1; }
.user-type-panel { display: flex; align-items: center; gap: 24px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 4px; }
.user-type-panel legend { padding: 0 6px; font-weight: 700; }
.temporary-password-fields { margin-top: 4px; }
.notification-preferences-card { width: min(700px, 100%); margin-top: 18px; }
.notification-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; padding: 8px 0 20px; }
.notification-options .checkbox-line { min-height: 28px; font-size: 14px; }
.notification-options input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.notification-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 14px; border-top: 1px solid var(--border); }
.note-appearance-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px dashed var(--border); border-radius: 4px; }
.note-appearance-button-stack { display: grid; grid-template-columns: minmax(145px, auto); gap: 8px; }
.note-appearance-button-stack .file-upload-button { justify-content: center; }
.note-appearance-preview { min-width: 180px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; }
.smtp-settings-card { max-width: 900px; }
.smtp-settings-card .smtp-ssl { align-self: end; min-height: 36px; }
.smtp-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.smtp-test { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid var(--border); border-radius: 4px; }
.item-table { table-layout: auto; }
.item-table .item-description-column { width: 24%; }
.item-table .item-description-cell { min-width: 180px; max-width: 420px; white-space: normal; }
.item-table .order-file-thumbnail { width: .55in; height: .55in; }
.item-table th:nth-last-child(-n+4), .item-table td:nth-last-child(-n+4) { width: 1%; white-space: nowrap; }
.item-actions { min-width: 245px; text-align: right; white-space: nowrap; }
.module-availability { margin: 12px; padding: 10px; border-radius: 4px; color: var(--muted); background: var(--surface-alt); }
.logistics-table-scroll { width: 100%; overflow-x: auto; }
.saved-logistics-table { min-width: 1120px; }
.saved-logistics-table td { vertical-align: top; }
.multiline-value { min-width: 130px; white-space: pre-line; }
.logistics-fields textarea { min-height: 64px; resize: vertical; }
.status-workflow-panel { display: flex; align-items: end; gap: 12px; margin: 0 24px 14px; padding: 12px 16px; border: 1px solid #b9c9d8; border-radius: 5px; background: #edf5fc; }
.status-workflow-panel label { margin: 0; }
.status-workflow-panel textarea { min-height: 58px; }
.status-workflow-panel .status-note-field { flex: 1 1 320px; }
.status-update-button, .status-cancel-button { width: 132px; flex: 0 0 132px; }
.status-cancel-button { margin-left: auto; }
.save-action-button, .status-update-button { color: #fff !important; border-color: #4f8b68 !important; background: #2f6f4e !important; }
.save-action-button:hover, .status-update-button:hover { color: #fff !important; background: #3c8560 !important; }
.save-action-button:disabled, .status-update-button:disabled { color: #c5d7cc !important; border-color: #425c4d !important; background: #30483a !important; }
.compact-thread-picker { width: min(760px, 92vw); height: min(680px, 88vh); }
.upload-notice-dialog { width: min(560px, 90vw); padding: 22px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); background: var(--surface); box-shadow: 0 22px 80px rgb(0 0 0 / 35%); }
.upload-notice-dialog h2 { margin-top: 0; color: var(--text); }
.upload-notice-dialog p { color: var(--text); }
.upload-notice-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.upload-notice-actions .file-upload-button.primary-action-button { min-width: 90px; display: inline-flex; align-items: center; justify-content: center; color: #fff; border-color: var(--blue-dark); background: var(--blue); cursor: pointer; }
.upload-notice-actions .file-upload-button.primary-action-button:hover { color: #fff; background: var(--blue-dark); }
.theme-dark .upload-notice-dialog { color: var(--text); border: 1px solid var(--border); background: #202a33; }
.theme-dark .upload-notice-dialog h2, .theme-dark .upload-notice-dialog p { color: var(--text); }
.theme-dark .upload-notice-dialog button, .theme-dark .upload-notice-dialog .file-upload-button { color: var(--text); border-color: #718091; background: #303b46; }
.theme-dark .upload-notice-dialog button:hover, .theme-dark .upload-notice-dialog .file-upload-button:hover { background: #3a4855; }
.theme-dark .upload-notice-actions .file-upload-button.primary-action-button { color: #fff; border-color: #497eaa; background: #315f87; }
.theme-dark .upload-notice-actions .file-upload-button.primary-action-button:hover { color: #fff; background: #3d75a5; }
.theme-high-contrast .upload-notice-dialog { color: #fff; border: 2px solid #fff; background: #000; }
.theme-high-contrast .upload-notice-dialog h2, .theme-high-contrast .upload-notice-dialog p { color: #fff; }
.theme-high-contrast .upload-notice-dialog button { color: #fff; border: 2px solid #fff; background: #000; }
.theme-high-contrast .upload-notice-actions .file-upload-button.primary-action-button { color: #000; border: 2px solid #fff; background: #00ffff; }
.theme-high-contrast .upload-notice-actions .file-upload-button.primary-action-button:hover { color: #000; background: #ffff00; }
.audit-section > details > summary { font-size: 18px; font-weight: 700; cursor: pointer; }
.audit-list { display: grid; gap: 10px; margin-top: 12px; }
.audit-event { padding: 11px; border: 1px solid var(--border); border-radius: 4px; background: #fafbfd; }
.audit-event > header { display: flex; gap: 14px; align-items: center; }
.audit-event time { margin-left: auto; color: var(--muted); }
.audit-event p { margin-bottom: 6px; }

.simple-order-item-panel { display: grid; gap: 16px; }
.simple-unit-choice { display: flex; justify-content: center; gap: 24px; }
.simple-radio-option, .simple-design-radio { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; }
.simple-radio-option label, .simple-design-radio label { display: inline; margin: 0; }
.simple-order-item-panel input[type=radio] { width: auto; height: auto; min-height: auto; margin: 0; padding: 0; transform: none; }
.simple-design-selection { min-width: 0; padding: 0; border: 0; }
.simple-design-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 230px)); justify-content: center; align-items: stretch; gap: 16px; }
.simple-design-card { min-width: 0; display: grid; grid-template-rows: auto 170px auto auto auto; gap: 7px; padding: 10px; border: 2px solid var(--border); border-radius: 5px; background: #fafcfe; text-align: center; }
.simple-design-card.selected { border-color: var(--blue); background: #edf6ff; }
.simple-design-radio { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 700; }
.simple-design-image { width: 100%; height: 170px; object-fit: contain; background: white; }
.simple-design-image.no-image { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--border); }
.simple-design-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple-design-size { min-height: 20px; }
.simple-design-card select { width: 100%; }
.simple-item-fields { display: grid; grid-template-columns: 100px 1fr 1fr 1fr; gap: 12px; padding: 0; border: 0; }
.multiline-text-grid { display: grid; grid-template-columns: repeat(var(--multiline-columns, 3), minmax(0, 1fr)); gap: 18px; }
.multiline-text-grid.groups-1 { --multiline-columns: 1; }
.multiline-text-grid.groups-2 { --multiline-columns: 2; }
.multiline-text-grid.groups-3 { --multiline-columns: 3; }
.multiline-text-group { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(150px, .72fr); gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 5px; }
.multiline-text-value textarea { min-height: 128px; resize: vertical; }
.multiline-text-value strong { display: block; margin-bottom: 7px; font-size: 21px; }
.multiline-text-options { display: grid; align-content: start; gap: 8px; }
.collapsible-order-panel[open] > .multiline-text-grid { height: auto; min-height: min-content; overflow: visible; }
.multiline-text-grid .multiline-text-group { min-height: 0; overflow: visible; }
.print-layout { min-height: 100vh; padding: 20px; background: #eef1f4; }
.simple-order-printout { width: min(8.5in, 100%); min-height: 11in; margin: 0 auto; padding: .38in; color: #111; background: white; box-shadow: 0 3px 18px rgb(0 0 0 / 14%); }
.print-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.print-toolbar button { min-height: 34px; padding: 6px 16px; border: 1px solid #9aa4ae; border-radius: 4px; background: white; cursor: pointer; }
.grid-print-link { display: inline-block; padding: 5px 9px; border: 1px solid #aeb8c3; border-radius: 3px; color: var(--text); background: white; text-decoration: none; }
.print-order-header { display: grid; grid-template-columns: 1in 1fr auto; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid #263746; }
.print-order-header > img { width: 1in; height: 1in; object-fit: contain; }
.print-order-header h1 { margin: 0 0 4px; font-size: 24px; }
.print-order-header strong, .print-order-header span { display: block; }
.print-timestamp { align-self: end; font-size: 10px; text-align: right; }
.print-report-section { margin-top: 12px; padding: 10px 12px; break-inside: avoid; border: 1px solid #aeb7c0; border-radius: 3px; }
.print-report-section h2 { margin: -10px -12px 9px; padding: 5px 10px; color: #162d42; background: #e8edf2; font-size: 15px; }
.print-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 14px; margin: 0; }
.print-facts div { min-width: 0; }
.print-facts dt { color: #53606c; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.print-facts dd { margin: 1px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.print-design-row { display: grid; grid-template-columns: 1.35in 1fr; align-items: center; gap: 14px; }
.print-design-image { width: 1.35in; height: 1.15in; object-fit: contain; }
.print-design-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.print-design-facts .wide { grid-column: 1 / -1; }
.print-item-facts { margin-top: 9px; padding-top: 8px; border-top: 1px solid #cbd1d7; }
.print-text-group > p { margin: 4px 0 10px; white-space: pre-wrap; font-size: 13px; }
.print-note { margin-top: 7px; padding-top: 7px; border-top: 1px solid #d5d9dd; break-inside: avoid; }
.print-note:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.print-note header { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.print-note p { margin: 4px 0 0; white-space: pre-wrap; font-size: 11px; }
.print-report-section address { display: grid; gap: 2px; font-style: normal; font-size: 11px; }
.print-return-address { margin: 8px 0 0; font-size: 11px; }
.print-error, .print-loading { max-width: 8.5in; margin: 30px auto; padding: 20px; background: white; }
.hidden-file-input { display: none !important; }
.item-editable-fields { min-width: 0; padding: 0; border: 0; }
.sms-consent-option { grid-column: 1 / -1; align-items: flex-start; font-size: 12px; line-height: 1.35; }
.replying-to { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 7px 10px; border-left: 4px solid var(--accent); background: #eef5fb; }
.file-review-controls, .suggested-color-review { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-workflow-card .file-review-controls { grid-column: 1 / -1; }
.file-workflow-card .review-note { grid-column: 1 / -1; }
.file-workflow-card .save-review-button { grid-column: 3; }
.artwork-dimensions { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 2px; }
.artwork-unit-selector, .artwork-dimension-inputs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.artwork-unit-selector label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.artwork-dimension-inputs label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.artwork-dimension-inputs input { width: 90px; }
.artwork-size-save-button { width: fit-content; padding: 4px 9px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }
.purchasing-table input { width: 100%; min-width: 90px; }
.purchasing-table td:first-child input { width: 75px; }
.item-primary-fields { grid-template-columns: 70px minmax(110px, .55fr) minmax(80px, .35fr) minmax(110px, .55fr) minmax(220px, 1.8fr) auto; align-items: end; }
.item-primary-fields .description-field { grid-column: auto; }
.item-primary-fields .sample-order-option { align-self: center; white-space: nowrap; }
.item-information-panel { position:relative; margin-bottom:18px; }
.item-information-panel .item-subpanel-body { padding: 14px; }
.item-size-heading { display:flex; align-items:center; justify-content:space-between; margin:14px 0 7px; }
.item-size-list { display:grid; gap:7px; }
.item-size-row { display:grid; grid-template-columns:100px minmax(180px,320px) auto; gap:10px; align-items:end; }
.item-size-row .danger-button { width:max-content; margin-bottom:1px; }
.size-child-row td:first-child { padding-left:72px; }
.size-child-row .item-child-label { padding-left:72px; }
.design-child-row .item-child-label { padding-left:24px; }
.item-design-heading-row { background:var(--surface-alt); }
.item-design-heading-row th { padding:8px; text-align:left; color:var(--muted); border-bottom:1px solid var(--border); }
.item-design-heading-row td { border-bottom:1px solid var(--border); }
.ple-ordering-option { align-self:end; min-height:34px; }
.lookup-management { padding:16px; }
.lookup-toolbar { display:flex; justify-content:space-between; align-items:end; gap:12px; margin-bottom:15px; }
.lookup-toolbar label { min-width:260px; }
.inactive-lookup { opacity:.65; }
.lookup-location-map { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:4px 10px; max-height:180px; overflow:auto; }
.customer-typography > label { display:block; max-width:420px; margin-bottom:16px; }
.typography-lists { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-bottom:16px; }
.typography-lists fieldset { display:grid; grid-template-columns:repeat(3,minmax(120px,1fr)); gap:5px 12px; max-height:360px; overflow:auto; padding:12px; }
.font-picker-with-preview { display:flex; align-items:center; gap:8px; width:max-content; max-width:100%; }
.font-picker-with-preview select { flex:0 0 180px; width:180px !important; max-width:180px; }
.font-preview-button { display:inline-flex; align-items:center; justify-content:center; min-height:34px; box-sizing:border-box; cursor:pointer; }
.font-preview-button.disabled { opacity:.5; cursor:default; pointer-events:none; }
.font-image-management { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:330px; }
.font-image-management img { width:150px; height:70px; object-fit:contain; border:1px solid var(--border); border-radius:4px; background:var(--surface-alt); }
.file-input-button { position:relative; overflow:hidden; cursor:pointer; }
.file-input-button input[type=file] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.font-preview-dialog { width:min(760px,92vw); max-height:88vh; display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; color:var(--text); border:1px solid var(--border); border-radius:7px; background:var(--surface); box-shadow:0 22px 80px rgb(0 0 0 / 40%); }
.font-preview-dialog > header, .font-preview-dialog > footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--border); }
.font-preview-dialog > footer { justify-content:flex-end; border-top:1px solid var(--border); border-bottom:0; }
.font-preview-dialog h2 { margin:0; }
.font-preview-image { min-height:220px; overflow:auto; display:grid; place-items:center; padding:22px; background:var(--surface-alt); }
.font-preview-image img { max-width:100%; max-height:60vh; object-fit:contain; }
.theme-dark .font-preview-dialog, html[data-app-theme="dark"] .font-preview-dialog { color:var(--text); background:#202a33; }
.theme-dark .font-preview-image, html[data-app-theme="dark"] .font-preview-image { background:#18222b; }
.theme-high-contrast .font-preview-dialog, html[data-app-theme="high-contrast"] .font-preview-dialog { color:#fff; border:2px solid #fff; background:#000; }
.theme-high-contrast .font-preview-image, html[data-app-theme="high-contrast"] .font-preview-image { background:#000; }
.item-single-line-panel { margin:18px 0; border:1px solid var(--border); border-radius:4px; background:var(--surface); }
.item-single-line-panel > summary { padding:10px 13px; font-weight:700; cursor:pointer; }
.item-single-line-list { display:grid; gap:12px; }
.item-single-line-row { display:grid; grid-template-columns:minmax(220px,1.5fr) auto minmax(140px,.7fr) minmax(150px,.8fr) minmax(220px,1fr) auto; gap:10px; align-items:end; padding-bottom:12px; border-bottom:1px solid var(--border); }
.item-single-line-row:last-child { padding-bottom:0; border-bottom:0; }
.item-single-line-row > label:first-child { display:grid; gap:5px; }

/* Tech support */
.tech-support-heading, .tech-support-card-heading, .tech-support-actions, .support-status-panel, .support-attachment-entry { display: flex; align-items: center; gap: 12px; }
.tech-support-heading, .tech-support-card-heading { justify-content: space-between; }
.tech-support-heading h1, .tech-support-card-heading h2 { margin: 0; }
.tech-support-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 12px; }
.tech-support-toolbar label { min-width: 220px; }
.tech-support-fields { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(130px, .7fr); gap: 12px; }
.tech-support-description, .support-reply-editor textarea { width: 100%; min-height: 130px; resize: vertical; }
.support-status-panel { flex-wrap: wrap; }
.support-status-panel h2 { margin-right: auto; }
.support-attachment-entry { flex-wrap: wrap; margin-top: 10px; }
.support-attachment-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0; }
.support-message { box-sizing: border-box; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface, #fff); }
.support-message.ple-message { border-left: 5px solid #2d6f9f; }
.support-message.customer-message { border-left: 5px solid #749a41; }
.support-message header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.support-message header span { color: var(--muted); }
.support-message header button { margin-left: auto; }
.support-message p { margin-bottom: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-reply-editor { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.support-audit { margin-top: 14px; }
.support-audit summary { cursor: pointer; font-weight: 700; }
.tech-support-actions { justify-content: flex-end; margin-top: 12px; }
.status-pill.support-status-1 { background: #1f5f90; color: #fff; }
.status-pill.support-status-2 { background: #765400; color: #fff; }
.status-pill.support-status-3 { background: #70427b; color: #fff; }
.status-pill.support-status-4 { background: #91410f; color: #fff; }
.status-pill.support-status-5 { background: #3f5962; color: #fff; }

.theme-dark .support-message, html[data-app-theme="dark"] .support-message { background: var(--surface); color: var(--text); }
.theme-high-contrast .support-message, html[data-app-theme="high-contrast"] .support-message { background: #000 !important; background-image: none !important; color: #fff !important; }
.theme-dark .tech-support-report-card, .theme-dark .support-conversation, .theme-dark .support-status-panel,
.theme-high-contrast .tech-support-report-card, .theme-high-contrast .support-conversation, .theme-high-contrast .support-status-panel { color: var(--text); }

@media (max-width: 760px) {
    .tech-support-fields { grid-template-columns: 1fr; }
    .support-message { margin-left: 0 !important; width: 100% !important; }
}
.file-review-controls label { display: inline-flex; align-items: center; gap: 4px; }
.file-review-controls input[type=radio], .suggested-color-review input[type=radio] { width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; flex: 0 0 14px; transform: none; }
.pending-file-card { display: inline-grid; margin: 0; }
.review-note { min-width: 220px; }
.review-event-list { margin-top: 12px; }

.theme-preference { display: grid; grid-template-columns: 180px 260px; align-items: end; gap: 18px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.theme-preference h2 { margin: 0 0 6px; }

.theme-light, html[data-app-theme="light"] {
    color-scheme: light;
    --blue: #1769aa; --blue-dark: #164f86; --border: #cbd6e2; --surface: #ffffff; --surface-alt: #eef4f9; --text: #152332; --muted: #596b7d; --danger: #b42318;
}
.theme-dark, html[data-app-theme="dark"] {
    color-scheme: dark;
    --blue: #69aee8; --blue-dark: #102a43; --border: #526170; --surface: #252d35; --surface-alt: #171d23; --text: #edf2f7; --muted: #b8c4cf; --danger: #ff9187;
}
.theme-high-contrast, html[data-app-theme="high-contrast"] {
    color-scheme: dark;
    --blue: #00ffff; --blue-dark: #000000; --border: #ffffff; --surface: #000000; --surface-alt: #000000; --text: #ffffff; --muted: #ffffff; --danger: #ff4d4d;
}

html[data-app-theme="dark"] body, html[data-app-theme="high-contrast"] body { background: var(--surface-alt); color: var(--text); }
.theme-dark input, .theme-dark select, .theme-dark textarea, .theme-dark button:not(.primary-action-button),
.theme-dark .thread-picker, .theme-dark .item-editor, .theme-dark .dss-finder,
html[data-app-theme="dark"] .k-popup, html[data-app-theme="dark"] .k-list, html[data-app-theme="dark"] .k-window,
html[data-app-theme="dark"] .k-input, html[data-app-theme="dark"] .k-button:not(.k-primary) { color: var(--text); border-color: var(--border); background: var(--surface); }
.theme-dark label, .theme-dark .hide-filter-group legend { color: var(--text); }
.theme-dark .item-table th, .theme-dark .run-order-table th, .theme-dark .thread-color-table th, .theme-dark .address-panels summary { color: var(--text); background: #34414d; }
.theme-dark .order-header { background: rgb(37 45 53 / 97%); }
.theme-dark .filter-bar, .theme-dark .form-section, .theme-dark .address-panels details, .theme-dark .operational-section { background: var(--surface); }
.theme-dark .dss-customer-tree, .theme-dark .thread-picker-search { background: #1d252d; }
.theme-dark .validation-message { color: #ffb4ad; background: #481b19; border-color: #a7534d; }
.theme-dark .success-message { color: #b8f2c7; background: #173c24; border-color: #4b8b5c; }

.theme-high-contrast *, html[data-app-theme="high-contrast"] .k-popup * { text-shadow: none !important; }
.theme-high-contrast input, .theme-high-contrast select, .theme-high-contrast textarea, .theme-high-contrast button,
.theme-high-contrast .thread-picker, .theme-high-contrast .item-editor, .theme-high-contrast .dss-finder,
.theme-high-contrast .filter-bar, .theme-high-contrast .form-section, .theme-high-contrast .address-panels details, .theme-high-contrast .operational-section,
html[data-app-theme="high-contrast"] .k-popup, html[data-app-theme="high-contrast"] .k-list, html[data-app-theme="high-contrast"] .k-window,
html[data-app-theme="high-contrast"] .k-input, html[data-app-theme="high-contrast"] .k-button { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast label, .theme-high-contrast .muted, .theme-high-contrast .hide-filter-group legend { color: #fff; }
.theme-high-contrast a { color: #00ffff; text-decoration: underline; }
.theme-high-contrast .top-bar { border-bottom: 2px solid #fff; }
.theme-high-contrast .item-table th, .theme-high-contrast .run-order-table th, .theme-high-contrast .thread-color-table th, .theme-high-contrast .address-panels summary { color: #000; background: #fff; }
.theme-high-contrast :focus-visible { outline: 3px solid #ffff00 !important; outline-offset: 2px !important; }

/* Dark-theme coverage for native controls and Telerik's Default-theme components. */
.theme-dark .status-workflow-panel { color: var(--text); border-color: var(--border); background: #202a33; }
.theme-dark .module-availability, .theme-dark .replying-to { color: var(--text); background: #202f3c; }
.theme-dark .logistics-card, .theme-dark .logistics-entry-form, .theme-dark .logistics-record,
.theme-dark .note-entry, .theme-dark .audit-section, .theme-dark .audit-event { color: var(--text); border-color: var(--border); background: var(--surface); }
.theme-dark .logistics-card > summary, .theme-dark .notes-card > summary,
.theme-dark .audit-section > details > summary { color: var(--text); background: #18222b; }
.theme-dark .compact-entry-table th { color: var(--text); background: #34414d; }
.theme-dark .compact-entry-table td { color: var(--text); background: var(--surface); }
.theme-dark .entry-row { background: #202a33; }
.theme-dark .note-entry .checkbox-line, .theme-dark .note-attachment-controls .checkbox-line { color: var(--text); }
.theme-dark .file-upload-button { color: var(--text); border-color: #718091; background: #303b46; }
.theme-dark .file-upload-button:hover { background: #3a4855; }
.theme-dark .file-upload-button.disabled,
.theme-dark .file-upload-button:has(input:disabled) { color: #8f9ba7; border-color: #495764; background: #252e37; opacity: 1; cursor: default; }
.theme-dark .attached-file-card, .theme-dark .pending-file-card { color: var(--text); border-color: var(--border); background: #202a33; }
.theme-dark .attached-file-card strong, .theme-dark .attached-file-card span,
.theme-dark .file-workflow-card strong, .theme-dark .file-workflow-card span { color: var(--text); }
.theme-dark .order-file-thumbnail { border-color: #718091; background: #18222b; }
.theme-dark .review-event-list th { color: var(--text); background: #34414d; }
.theme-dark .review-event-list td { color: var(--text); background: var(--surface); }
.theme-dark .grid-print-link, .theme-dark .danger-button,
.theme-dark .item-actions button, .theme-dark .section-heading button, .theme-dark .icon-button,
.theme-dark .compact-note-edit, .theme-dark .save-review-button,
.theme-dark .logistics-card button:not(.primary-button) { color: var(--text); border: 1px solid #718091; background: #303b46; }
.theme-dark .grid-print-link:hover, .theme-dark .danger-button:hover,
.theme-dark .item-actions button:hover, .theme-dark .section-heading button:hover,
.theme-dark .compact-note-edit:hover, .theme-dark .save-review-button:hover { background: #3a4855; }
.theme-dark .danger-button { color: #ffaaa3; }
.theme-dark .thread-color-table tbody tr { color: var(--text); background: var(--surface); }
.theme-dark .thread-color-table tbody tr:hover { color: var(--text); background: #304354; }
.theme-dark .thread-color-table tbody tr.thread-color-selected,
.theme-dark .thread-color-table tbody tr.thread-color-selected:hover { color: #fff; background: #315f87; }
.theme-dark .thread-color-table tbody tr.thread-color-selected td { color: #fff; }
.theme-dark .thread-color-table tbody tr.thread-color-selected .machine-color { color: #ffd166; }

html[data-app-theme="dark"] .k-grid { color: var(--text) !important; border-color: var(--border) !important; background: var(--surface) !important; }
html[data-app-theme="dark"] .k-grid-header, html[data-app-theme="dark"] .k-grid-header-wrap,
html[data-app-theme="dark"] .k-grid .k-table-th, html[data-app-theme="dark"] .k-grid .k-header,
html[data-app-theme="dark"] .k-grid .k-filter-row { color: var(--text) !important; border-color: var(--border) !important; background: #34414d !important; }
html[data-app-theme="dark"] .k-grid-content, html[data-app-theme="dark"] .k-grid-content-locked,
html[data-app-theme="dark"] .k-grid .k-table, html[data-app-theme="dark"] .k-grid .k-grid-container { color: var(--text) !important; background: var(--surface) !important; }
html[data-app-theme="dark"] .k-grid .k-table-row, html[data-app-theme="dark"] .k-grid tbody tr,
html[data-app-theme="dark"] .k-grid .k-master-row { color: var(--text) !important; background: var(--surface) !important; }
html[data-app-theme="dark"] .k-grid .k-alt, html[data-app-theme="dark"] .k-grid tbody tr:nth-child(even) { background: #202a33 !important; }
html[data-app-theme="dark"] .k-grid .k-table-td, html[data-app-theme="dark"] .k-grid td { color: var(--text) !important; border-color: #3f4d5a !important; background: transparent !important; }
html[data-app-theme="dark"] .k-grid tbody tr:hover { background: #304354 !important; }
html[data-app-theme="dark"] .k-grid .k-grid-pager, html[data-app-theme="dark"] .k-grid .k-pager-wrap { color: var(--text) !important; border-color: var(--border) !important; background: #202a33 !important; }
html[data-app-theme="dark"] .k-grid input, html[data-app-theme="dark"] .k-grid .k-input,
html[data-app-theme="dark"] .k-grid .k-input-inner { color: var(--text) !important; border-color: #718091 !important; background: #202a33 !important; }
html[data-app-theme="dark"] .k-grid .k-button { color: var(--text) !important; border-color: #718091 !important; background: #303b46 !important; }
html[data-app-theme="dark"] .k-grid .k-button:hover { background: #3a4855 !important; }

/* Dark-theme action emphasis. */
.theme-dark .grid-delete-button, .theme-dark .danger-button,
.theme-dark .status-cancel-button,
html[data-app-theme="dark"] .grid-delete-button,
html[data-app-theme="dark"] .danger-button,
html[data-app-theme="dark"] .status-cancel-button { color: #ff9187 !important; }
.theme-dark .grid-delete-button:hover, .theme-dark .danger-button:hover,
.theme-dark .status-cancel-button:hover,
html[data-app-theme="dark"] .grid-delete-button:hover,
html[data-app-theme="dark"] .danger-button:hover,
html[data-app-theme="dark"] .status-cancel-button:hover { color: #ffb4ad !important; }
.theme-dark .save-action-button, .theme-dark .save-review-button, .theme-dark .status-update-button,
html[data-app-theme="dark"] .save-action-button,
html[data-app-theme="dark"] .save-review-button,
html[data-app-theme="dark"] .status-update-button { color: #fff !important; border-color: #4f8b68 !important; background: #2f6f4e !important; }
.theme-dark .save-action-button:hover, .theme-dark .save-review-button:hover, .theme-dark .status-update-button:hover,
html[data-app-theme="dark"] .save-action-button:hover,
html[data-app-theme="dark"] .save-review-button:hover,
html[data-app-theme="dark"] .status-update-button:hover { color: #fff !important; background: #3c8560 !important; }
.theme-dark .save-action-button:disabled, .theme-dark .save-review-button:disabled, .theme-dark .status-update-button:disabled,
html[data-app-theme="dark"] .save-action-button:disabled,
html[data-app-theme="dark"] .save-review-button:disabled,
html[data-app-theme="dark"] .status-update-button:disabled { color: #c5d7cc !important; border-color: #425c4d !important; background: #30483a !important; }
.theme-dark .status-pill,
html[data-app-theme="dark"] .status-pill { color: #fff; background: #174b73; }
.theme-dark .user-logo-upload-button,
html[data-app-theme="dark"] .user-logo-upload-button { color: var(--text); border-color: #718091; background: #303b46; }
.theme-dark .user-logo-upload-button:hover,
html[data-app-theme="dark"] .user-logo-upload-button:hover { background: #3a4855; }
.theme-dark .password-reset-dialog,
html[data-app-theme="dark"] .password-reset-dialog { color: var(--text); border: 1px solid var(--border); background: #202a33; }
.theme-dark .password-reset-dialog .thread-picker-header,
.theme-dark .password-reset-dialog .thread-picker-footer,
html[data-app-theme="dark"] .password-reset-dialog .thread-picker-header,
html[data-app-theme="dark"] .password-reset-dialog .thread-picker-footer { color: var(--text); border-color: var(--border); background: #18222b; }
.theme-dark .password-reset-dialog .user-editor-body,
html[data-app-theme="dark"] .password-reset-dialog .user-editor-body { color: var(--text); background: #202a33; }
.theme-dark .simple-design-card,
html[data-app-theme="dark"] .simple-design-card { color: var(--text); border-color: #627282; background: #202a33; }
.theme-dark .simple-design-card.selected,
html[data-app-theme="dark"] .simple-design-card.selected { color: #fff; border-color: #69aee8; background: #243c50; box-shadow: 0 0 0 1px rgb(105 174 232 / 35%); }
.theme-dark .simple-design-card .simple-design-radio,
.theme-dark .simple-design-card .simple-design-description,
.theme-dark .simple-design-card .simple-design-size,
.theme-dark .simple-design-card > label,
html[data-app-theme="dark"] .simple-design-card .simple-design-radio,
html[data-app-theme="dark"] .simple-design-card .simple-design-description,
html[data-app-theme="dark"] .simple-design-card .simple-design-size,
html[data-app-theme="dark"] .simple-design-card > label { color: inherit; }
.theme-dark .simple-design-image,
html[data-app-theme="dark"] .simple-design-image { color: #394655; background: #fff; }

/* High-contrast coverage: black work areas, white headings, cyan selection. */
.theme-high-contrast .order-header, .theme-high-contrast .status-workflow-panel,
.theme-high-contrast .logistics-card, .theme-high-contrast .logistics-entry-form,
.theme-high-contrast .logistics-record, .theme-high-contrast .note-entry,
.theme-high-contrast .audit-section, .theme-high-contrast .audit-event,
.theme-high-contrast .attached-file-card, .theme-high-contrast .pending-file-card,
.theme-high-contrast .file-workflow-card { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast .module-availability, .theme-high-contrast .replying-to,
.theme-high-contrast .validation-message, .theme-high-contrast .success-message { color: #fff; border: 2px solid #fff; background: #000; }
.theme-high-contrast .simple-design-card { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast .simple-design-card.selected { color: #fff; border-color: #00ffff; background: #00343b; }
.theme-high-contrast .simple-design-card .simple-design-radio,
.theme-high-contrast .simple-design-card .simple-design-description,
.theme-high-contrast .simple-design-card .simple-design-size,
.theme-high-contrast .simple-design-card > label { color: inherit; }
.theme-high-contrast .simple-design-image { color: #000; border-color: #000; background: #fff; }

.sewout-markup-button { min-height: 32px; padding: 5px 10px; border: 1px solid #aeb8c3; border-radius: 3px; background: white; cursor: pointer; }
.markup-ready { color: #1d6832; font-size: 12px; font-weight: 700; }
.sewout-markup-shade { z-index: 1500; }
.sewout-markup-dialog { width: min(1120px, 96vw); height: min(900px, 95vh); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; color: var(--text); background: var(--surface); box-shadow: 0 22px 80px rgb(0 0 0 / 45%); }
.sewout-markup-toolbar { display: flex; align-items: end; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.sewout-markup-toolbar label { width: auto; min-width: 130px; }
.sewout-markup-toolbar input[type=color] { width: 72px; padding: 2px; }
.sewout-markup-toolbar input[type=range] { width: 220px; }
.sewout-markup-canvas-wrap { min-height: 0; display: grid; place-items: center; overflow: auto; padding: 16px; background: #6d7781; }
.sewout-markup-canvas-wrap canvas { display: block; max-width: 100%; max-height: 100%; background: white; box-shadow: 0 2px 14px rgb(0 0 0 / 35%); cursor: crosshair; touch-action: none; }
.review-event-list td:last-child { white-space: nowrap; }
.review-markup-thumbnail { width: 56px; height: 56px; display: block; margin-bottom: 4px; border: 1px solid var(--border); background: white; object-fit: contain; }
.theme-dark .sewout-markup-button { color: var(--text); border-color: #718091; background: #303b46; }
.theme-dark .sewout-markup-button:hover { background: #3a4855; }
.theme-dark .markup-ready { color: #85d5a4; }
.theme-high-contrast .sewout-markup-button { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast .markup-ready { color: #00ff7f; }
.theme-high-contrast .logistics-card > summary, .theme-high-contrast .notes-card > summary,
.theme-high-contrast .audit-section > details > summary { color: #fff; background: #000; }
.theme-high-contrast .item-table th, .theme-high-contrast .run-order-table th,
.theme-high-contrast .compact-entry-table th, .theme-high-contrast .review-event-list th,
.theme-high-contrast .thread-color-table th { color: #000; border-color: #000; background: #fff; }
.theme-high-contrast .item-table td, .theme-high-contrast .run-order-table td,
.theme-high-contrast .compact-entry-table td, .theme-high-contrast .review-event-list td { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast .note-entry .checkbox-line, .theme-high-contrast .note-attachment-controls .checkbox-line,
.theme-high-contrast .attached-file-card strong, .theme-high-contrast .attached-file-card span,
.theme-high-contrast .file-workflow-card strong, .theme-high-contrast .file-workflow-card span { color: #fff; }
.theme-high-contrast .note-block, .theme-high-contrast .note-block.internal-note { color: #fff !important; border-color: #fff; border-left-color: #00ffff; background-color: #000 !important; background-image: none !important; }
.theme-high-contrast .note-block time, .theme-high-contrast .note-block small { color: #fff; }
.theme-dark .changed-since-view { outline-color:#ffc928; box-shadow:0 0 0 4px rgba(255,201,40,.22); }
.theme-high-contrast .changed-since-view { outline:4px solid #ffff00 !important; box-shadow:none; }
.theme-high-contrast .file-upload-button, .theme-high-contrast .grid-print-link,
.theme-high-contrast .danger-button, .theme-high-contrast .item-actions button,
.theme-high-contrast .section-heading button, .theme-high-contrast .icon-button,
.theme-high-contrast .compact-note-edit, .theme-high-contrast .save-review-button,
.theme-high-contrast .logistics-card button:not(.primary-button) { color: #fff; border: 1px solid #fff; background: #000; }
.theme-high-contrast .file-upload-button:hover, .theme-high-contrast .grid-print-link:hover,
.theme-high-contrast .danger-button:hover, .theme-high-contrast .item-actions button:hover,
.theme-high-contrast .section-heading button:hover { color: #000; background: #fff; }
.theme-high-contrast .file-upload-button.disabled,
.theme-high-contrast .file-upload-button:has(input:disabled) { color: #000; border: 2px solid #fff; background: #aaa; opacity: 1; cursor: default; }
.theme-high-contrast .order-file-thumbnail { border: 2px solid #fff; background: #000; }
.theme-high-contrast .status-pill { color: #000; background: #fff; }
.theme-high-contrast .order-file-status.status-accepted { color: #58ff8a; }
.theme-high-contrast .order-file-status.status-pending { color: #ffff00; }
.theme-high-contrast .thread-color-table tbody tr { color: #fff; background: #000; }
.theme-high-contrast .thread-color-table tbody tr:hover { color: #fff; background: #262626; }
.theme-high-contrast .thread-color-table tbody tr.thread-color-selected,
.theme-high-contrast .thread-color-table tbody tr.thread-color-selected:hover { color: #fff; outline: 3px solid #00ffff; outline-offset: -3px; background: #00434d; }
.theme-high-contrast .thread-color-table tbody tr.thread-color-selected td { color: #fff; }
.theme-high-contrast .thread-color-table tbody tr.thread-color-selected .machine-color { color: #ffff00; }

/* DSS column chooser uses the active application palette rather than its original light-only surfaces. */
.theme-dark .column-images-dialog,
.theme-dark .column-images-scroll,
.theme-dark .column-images-dialog .thread-picker-header,
.theme-dark .column-images-dialog .thread-picker-footer { color: var(--text); border-color: var(--border); background: #202a33; }
.theme-dark .column-image-tile { color: var(--text); border-color: #718091; background: #18222b; }
.theme-dark .column-image-tile.selected { color: #fff; border-color: #69b7ff; background: #28445c; }
.theme-dark .column-image-tile > header,
.theme-dark .column-image-tile .column-dst-image > span { color: inherit; }
.theme-dark .column-dst-image button,
.theme-dark .missing-column-image { color: var(--text); border-color: #718091; background: #303b46; }

.theme-high-contrast .column-images-dialog,
.theme-high-contrast .column-images-scroll,
.theme-high-contrast .column-images-dialog .thread-picker-header,
.theme-high-contrast .column-images-dialog .thread-picker-footer,
.theme-high-contrast .column-image-tile { color: #fff; border-color: #fff; background: #000; }
.theme-high-contrast .column-image-tile.selected { color: #fff; border-color: #00ffff; background: #00343b; }
.theme-high-contrast .column-image-tile > header,
.theme-high-contrast .column-image-tile .column-dst-image > span { color: inherit; }
.theme-high-contrast .column-dst-image button,
.theme-high-contrast .missing-column-image { color: #fff; border-color: #fff; background: #000; }

.panel-collection { position:relative; padding-top:18px; }
.panel-add-button { position:absolute; top:8px; right:12px; }
.item-subpanel { margin:12px 0; border:1px solid var(--border); border-radius:5px; background:var(--surface); }
.item-subpanel > summary { padding:10px 12px; font-weight:700; cursor:pointer; background:#edf2f6; }
.item-subpanel-body { padding:12px; }
.panel-delete-row { display:flex; justify-content:flex-end; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); }
.history-panel { margin-top:18px; }
.art-dst-suggestions { margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
.compact-run-order-table { margin-top:8px; }
.theme-dark .item-subpanel { color:var(--text); border-color:var(--border); background:#202a33; }
.theme-dark .item-subpanel > summary { color:var(--text); background:#18222b; }
.theme-high-contrast .item-subpanel { color:#fff; border:2px solid #fff; background:#000; }
.theme-high-contrast .item-subpanel > summary { color:#fff; background:#000; border-bottom:1px solid #fff; }

html[data-app-theme="high-contrast"] .k-grid { color: #fff !important; border: 2px solid #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid-header, html[data-app-theme="high-contrast"] .k-grid-header-wrap,
html[data-app-theme="high-contrast"] .k-grid .k-table-th, html[data-app-theme="high-contrast"] .k-grid .k-header,
html[data-app-theme="high-contrast"] .k-grid .k-filter-row { color: #000 !important; border-color: #000 !important; background: #fff !important; }
html[data-app-theme="high-contrast"] .k-grid-content, html[data-app-theme="high-contrast"] .k-grid-content-locked,
html[data-app-theme="high-contrast"] .k-grid .k-table, html[data-app-theme="high-contrast"] .k-grid .k-grid-container,
html[data-app-theme="high-contrast"] .k-grid .k-table-row, html[data-app-theme="high-contrast"] .k-grid tbody tr,
html[data-app-theme="high-contrast"] .k-grid .k-master-row, html[data-app-theme="high-contrast"] .k-grid .k-alt { color: #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid .k-table-td, html[data-app-theme="high-contrast"] .k-grid td { color: #fff !important; border-color: #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid tbody tr:hover, html[data-app-theme="high-contrast"] .k-grid .k-selected { color: #fff !important; background: #00434d !important; }
html[data-app-theme="high-contrast"] .k-grid .k-grid-pager, html[data-app-theme="high-contrast"] .k-grid .k-pager-wrap { color: #fff !important; border-color: #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid input, html[data-app-theme="high-contrast"] .k-grid .k-input,
html[data-app-theme="high-contrast"] .k-grid .k-input-inner { color: #fff !important; border-color: #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid .k-button { color: #fff !important; border: 1px solid #fff !important; background: #000 !important; }
html[data-app-theme="high-contrast"] .k-grid .k-button:hover { color: #000 !important; background: #fff !important; }

@media print {
    @page { size: letter; margin: .3in; }
    html, body { min-width: 0; background: white; }
    .print-layout { min-height: 0; padding: 0; background: white; }
    .simple-order-printout { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
    .print-toolbar { display: none; }
}

@media (max-width: 1300px) {
    .address-panels { grid-template-columns: 1fr; }
    .address-grid { grid-template-columns: repeat(4, 1fr); }
    .simple-design-grid { grid-template-columns: repeat(3, minmax(150px, 230px)); }
    .multiline-text-grid { grid-template-columns: 1fr; }
}

/* Customer submission guidance and compact order information. */
.order-info-fields { grid-template-columns: minmax(180px, 240px) 150px 150px 175px 110px; align-items: end; justify-content: start; }
.order-info-fields .smartbooks-field { width: 110px; }
.required-empty,
.theme-dark .required-empty,
.theme-high-contrast .required-empty,
html[data-app-theme="dark"] .required-empty,
html[data-app-theme="high-contrast"] .required-empty { color: #2b2500 !important; border-color: #cfad28 !important; background: #fff4b8 !important; }
label.required-empty { padding: 5px 7px; border: 1px solid #cfad28; border-radius: 4px; }
.required-panel { border-color: #cfad28 !important; box-shadow: inset 0 0 0 2px rgb(255 226 92 / 45%); }
.required-choice { border-color: #dfc96d !important; box-shadow: inset 0 0 0 2px rgb(255 241 174 / 30%); }
button.required-choice, label.required-choice, input.required-choice { color: #2b2500 !important; background: #fff9d9 !important; }
.design-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 18px; align-items: start; }
.design-overview-fields { min-width: 0; }
.selected-column-preview { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; justify-self: end; }
.selected-column-preview button { padding: 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: zoom-in; }
.selected-column-preview img { display: block; width: auto; height: auto; max-width: 320px; max-height: 220px; object-fit: contain; background: white; }
.selected-column-preview .no-image { min-width: 180px; padding: 30px 16px; color: var(--muted); background: var(--surface-alt); text-align: center; }

@media (max-width: 1000px) {
    .order-info-fields { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .design-overview { grid-template-columns: 1fr; }
    .selected-column-preview { justify-self: start; }
}

/* Dialogs inherit the selected application theme, including portal surfaces. */
.user-editor, .user-editor-body, .user-editor .thread-picker-header,
.user-editor .thread-picker-footer { color: var(--text); background: var(--surface); border-color: var(--border); }
.user-editor label, .user-editor legend, .user-editor h2 { color: var(--text); }
.garment-color-option { display:flex; align-items:center; gap:8px; }
.garment-swatch { width:20px; height:20px; object-fit:cover; border:1px solid var(--border); border-radius:2px; flex:none; }

.item-size-row input[readonly] { background:var(--surface-alt); color:var(--text); }
.transfer-choice { display:flex; align-items:center; gap:15px; margin-bottom:8px; }


.garment-swatch { display:inline-block; overflow:hidden; }
.garment-swatch img { width:100%; height:100%; object-fit:cover; }
.pricing-table input { min-width:65px; width:100%; }

/* Description allocation doubled in Build 120. */

.item-primary-fields { grid-template-columns:70px minmax(110px,.55fr) minmax(160px,.7fr) minmax(110px,.55fr) minmax(220px,1.8fr) auto; }


/* Build 122: keep Qty width; Size is twice Qty, and both price fields match Qty. */
.item-size-row { grid-template-columns:85px 170px 85px 85px auto auto; }
@media (max-width:900px) { .item-size-row { grid-template-columns:80px 160px 80px 80px; } }

/* Build 123: compact order summaries and fixed customer-pricing columns. */
.order-item-size-summary { display:grid; grid-template-columns:48px 54px 90px 108px; gap:6px; width:318px; white-space:nowrap; }
.customer-pricing { --pricing-label-width:80px; --pricing-rate-width:104px; overflow-x:auto; }
.customer-pricing .pricing-customer { display:block; width:360px; }
.customer-pricing .pricing-surcharges { display:flex; gap:24px; margin:16px 0; width:max-content; }
.customer-pricing .pricing-surcharges label { display:grid; width:max-content; white-space:nowrap; }
.customer-pricing .pricing-surcharges input { width:0; min-width:100%; }
.customer-pricing .pricing-matrix { width:808px; table-layout:fixed; }
.customer-pricing .pricing-matrix th, .customer-pricing .pricing-matrix td { width:var(--pricing-rate-width); padding:8px; white-space:nowrap; }
.customer-pricing .pricing-matrix th:first-child { width:var(--pricing-label-width); white-space:normal; }
.customer-pricing .pricing-matrix input { width:100%; min-width:0; }
.customer-pricing .garment-fees-table { width:max-content; table-layout:auto; }
.customer-pricing .garment-fees-table th, .customer-pricing .garment-fees-table td { width:auto; white-space:nowrap; }
.customer-pricing .garment-fees-table input { width:0; min-width:100%; }

/* Build 124: grid size labels must not inherit the old table-cell indentation. */
.order-item-size-summary .order-item-size { padding:0; font-weight:700; color:var(--muted); }

/* Build 125: history follows the customer's proforma, with current-order controls outside it. */
.order-heading-actions { display:flex; align-items:center; gap:12px; }
.product-style-link { border:0; background:transparent; color:#1674cf; text-decoration:underline; padding:0; min-height:0; cursor:pointer; font:inherit; }
.catalog-product-popup { position:relative; width:min(950px,94vw); max-height:90vh; overflow:auto; padding:28px; border-radius:6px; background:var(--surface); color:var(--text); }
.catalog-close { position:absolute; right:12px; top:8px; font-size:24px; }
.catalog-product-images { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.catalog-product-images figure { margin:0; text-align:center; }
.catalog-product-images img { max-width:100%; max-height:65vh; object-fit:contain; }
.history-filters, .history-basket { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin:16px 0; }
.history-filters label:first-child { width:320px; }
.history-filters label:nth-child(2) { width:280px; }
.history-basket { padding:16px; background:var(--surface-alt); border:1px solid var(--border); }
.history-basket label { width:230px; }.history-basket p { flex-basis:100%;margin:0; }
.history-proforma { background:white; color:#222; border:1px solid #aaa; padding:24px; max-width:1100px; margin:24px auto; }
.history-document-header { display:flex;justify-content:space-between; gap:20px; align-items:start; }
.history-addresses { display:flex;gap:20px;margin:20px 0; }.history-addresses section { flex:1; border:1px solid #888;padding:12px; }
.history-addresses h3 { font-size:14px;border-bottom:1px solid #ccc; margin:0 0 8px; }
.history-lines { border-collapse:collapse;width:100%; }.history-lines th, .history-lines td { padding:8px;vertical-align:top; }
.history-lines thead { background:#ddd; }.history-lines>tbody>tr>td { border-bottom:1px solid #ddd; }
.history-lines>thead>tr>th:nth-last-child(-n+3), .history-lines>tbody>tr>td:nth-last-child(-n+3) { white-space:nowrap; }
.history-matrices { display:flex;flex-wrap:wrap;gap:20px; }.history-size-matrix { border-collapse:collapse; width:auto; }
.history-size-matrix th, .history-size-matrix td { border:1px solid #ddd;min-width:68px;text-align:center; }
.history-totals { width:320px;margin:24px 0 24px auto; }.history-totals div { display:flex; justify-content:space-between;border:1px solid #ddd;padding:6px; }
.history-prewrap { white-space:pre-wrap;overflow-wrap:anywhere; }
.history-reorder-review { border:1px solid var(--border);padding:12px;margin-top:12px; }
.inventory-customer { display:block;width:360px; }.inventory-settings { display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:20px 0; }
.inventory-settings label:first-child { width:240px; }.inventory-add { display:flex;flex-wrap:wrap;gap:16px;align-items:end;margin:20px 0; }
.inventory-add label { width:160px; }.inventory-table { max-width:950px; }.inventory-table td { width:auto !important; }
.item-primary-fields { grid-template-columns:100px 80px minmax(130px,.7fr) minmax(240px,1.4fr) 160px auto; }
@media print { .history-filters,.history-basket,.page-heading,.history-proforma input { display:none; }.history-proforma { border:none; } }

.history-proforma .muted { color:#555; }

/* Build 127: explicit columns avoid the general item-table size distribution. */
.lookup-entry-table { width:auto; table-layout:fixed; }
.lookup-entry-table th:first-child, .lookup-entry-table td:first-child { width:180px; }
.lookup-entry-table th:nth-child(2), .lookup-entry-table td:nth-child(2) { width:90px; }
.lookup-entry-table td:first-child input { width:180px; min-width:0; }
.lookup-entry-table td:nth-child(2) input { width:90px; min-width:0; }
.inventory-table { width:616px; max-width:100%; table-layout:fixed; }
.inventory-table .inventory-supplier-column { width:176px; }
.inventory-table .inventory-style-column, .inventory-table .inventory-color-column { width:136px; }
.inventory-table .inventory-flag-column { width:84px; }
.inventory-table th, .inventory-table td { width:auto !important; white-space:normal !important; }
.inventory-table input:not([type=checkbox]), .inventory-table select { width:100%; min-width:0; box-sizing:border-box; }
.inventory-add .inventory-supplier { width:120px; }
.inventory-add .inventory-style, .inventory-add .inventory-color { width:480px; max-width:100%; }
.inventory-settings .checkbox-line { width:auto; }
.customer-mapping-panel { margin:16px 0; border:1px solid var(--border); padding:12px; }
.customer-mapping-panel > label { width:220px; max-width:100%; }
.customer-mapping-panel p { margin:8px 0; }
.customer-pricing-button { display:inline-flex; align-items:center; margin-top:12px; text-decoration:none; }

/* Build 130: customer account controls share one row and Telerik button sizing. */
.user-editor { width:min(940px,94vw); }
.customer-mapping-panel { margin:0; }
.customer-account-actions { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap; }
.customer-account-actions > label { width:180px; max-width:100%; flex:0 0 180px; }
.customer-account-actions .k-button, .user-editor .save-action-button { height:34px; min-height:34px; box-sizing:border-box; }
.customer-account-link { text-decoration:none; white-space:nowrap; }
.lookup-management .save-action-button { height:34px; min-height:34px; }
.font-image-management .file-input-button { display:inline-flex; flex-direction:row; align-items:center; justify-content:center; min-height:34px; height:34px; margin:0; padding:0 12px; box-sizing:border-box; line-height:1; }
.font-remove-image-button { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; min-height:34px; padding:4px; border:1px solid var(--border); border-radius:4px; background:var(--surface-alt); cursor:pointer; }
.font-image-management .font-remove-image-button img { width:24px; height:24px; object-fit:contain; border:0; border-radius:0; background:transparent; }
.font-remove-image-button:hover { border-color:#cb5252; background:#fbe6e6; }
.font-remove-image-button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

/* Build 131: shared compact trash image and modern customer-page actions. */
.trash-icon-button { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; min-height:34px; padding:4px; border:1px solid var(--border); border-radius:4px; background:var(--surface-alt); cursor:pointer; box-sizing:border-box; }
.trash-icon-button img, .font-image-management .trash-icon-button img { width:16px; height:20px; object-fit:contain; border:0; border-radius:0; background:transparent; }
.trash-icon-button:hover { border-color:#cb5252; background:#fbe6e6; }
.trash-icon-button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.customer-pricing .k-button, .inventory-settings .k-button, .inventory-add .k-button { min-height:34px; }

/* Build 132: supplier/style groups keep flags and color management together. */
.inventory-groups { max-width:950px; margin:18px 0; }
.inventory-supplier-group { margin-bottom:20px; }
.inventory-supplier-group > h3 { margin:0; padding:10px 12px; background:var(--surface-alt); border:1px solid var(--border); border-radius:4px 4px 0 0; }
.inventory-style-group { padding:12px; border:1px solid var(--border); border-top:0; background:var(--surface); }
.inventory-style-heading { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; }
.inventory-style-heading > label:first-child { width:180px; }
.inventory-style-heading .checkbox-line { margin-bottom:8px; }
.inventory-style-heading .inventory-style-supplier { width:120px; }
.inventory-style-heading > .k-button { margin-left:auto; }
.inventory-color-add { display:flex; align-items:flex-end; flex-wrap:wrap; gap:8px; margin:12px 0; }
.inventory-color-add > label { width:360px; max-width:100%; }
.inventory-colors-table { width:460px; max-width:100%; margin-top:10px; table-layout:fixed; }
.inventory-colors-table th:first-child, .inventory-colors-table td:first-child { width:360px; }
.inventory-colors-table th:last-child, .inventory-colors-table td:last-child { width:70px; }
.inventory-colors-table input:not([type=checkbox]) { width:100%; min-width:0; box-sizing:border-box; }
.inventory-colors-table input[type=checkbox] { min-width:0; }
.inventory-settings > label.checkbox-line { width:auto; }

/* Build 134: original rich-text formatting stays in its own read-only document. */
.instruction-html-preview { display:block; width:100%; height:160px; min-height:72px; max-height:520px; border:0; margin:8px 0; background:#fff; }

/* Build 135 */
.font-preview-button { font-family:inherit; font-size:14px; font-weight:400; text-decoration:none; margin-top:0; padding:6px 14px; }
.tech-support-filter-bar { min-height:0; padding:8px 14px; align-items:center; }
.tech-support-filter-bar .checkbox-line { margin:0; padding:0; min-height:0; align-items:center; }
.tech-support-guidance { max-width:1000px; }
.tech-support-guidance p { margin:5px 0; }
.history-document-header { position:relative; padding-right:110px; }
.invoice-paid-label { position:absolute; right:14px; top:14px; color:#16743b; border:2px solid currentColor; padding:4px 12px; border-radius:4px; font-size:22px; font-weight:700; }
.pay-link-menu { width:90px; min-height:30px; font-size:13px; padding:4px; }
.payment-email-dialog { width:min(680px,92vw); max-height:88vh; overflow:auto; padding:22px; color:var(--text); background:var(--surface); border:1px solid var(--border); border-radius:7px; }
.payment-email-dialog footer { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

/* Build 136 */
.main-content:focus { outline:none; }
.top-bar .settings-menu { position:relative; display:block; flex:0 0 36px; width:36px; height:36px; align-self:center; margin:0; padding:0; }
.top-bar .settings-menu > summary { display:flex; align-items:center; justify-content:center; width:36px; height:36px; margin:0; padding:0; cursor:pointer; list-style:none; line-height:1; }
.top-bar .settings-menu > summary svg { display:block; flex:none; }
.settings-menu > summary::-webkit-details-marker { display:none; }
.settings-menu-panel { position:absolute; z-index:1500; right:0; top:100%; width:220px; padding:10px; border:1px solid var(--border); border-radius:6px; box-shadow:0 8px 30px #0003; background:var(--surface); color:var(--text); }
.settings-menu-panel a,.settings-menu-panel summary,.menu-build { display:block; padding:8px 12px; color:inherit; text-decoration:none; }
.top-bar .settings-menu-panel a:any-link { color:var(--text); }
.settings-menu-panel details a { padding-left:26px; }
.settings-menu-panel a:hover { background:var(--surface-alt); }
.menu-build { border-top:1px solid var(--border); font-size:12px; color:var(--muted); }
.twilio-settings { max-width:1000px; }
.template-tools { display:flex; gap:10px; align-items:end; margin:14px 0; }
.template-tools label { flex:1; min-width:0; }
.login-history-filters { flex-wrap:wrap; }
.login-history-filters label { width:190px; }
.customer-account-actions { flex-wrap:wrap; }

.form-grid .k-datepicker,.login-history-filters .k-datepicker { width:100%; max-width:100%; }
.required-empty .k-input-inner { background:#fff4b8 !important; color:#2b2500 !important; }
