.smart-shipment-manifest .k-grid-toolbar {flex-wrap:wrap;row-gap:6px}
body .k-button.document-processing-highlight {
    background: var(--app-accent-deep) !important;
    border-color: var(--app-accent-deep) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(11, 132, 184, .26), 0 0 18px rgba(11, 132, 184, .55);
}
/* site.css gives toolbar and window button colors !important precedence. */
.smart-shipment.smart-primary.k-button,.smart-window .k-button.k-button-solid-primary {
    background:var(--app-accent-deep,#145c91) !important;border-color:var(--app-accent-deep,#145c91) !important;color:#fff !important;
}
.smart-window {border-radius:12px;overflow:hidden;color:var(--app-ink);background:var(--app-surface-strong);max-height:90vh}
.smart-window .k-window-titlebar {background:var(--app-surface-strong);border-color:var(--app-border);padding:16px 24px}
.smart-window .k-window-title {font-size:20px;line-height:28px;font-weight:600;min-width:0;white-space:normal;overflow-wrap:anywhere}
.smart-window .k-window-content {padding:20px 24px;overflow:auto;min-height:0}
.smart-window .k-window-actions {flex:none}
.smart-window .k-window-actions .k-button {min-width:36px;min-height:36px}
.smart-window .smart-footer .k-button:is(:disabled,.k-disabled) {opacity:.55 !important;cursor:not-allowed}
.smart-window .k-window-footer,.smart-window .k-window-actions.k-actions {padding:0}
.smart-window .smart-title {display:inline-flex;align-items:center;gap:10px}
.smart-window .smart-title .k-icon {color:var(--app-accent-deep);font-size:22px}
.smart-window .smart-intro {color:var(--app-muted);font-size:14px;line-height:1.5;margin:0 0 18px}
.smart-window .smart-availability {display:flex;align-items:flex-start;gap:10px;padding:12px;margin:0 0 14px;background:var(--app-surface-soft);border:1px solid var(--app-border);border-radius:8px;color:var(--app-ink);font-size:14px;line-height:1.5}
.smart-window .smart-availability .k-icon {color:var(--app-accent-deep);flex:none;margin-top:3px}
.smart-window .smart-drop {min-height:192px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;
    border:1px dashed #8198ac;border-radius:12px;background:var(--app-surface-soft);gap:4px;padding:14px;text-align:center;color:var(--app-muted);font-size:14px}
.smart-window .smart-drop.has-files {min-height:120px}
.smart-window .smart-drop.has-files :is(.smart-upload-icon,small) {display:none}
.smart-window .smart-drop strong {font-size:16px;font-weight:600;color:var(--app-ink)}
.smart-window .smart-upload-icon .k-icon {font-size:34px;color:var(--app-accent-deep);margin-bottom:3px}
.smart-window .smart-drop.dragging,.smart-window .smart-drop:focus-within {border-color:var(--app-accent-deep);background:color-mix(in srgb,var(--app-accent-soft) 45%,var(--app-surface-strong))}
.smart-window .smart-browse {position:relative;display:inline-flex;align-items:center;padding:5px 14px;color:var(--app-accent-deep);font-weight:600;text-decoration:underline;
    text-underline-offset:3px;border-radius:5px;min-height:36px;cursor:pointer}
.smart-window .smart-browse input {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.smart-window :is(.smart-browse:focus-within,:focus-visible),.document-processing :focus-visible {outline:2px solid var(--app-accent-deep);outline-offset:2px}
.smart-window .smart-files {list-style:none;margin:10px 0 4px;padding:0;max-height:164px;overflow:auto}
.smart-window .smart-files li {display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--app-border)}
.smart-window .smart-file-name {flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.smart-window .smart-files button {width:36px;height:36px;font-size:20px;background:none;color:var(--app-muted);border:0}
.smart-window small,.smart-window .smart-caption,.document-processing small {display:block;color:var(--app-muted);font-size:12px;line-height:1.5}
.smart-window .smart-field {margin:18px 0 0}
.smart-window :is(.smart-field,.smart-options,.set-issue)>label {display:block;font-size:14px;font-weight:600;margin-bottom:6px}
.smart-window .smart-field .k-dropdownlist,.smart-window .smart-options .k-dropdownlist,.set-detail .k-input,.set-detail .k-dropdownlist {min-height:40px}
.smart-window .smart-advanced {margin-top:12px;padding:8px 0;display:flex;align-items:center;gap:8px;background:transparent;color:var(--app-accent-deep);border:0;font-weight:600}
.smart-window .smart-options,.set-detail .set-context {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;margin-top:12px}
.smart-window .smart-options label {display:block;font-weight:600;font-size:13px;margin-bottom:5px}
.smart-window .smart-footer {width:100%;border-top:1px solid var(--app-border);padding:14px 24px 16px;background:var(--app-surface-strong)}
.smart-window .smart-footer p {color:var(--app-muted);margin:0 0 12px;font-size:13px}
.smart-window .smart-footer>div,.document-processing .set-actions {display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.smart-window .smart-footer .k-button {min-height:40px;padding-inline:16px}
.smart-window .smart-error,.document-processing .smart-error,.document-processing .set-failed {color:#ae2731}
.document-processing {min-width:0}
.document-processing .k-tabstrip,.document-processing .k-tabstrip-content,.document-processing .app-page-surface {min-width:0;max-width:100%}
.document-processing .k-tabstrip-content {padding:16px 0;background:transparent;border:0}
.document-processing .app-page-title {font-size:24px;line-height:32px}
.document-processing .set-counters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 18px;padding:12px 4px 16px;border-bottom:1px solid var(--app-border)}
.document-processing .set-counters div {padding-inline:12px}
.document-processing .set-counters span {display:block;color:var(--app-muted);font-size:13px}
.document-processing .set-counters strong {font-size:26px;font-weight:600;font-variant-numeric:tabular-nums}
.document-processing .set-success {color:#217045}
.document-processing .set-warning {color:#82551b}
.document-processing .set-filters {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.document-processing .set-filters input {max-width:320px;min-width:0}
.document-processing .set-filters select {width:auto;min-width:145px}
.document-processing .set-filters .k-button {margin-left:auto}
.document-processing .set-grid {border:0}
.document-processing .set-grid .k-table-td,.document-processing .set-grid td {vertical-align:middle;padding:14px 10px;border-width:0 0 1px;border-color:var(--app-border);white-space:normal;overflow-wrap:anywhere}
.document-processing .set-grid tr {min-height:76px}
.document-processing .set-grid .k-grid-content {overflow-y:auto}
.document-processing .set-grid col:nth-child(1) {width:36%}
.document-processing .set-grid col:nth-child(2) {width:26%}
.document-processing .set-grid col:nth-child(3) {width:18%}
.document-processing .set-grid col:nth-child(4) {width:20%}
.document-processing .set-ref {display:flex;align-items:flex-start;gap:12px}
.document-processing .set-ref strong {font-weight:600;font-size:15px}
.document-processing .set-file-icon .k-icon {font-size:24px;color:var(--app-muted)}
.document-processing .set-ships {display:flex;gap:3px 10px;flex-wrap:wrap;font-size:13px;color:var(--app-muted)}
.document-processing a,.document-processing .set-link {color:var(--app-accent-deep);text-decoration:underline;text-underline-offset:2px}
.document-processing .set-link {background:none;border:0;padding:5px 2px;font:inherit}
.document-processing .set-status {display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:14px}
.document-processing .set-progress {height:4px;max-width:160px;margin-top:8px;background:var(--app-border);border-radius:4px;overflow:hidden}
.document-processing .set-progress::after {display:block;content:"";height:100%;width:38%;border-radius:4px;background:var(--app-accent-deep);animation:set-progress 1.8s ease-in-out infinite alternate}
@keyframes set-progress {from{transform:translateX(-95%)}to{transform:translateX(270%)}}
.document-processing .set-grid .k-grid-norecords {padding:24px;text-align:center}
.document-processing .set-grid h3,.set-detail h3 {font-size:16px;font-weight:600;line-height:24px;margin:16px 0 8px}
.set-detail .set-context>div {min-width:0}
.set-detail dt {font-size:12px;color:var(--app-muted);font-weight:400}
.set-detail dd {margin:2px 0 0}
.set-detail .set-issue {background:var(--app-surface-soft);border:1px solid var(--app-border);border-radius:8px;padding:14px;margin:8px 0 14px}
.set-detail .set-issue p {color:var(--app-muted);margin:4px 0 10px}
.set-detail .set-issue small {margin-top:8px}
.set-detail .set-issue input[type=search] {margin:6px 0}
.set-detail details {padding:12px 0;border-top:1px solid var(--app-border);overflow-wrap:anywhere}
.set-detail summary {font-weight:600;cursor:pointer}
.set-detail .set-doc {margin:8px 0}
.set-detail .set-doc a {display:inline-block;margin:3px 6px 3px 0}
.document-processing .invoice-grid col:nth-child(1) {width:33%}
.document-processing .invoice-grid col:nth-child(2) {width:21%}
.document-processing .invoice-grid col:nth-child(3) {width:20%}
.document-processing .invoice-grid col:nth-child(4) {width:26%}
.document-processing .processing-mobile-label {display:none}
.document-processing .invoice-outcome {white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:768px) {
    .document-processing.app-page-shell {grid-template-columns:minmax(0,1fr);min-width:0}
    .document-processing :is(.app-page-header,.app-page-surface,.k-tabstrip,.k-tabstrip-content,.set-filters>*) {min-width:0;max-width:100%;overflow-wrap:anywhere}
    .smart-window .smart-options {grid-template-columns:1fr}
    .document-processing .set-filters input {width:100%;max-width:none}
    .document-processing .set-grid .k-grid-header {height:1px;clip-path:inset(100%);position:absolute;overflow:hidden}
    .document-processing .set-grid .k-grid-content table,.document-processing .set-grid tbody {display:block;width:100%}
    .document-processing .set-grid colgroup {display:none}
    .document-processing .set-grid tbody tr {display:grid;grid-template-columns:minmax(0,1fr) auto;padding:12px 3px;gap:6px 10px;border-bottom:1px solid var(--app-border)}
    .document-processing .invoice-grid tbody tr {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
    .document-processing .processing-mobile-label {display:block;font-size:12px;color:var(--app-muted)}
    .document-processing .set-grid tbody td.k-table-td {padding:0 !important;border:0;display:block}
    .document-processing .set-grid :is(.k-pager-numbers-wrap,.k-pager-numbers) {min-width:0;max-width:100%;flex-wrap:wrap}
    .document-processing .set-grid .k-pager .k-button {padding:4px !important;min-width:32px}
    .document-processing .set-grid tbody td:nth-child(1),.document-processing .set-grid tbody td:nth-child(2) {grid-column:1/-1}
    .document-processing .set-grid .k-pager {flex-wrap:wrap;max-width:100%}
    .document-processing .set-grid .k-grid-content {overflow-x:hidden}
}
@media(max-width:480px) {
    .smart-window .k-window-content,.smart-window .k-window-titlebar {padding:14px 16px}
    .smart-window .smart-drop {min-height:160px}
    .smart-window .smart-footer {padding:12px 16px}
    .smart-window .smart-footer .k-button,.smart-window .smart-browse,.document-processing .set-actions button {min-height:44px}
    .document-processing .set-counters div {padding-inline:4px}
    .document-processing .set-counters strong {font-size:23px}
    .document-processing .set-grid tbody tr {grid-template-columns:minmax(0,1fr)}
    .document-processing .set-actions {justify-content:flex-start}
    .document-processing .set-filters select {max-width:100%}
    .document-processing .app-page-surface {padding:12px}
}
@media(prefers-reduced-motion:reduce) {
    .document-processing .set-progress::after,.document-processing .spinner-border {animation:none}
}
