/* McK Warehouse: a working system, laid out like one. A black bar with the module tabs,
   panels with a title strip, dense grids, grouped settings with Save / Cancel, a status
   bar. DOS's identity (black, copper, Montserrat, square corners). Plain CSS, no build step. */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/montserrat-var.woff2') format('woff2');
}

:root {
    --black: #000000;
    --white: #ffffff;
    --charcoal: #23272b;
    --charcoal-soft: #2f3439;
    --copper-900: #7a3f14;
    --copper-800: #9c4f1a; /* link text: AA at small sizes */
    --copper-700: #ba6124;
    --copper-500: #de752d;
    --copper-400: #f09971;
    --copper-300: #f5c2b1;
    --copper-200: #fae0d6;
    --copper-100: #fdf1ec;
    --copper-light: #d08a45; /* AA on charcoal */
    --gray-900: #1a1a1a;
    --gray-800: #3f3f3f;
    --gray-700: #5c5c5c;
    --gray-600: #7a7a7a;
    --gray-500: #9a9a9a;
    --gray-400: #c4c4c4;
    --gray-300: #dcdcdc;
    --gray-200: #ececec;
    --gray-100: #f6f6f6;
    --warm: #f5f3ef;
    --hairline: #d9d5cd;
    --good: #2f6b3f;
    --good-wash: #edf5ef;
    --critical: #b0452c;
    --critical-wash: #fbefeb;

    --sidebar: 272px;
    --ease: cubic-bezier(0.2, 0, 0.2, 1);
    --fast: 150ms;
    --font: 'Montserrat', Tahoma, 'Helvetica Neue', Arial, sans-serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    overscroll-behavior-x: none;
}

body {
    background: var(--gray-100);
    color: var(--black);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(186, 97, 36, 0.18);
}

a {
    color: var(--copper-800);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--copper-900);
}

:focus-visible {
    outline: 2px solid var(--copper-700);
    outline-offset: 2px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.icon {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------------------------------------------------------------ the bar: brand, module tabs, who */

.bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: stretch;
    gap: 20px;
    height: 46px;
    padding: 0 14px;
    background: var(--black);
    color: var(--white);
}

.bar :focus-visible {
    outline-color: var(--copper-400);
}

.bar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.bar-brand img {
    display: block;
    width: auto;
    height: 22px;
}

.bar-brand span {
    padding-left: 12px;
    border-left: 1px solid #3a3a3a;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--copper-light);
}

.bar nav {
    display: flex;
    min-width: 0;
}

.tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
}

.tabs li {
    display: flex;
}

.tabs a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    color: #cfcfcf;
}

.tabs a:hover {
    background: #161616;
    color: var(--white);
}

.tabs a.is-active {
    border-bottom-color: var(--copper-500);
    background: #1c1c1c;
    color: var(--white);
}

.bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    font-size: 12px;
    white-space: nowrap;
    color: #d6d6d6;
}

.bar-user small {
    margin-left: 6px;
    font-size: 11px;
    color: #8f8f8f;
}

.bar-right a,
.bar-right button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    color: var(--copper-400);
    cursor: pointer;
}

.bar-right a:hover,
.bar-right button:hover {
    color: var(--white);
}

.titlebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-height: 46px;
    padding: 7px 14px;
    border-bottom: 1px solid var(--gray-400);
    background: var(--white);
}

.titlebar h1 {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.main {
    padding: 12px 14px 44px;
}

.statusbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 26px;
    padding: 0 14px;
    overflow: hidden;
    border-top: 1px solid var(--gray-400);
    background: var(--gray-100);
    font-size: 11.5px;
    white-space: nowrap;
    color: var(--gray-800);
}

.statusbar-end {
    margin-left: auto;
    color: var(--gray-600);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--good);
}

.dot.is-bad {
    background: var(--critical);
}

/* ------------------------------------------------------------ panels */

.sheet {
    border: 1px solid var(--gray-400);
    background: var(--white);
}

.sheet + .sheet {
    margin-top: 12px;
}

.sheet-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 14px;
    min-height: 32px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--gray-300);
    background: var(--gray-100);
}

.sheet-head h2 {
    font-size: 12.5px;
    font-weight: 700;
}

.sheet-head p {
    font-size: 11.5px;
    color: var(--gray-700);
}

.sheet-body {
    padding: 10px;
}

.muted {
    color: var(--gray-700);
}

.lead {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

/* A group of settings, the way a desktop form draws one: a box with its name on the border. */
.group {
    min-width: 0;
    margin: 0 0 12px;
    padding: 8px 12px 12px;
    border: 1px solid var(--gray-400);
    background: var(--white);
}

.group legend {
    padding: 0 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--copper-800);
}

.group-label {
    margin: 12px 0 5px;
    font-size: 12px;
    font-weight: 600;
}

.cols-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
    align-items: start;
}

.form-rows {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 7px 10px;
    align-items: baseline;
}

.form-rows > label,
.form-rows > span {
    font-size: 12.5px;
    color: var(--gray-800);
}

.form-rows .input {
    max-width: 200px;
}

.group .hint {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--gray-700);
}

/* A list to tick from, one row each. */
.picklist {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--gray-400);
}

.picklist label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    cursor: pointer;
}

.picklist label:last-child {
    border-bottom: 0;
}

.picklist label:hover {
    background: var(--copper-100);
}

.picklist input,
.check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--black);
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-300);
}

/* ------------------------------------------------------------ grids */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.table th {
    padding: 6px 10px;
    border-right: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-400);
    background: #f0f0f0;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    color: var(--gray-900);
}

.table th a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.table th a:hover {
    color: var(--copper-800);
}

.table td {
    padding: 5px 10px;
    border-right: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.table th:last-child,
.table td:last-child {
    border-right: 0;
}

.table tbody tr:nth-child(even) {
    background: #fafafa;
}

.table tbody tr:hover {
    background: var(--copper-100);
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table .pn {
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.table .act {
    text-align: right;
}

.table .who b {
    display: block;
    font-weight: 600;
}

.table .who span {
    font-size: 11.5px;
    color: var(--gray-700);
}

.po-link {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.empty {
    padding: 22px 12px;
    color: var(--gray-700);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 7px 10px;
    border-top: 1px solid var(--gray-300);
    background: var(--gray-100);
    font-size: 12px;
    color: var(--gray-800);
}

.pager span:first-child {
    margin-right: auto;
}

.tag {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--gray-400);
    background: var(--white);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
    color: var(--gray-700);
}

.tag.is-open {
    border-color: var(--good);
    background: var(--good-wash);
    color: var(--good);
}

.tag.is-dark {
    border-color: var(--black);
    background: var(--black);
    color: var(--white);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 20px;
    margin: 0;
}

.facts dt {
    font-size: 11px;
    color: var(--gray-700);
}

.facts dd {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
}

.facts dd small {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--gray-700);
}

/* ------------------------------------------------------------ forms */

.input {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--gray-500);
    border-radius: 0;
    background: var(--white);
    font: inherit;
    font-size: 13px;
    color: var(--black);
}

.input:focus {
    outline: none;
    border-color: var(--copper-700);
    box-shadow: 0 0 0 1px var(--copper-700);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 14px;
    border: 1px solid var(--black);
    border-radius: 0;
    background: var(--black);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    color: var(--white);
    cursor: pointer;
}

.btn:hover {
    background: var(--gray-800);
    color: var(--white);
}

.btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.btn.is-quiet {
    border-color: var(--gray-500);
    background: var(--white);
    color: var(--black);
}

.btn.is-quiet:hover {
    background: var(--gray-100);
    color: var(--black);
}

.btn.is-small {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

.btn.is-off {
    border-color: var(--gray-300);
    color: var(--gray-500);
    pointer-events: none;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 24px;
}

/* Fields in a row, each with its name above it. */
.fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.fields label {
    display: grid;
    gap: 2px;
    font-size: 11.5px;
    color: var(--gray-800);
}

.fields .input {
    width: 150px;
}

.fields input[type='search'] {
    width: 270px;
}

.search {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    cursor: pointer;
}

.check.is-locked {
    color: var(--gray-600);
    cursor: default;
}

.notice {
    margin: 0 0 12px;
    padding: 7px 10px;
    border: 1px solid var(--gray-400);
    border-left: 3px solid var(--good);
    background: var(--white);
    font-size: 13px;
}

.notice.is-error {
    border-left-color: var(--critical);
    background: var(--critical-wash);
    font-weight: 600;
}

/* ------------------------------------------------------------ the workflow screens */

/* Panels and groups of a page keep one gap, alone or side by side. */
.main > .sheet,
.main > div[data-live],
.cols-2 > * {
    margin-top: 0;
    margin-bottom: 12px;
}

.main > .sheet + .sheet {
    margin-top: 0;
}

.mono {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.nowrap {
    white-space: nowrap;
}

.tabs a {
    padding: 0 12px;
    font-size: 12.5px;
}

.tabs .count {
    margin-left: 6px;
    padding: 0 5px;
    background: var(--copper-500);
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--black);
}

.bar-find input {
    width: 190px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #4a4a4a;
    border-radius: 0;
    background: #161616;
    font: inherit;
    font-size: 12px;
    color: var(--white);
}

.bar-find input::placeholder {
    color: #9a9a9a;
}

.bar-find input:focus {
    outline: none;
    border-color: var(--copper-500);
}

.tag.is-bad {
    border-color: var(--critical);
    background: var(--critical-wash);
    color: var(--critical);
}

.tag.is-warn {
    border-color: var(--copper-700);
    background: var(--copper-100);
    color: var(--copper-900);
}

.btn.is-danger {
    border-color: var(--critical);
    background: var(--critical);
}

.btn.is-danger:hover {
    background: #8f3722;
}

.input.is-small {
    height: 26px;
    font-size: 12px;
}

.inline,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.table .act .row-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.group-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.form-rows .input.mono,
.form-rows input[type='text'].input {
    max-width: 420px;
}

.sheet-body .hint,
.approvals .hint {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--gray-700);
}

.hint.is-warn {
    font-weight: 600;
    color: var(--copper-900);
}

.group .hint + .picklist {
    margin-top: 6px;
}

.facts.is-narrow {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.picklist.is-tall {
    max-height: 330px;
}

.picklist small {
    margin-left: 6px;
    font-size: 11px;
    color: var(--gray-700);
}

.table tr.is-new td {
    background: var(--copper-100);
}

.table.is-form td {
    padding: 3px 6px;
}

.table.is-form .input {
    max-width: none;
}

.notice-body {
    margin: 3px 0 0;
    font: inherit;
    font-size: 12px;
    white-space: pre-wrap;
    color: var(--gray-800);
}

/* Where a shipment or a dispatch stands: the steps of the schema in a row. */
.steps {
    display: flex;
    margin: 0;
    padding: 0;
    border: 1px solid var(--gray-400);
    background: var(--white);
    list-style: none;
}

.steps li {
    flex: 1;
    min-width: 0;
    padding: 6px 10px 7px;
    border-right: 1px solid var(--gray-300);
    border-top: 3px solid var(--gray-300);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-700);
}

.steps li:last-child {
    border-right: 0;
}

.steps li b {
    margin-right: 4px;
    color: var(--gray-600);
}

.steps li small {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
}

.steps li.is-done {
    border-top-color: var(--good);
    color: var(--black);
}

.steps li.is-done b {
    color: var(--good);
}

.steps li.is-now {
    border-top-color: var(--copper-500);
    background: var(--copper-100);
    color: var(--black);
}

.steps li.is-now b {
    color: var(--copper-800);
}

/* The scan box: one field the scanner types into, and a big answer. */
.scan > label {
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 600;
}

.scan-row {
    display: flex;
    gap: 6px;
}

.scan-input {
    flex: 1;
    height: 40px;
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.scan-input::placeholder {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.scan-extra {
    width: 150px;
    height: 40px;
}

.scan-row .btn {
    height: 40px;
}

.scan-video {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-top: 8px;
    border: 1px solid var(--gray-500);
    background: var(--black);
}

.scan-video[hidden] {
    display: none;
}

.scan-result {
    display: none;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid;
    font-size: 13px;
}

.scan-result strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.scan-result.is-ok {
    display: block;
    border-color: var(--good);
    background: var(--good);
    color: var(--white);
}

.scan-result.is-bad {
    display: block;
    border-color: var(--critical);
    background: var(--critical);
    color: var(--white);
}

.scan-log {
    max-height: 132px;
    margin: 8px 0 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    font-family: var(--mono);
    font-size: 11.5px;
}

.scan-log li {
    padding: 2px 6px;
    border-left: 3px solid var(--good);
    white-space: pre-wrap;
}

.scan-log li + li {
    margin-top: 2px;
}

.scan-log li.is-bad {
    border-left-color: var(--critical);
    background: var(--critical-wash);
}

.approvals {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-300);
}

.approvals > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.approvals > div > b {
    width: 86px;
}

.approvals small {
    color: var(--gray-700);
}

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 10px;
}

.group .photos {
    padding: 8px 0 0;
}

.photos a {
    position: relative;
    display: block;
    border: 1px solid var(--gray-400);
    background: var(--gray-100);
}

.photos img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.photos span {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 1px 6px;
    background: var(--black);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--white);
}

.sheet-head form {
    margin: 0;
}

input[type='file'] {
    max-width: 100%;
    font: inherit;
    font-size: 12px;
}

@media (max-width: 899.98px) {
    .steps {
        flex-direction: column;
    }

    .steps li {
        border-right: 0;
        border-top-width: 0;
        border-left: 3px solid var(--gray-300);
        border-bottom: 1px solid var(--gray-300);
    }

    .steps li.is-done {
        border-left-color: var(--good);
    }

    .steps li.is-now {
        border-left-color: var(--copper-500);
    }

    .bar-find input {
        width: 130px;
    }

    .scan-row {
        flex-wrap: wrap;
    }

    .scan-input {
        flex-basis: 100%;
    }
}

/* ------------------------------------------------------------ sign-in (DOS's, without the 3D board) */

.signin {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--white);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 34px;
    background: var(--charcoal);
    color: var(--white);
}

.brand-kicker {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    color: var(--copper-light);
}

.brand-mark {
    width: 200px;
    margin-top: 22px;
}

.brand-logo {
    display: block;
    width: 100%;
    height: auto;
}

.brand-rule {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--copper-light);
}

.brand-rule span {
    padding-left: 0.42em;
}

.brand-rule::before,
.brand-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--copper-700);
}

.brand-note {
    display: none;
}

.panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 20px 56px;
}

.form-wrap {
    width: 100%;
    max-width: 400px;
}

.form-wrap h1 {
    margin-bottom: 6px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.form-wrap .sub {
    margin-bottom: 24px;
    color: var(--gray-700);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-700);
}

.signin .input {
    height: 44px;
    padding: 0 12px;
    border-color: var(--hairline);
    border-radius: 2px;
    background: var(--warm);
    font-size: 15px;
}

.signin .input:focus {
    background: var(--white);
}

.input-wrap {
    position: relative;
}

.input-wrap .input {
    padding-right: 64px;
}

.reveal {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    padding: 0 12px;
    border: 0;
    border-left: 1px solid var(--hairline);
    background: none;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--gray-700);
    cursor: pointer;
}

.reveal:hover {
    color: var(--copper-800);
}

.hint {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--copper-800);
}

.signin .check {
    margin-bottom: 24px;
    white-space: normal;
    color: var(--gray-800);
}

.submit {
    width: 100%;
    height: 46px;
    border: 1px solid var(--charcoal);
    border-radius: 2px;
    background: var(--charcoal);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--white);
    cursor: pointer;
    transition: background-color var(--fast) var(--ease);
}

.submit:hover {
    background: var(--charcoal-soft);
}

.submit:disabled {
    cursor: progress;
    opacity: 0.7;
}

.signin .notice {
    border-left-width: 2px;
    border-left-color: var(--copper-700);
    border-radius: 2px;
    background: var(--warm);
}

.form-foot {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--hairline);
    font-size: 12.5px;
    color: var(--gray-700);
}

/* A page for someone signed in without a role: one sheet, centred. */
.alone {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
}

.alone .sheet {
    width: 100%;
    max-width: 480px;
    border-top: 3px solid var(--copper-700);
}

.alone img {
    display: block;
    width: 150px;
    height: auto;
    margin-bottom: 22px;
}

.alone h1 {
    margin-bottom: 8px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
}

.alone .actions {
    margin-top: 22px;
}


.signin .check {
    display: flex;
    font-size: 13px;
}

.signin .notice {
    padding: 10px 12px;
}

.alone .btn {
    height: 36px;
}

/* ------------------------------------------------------------ wide screens */

@media (min-width: 960px) {
    .signin {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        grid-template-rows: none;
    }

    .brand {
        padding: 48px 56px;
    }

    .brand-kicker {
        font-size: 11px;
    }

    .brand-mark {
        width: clamp(240px, 24vw, 340px);
        margin-top: clamp(40px, 9vh, 88px);
    }

    .brand-rule {
        margin-top: 24px;
        font-size: 12px;
    }

    .brand-note {
        display: block;
        max-width: 300px;
        margin-top: auto;
        font-size: 12.5px;
        line-height: 1.6;
        text-align: center;
        color: #a9adb1;
    }

    .panel {
        padding: clamp(72px, 18vh, 168px) 56px 56px;
    }
}

/* ------------------------------------------------------------ phones, tablets */

@media (max-width: 899.98px) {
    .bar {
        gap: 12px;
        padding: 0 10px;
    }

    .bar-brand span,
    .bar-user small {
        display: none;
    }

    .tabs a {
        padding: 0 11px;
    }

    .main {
        padding: 10px 10px 44px;
    }

    .cols-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .statusbar-end {
        display: none;
    }
}

/* A grid whose rows become stacked blocks on a phone: each row reads top to bottom. */
@media (max-width: 759.98px) {
    .bar-user {
        display: none;
    }

    .table.is-stack thead {
        display: none;
    }

    .table.is-stack tr {
        display: block;
        padding: 9px 10px;
        border-bottom: 1px solid var(--gray-300);
    }

    .table.is-stack td {
        display: block;
        padding: 1px 0;
        border: 0;
        text-align: left;
    }

    /* Stacked, a cell has lost its column heading: say what the value is. */
    .table.is-stack td[data-label]::before {
        content: attr(data-label) ' ';
        font-size: 11px;
        color: var(--gray-700);
    }

    .fields,
    .fields label,
    .fields .input,
    .fields input[type='search'] {
        width: 100%;
    }

    .form-rows {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px 0;
    }

    .form-rows > div {
        margin-bottom: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* A pack row on a PO line, its items under it. */
.table tr.pack-row td { background: #f4f1ee; border-top: 1px solid #d9d2cb; }
.table tr.pack-row small { color: #6b6b6b; font-weight: 500; }
.table .in-pack { color: #9a9a9a; margin-right: 2px; }
.table tr:target td { outline: 2px solid #b87333; outline-offset: -2px; }

/* In / Out: the direction, big enough to see from the scanner. */
.dir-switch { display: flex; gap: 0; margin-bottom: 14px; border: 1px solid #000; width: fit-content; }
.dir-switch .dir { padding: 12px 26px; font-weight: 700; font-size: 15px; color: #000; text-decoration: none; background: #fff; }
.dir-switch .dir.is-on.is-in { background: #1f7a3a; color: #fff; }
.dir-switch .dir.is-on.is-out { background: #b3261e; color: #fff; }
.piece-marks .tag.is-fake { background: #b3261e; color: #fff; }
.table tr.is-hit td { background: #fff4d6; }

/* Receive: shipments on the left, the one picked on the right. */
.split { display: grid; grid-template-columns: minmax(330px, 4fr) minmax(0, 8fr); gap: 0 12px; align-items: start; }
.split .sheet, .split .group, .split .steps { margin-top: 0; margin-bottom: 12px; }
.fields .input.is-wide { width: 250px; }
.fields .input.is-num { width: 140px; }
select.input { padding: 0 6px; }
.table .tick { width: 30px; text-align: center; }
.table .tick input { width: 15px; height: 15px; margin: 0; accent-color: var(--black); vertical-align: middle; }
.table tr.is-hit td:first-child { box-shadow: inset 3px 0 0 var(--copper-500); }
.group .hint b:empty { display: none; }
.btn.is-small:disabled { cursor: default; }
.bar-who { position: relative; }
.bar-who summary { cursor: pointer; font-weight: 600; color: var(--copper-400); }
.bar-who form { position: absolute; right: 0; top: 30px; display: flex; gap: 6px; width: 280px; padding: 10px; border: 1px solid var(--gray-400); background: var(--white); }
.bar-who .btn { color: var(--white); background: var(--black); padding: 0 12px; }
.print-frame { position: absolute; left: -9999px; width: 1px; height: 1px; border: 0; }
@media (max-width: 1099.98px) { .split { grid-template-columns: minmax(0, 1fr); } }
.main > form { margin-bottom: 12px; }
.form-rows .input.is-select { max-width: 320px; }
.dot.is-off { background: var(--gray-400); }

/* Receive: carton or bag, and the label on it. */
.scan-kinds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
    border: 1px solid var(--black);
}

.scan-kinds label {
    position: relative;
    cursor: pointer;
}

.scan-kinds input {
    position: absolute;
    opacity: 0;
}

.scan-kinds span {
    display: block;
    padding: 9px 0;
    text-align: center;
    font-weight: 600;
}

.scan-kinds input:checked + span {
    background: var(--black);
    color: var(--white);
}

.scan-kinds input:focus-visible + span {
    outline: 2px solid var(--copper-500);
    outline-offset: 2px;
}

.head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.carton {
    display: flex;
    align-items: center;
    gap: 18px;
}

.carton .qr {
    flex: none;
    width: 124px;
    height: 124px;
}

.carton strong {
    display: block;
    font-size: 34px;
    line-height: 1.1;
}

.carton .code-bar {
    display: block;
    height: 42px;
    max-width: 100%;
    margin: 6px 0 6px -2.5mm;   /* its own quiet zone */
}

.carton small {
    color: var(--gray-700);
}

.next-step {
    margin-bottom: 14px;
}

.next-step summary {
    padding: 8px 0;
    cursor: pointer;
    font-weight: 600;
}

/* Incoming and the checklist */
.table tr.sub td { padding-top: 0; color: #5c5c5c; font-size: 12px; white-space: normal; }
.table tr.sub span { display: inline-block; margin-right: 14px; }
.table tbody tr.sub, .table tbody tr.sub:hover { background: none; }
.notice.shelve { background: #000; color: #fff; border-left-color: var(--copper-500); font-size: 16px; }
.table.checklist .box { display: inline-block; width: 20px; height: 20px; line-height: 19px; border: 1.5px solid #8a8a8a; background: #fff; font-weight: 700; text-align: center; }
.table.checklist tr.is-found .box { background: #2f6b3f; border-color: #2f6b3f; color: #fff; }
.table.checklist tr.is-missing .box { background: #b0452c; border-color: #b0452c; color: #fff; }
.tick-form { display: flex; gap: 5px; align-items: center; }
.tick-form .input { width: 52px; padding: 0 6px; }
.tick-form .input.is-each { width: 84px; }
.tick-form .input.is-dc { width: 64px; }
label.btn { cursor: pointer; }
.found-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-grid figure { margin: 0; }
.photo-grid img { display: block; width: 100%; height: 130px; object-fit: cover; background: #eee; }
.photo-grid figcaption { font-size: 12px; margin: 4px 0; overflow-wrap: anywhere; }
.tick-more { display: flex; gap: 5px; margin-top: 5px; }
.tick-more form { display: none; }
.tick-more .input.is-dc { width: 60px; height: 26px; padding: 0 6px; }

/* ------------------------------------------------------------ Incoming: one block per parcel */
.parcels { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; padding: 10px; }
.parcel { display: flex; flex-direction: column; border: 1px solid var(--gray-300); border-top: 3px solid var(--gray-500); background: var(--white); }
.parcel.is-in { border-top-color: var(--copper-700); background: var(--copper-100); }
.parcel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px 4px; }
.parcel-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.parcel-tracking { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; color: var(--black); overflow-wrap: anywhere; }
a.parcel-tracking { color: var(--copper-800); text-decoration: underline; text-underline-offset: 3px; }
.parcel-code { font-family: var(--mono); font-size: 11.5px; color: var(--gray-700); }
.parcel-when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.parcel-eta { font-size: 12px; font-weight: 600; color: var(--gray-800); white-space: nowrap; }
.parcel-eta.is-late { color: var(--critical); }
.parcel-supplier { margin: 0; padding: 0 12px 8px; font-size: 13px; font-weight: 600; color: var(--gray-900); }
.parcel-parts { width: 100%; border-collapse: collapse; border-top: 1px solid var(--gray-300); font-size: 12.5px; }
.parcel-parts td { padding: 5px 12px; border-bottom: 1px solid var(--gray-200); vertical-align: baseline; }
.parcel-parts .pn { font-family: var(--mono); font-weight: 700; color: var(--black); overflow-wrap: anywhere; }
.parcel-parts .po { font-family: var(--mono); font-size: 11.5px; color: var(--gray-700); white-space: nowrap; width: 1%; }
.parcel-parts .qty { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.parcel-parts .qty small { color: var(--gray-600); font-size: 10.5px; }
.parcel-foot { margin-top: auto; padding: 6px 12px; font-size: 11.5px; color: var(--gray-700); }
@media (max-width: 759.98px) { .parcels { grid-template-columns: minmax(0, 1fr); padding: 8px; } }
.incoming-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; margin-bottom: 12px; }
.incoming-top .sheet { margin: 0; }
.incoming-top .sheet + .sheet { margin-top: 0; }
.incoming-lists .sheet + .sheet { margin-top: 12px; }
.parcels { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 899.98px) { .incoming-top { grid-template-columns: minmax(0, 1fr); } }
.pair-phone { margin-top: 12px; }
.pair-phone-body { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; }
.pair-phone-body .hint { max-width: 420px; margin: 0; color: var(--gray-700); }
.pair-phone-code { margin-top: 10px; width: 240px; }
.pair-phone-code .qr { display: block; width: 100%; height: auto; }
