/*
    The control library's own look. Everything is a token on :root, so a colour or a radius is
    changed in one place and every control that uses it follows - which is the whole point of the
    controls being this small.
*/

/*
    The palette is the Helpdesk site's, light and dark, so Alro's own sites read as one family. It
    replaced the WebForms colours in November 2026, once the old E-Connect site had gone and there
    was nothing left to match.
*/

:root {
    /* What the browser paints for itself - scrollbars, the caret, a date picker's calendar. Without
       this the controls stay light while the page around them goes dark. */
    color-scheme: light;

    --alro-charcoal: #2b303b;

    --alro-bg: #f4f5f7;
    --alro-surface: #ffffff;
    --alro-surface-sunk: #f2f4f7;
    /* The top bar: white like the cards in the light theme, and in the dark one a shade between the
       page and the cards, so it reads as the edge of the page rather than as one more card. */
    --alro-bar: #ffffff;
    --alro-line: #e0e2e8;
    --alro-line-strong: #cfd3db;

    --alro-text: #1f2430;
    --alro-text-dim: #6b7280;
    --alro-text-faint: #9ca3af;

    --alro-primary: #2563eb;
    --alro-primary-soft: #eff4ff;
    /* The edge of a primary-soft wash, where it needs one to hold its shape: a status pill. */
    --alro-primary-line: #c9dafb;
    --alro-success: #15803d;
    --alro-success-soft: #eefbf3;
    --alro-warning: #9d5d00;
    --alro-warning-soft: #fff4ce;
    /* A received toll line whose leg is not linked: a question for IT rather than a warning, so it
       takes a colour of its own instead of another shade of amber. */
    --alro-violet: #6d28d9;
    --alro-violet-soft: #f3effe;
    --alro-bg-violet-45: #7c3aed;
    --alro-danger: #b91c1c;
    --alro-danger-soft: #fef2f2;
    --alro-danger-line: #fecaca;

    /* The same four colours again, for the places that FILL with them rather than write in them.
       They are identical here and they part company in dark mode: the ink has to lift off a dark
       ground to stay readable, while a solid button keeps its colour and its white label. Lifting
       both put white text on a pale blue button at barely two to one. */
    --alro-primary-fill: #2563eb;
    --alro-danger-fill: #dc2626;
    --alro-success-fill: #15803d;
    --alro-line-strong-ink: #cfd3db;

    /* The location tile on a PO or truck card. Its own token because it is neither a surface nor a
       line: it is a label block that has to read as one thing at a glance down a column. */
    --alro-bg-slate-45: #5b7089;

    --alro-radius: 6px;
    --alro-radius-lg: 10px;
    --alro-gap: 8px;
    --alro-gap-lg: 14px;

    --alro-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 2px 8px rgba(16, 24, 40, .05);

    /* The Helpdesk's stack. The old site named Roboto with no webfont behind it, so it only ever
       showed where Roboto happened to be installed, and Segoe UI everywhere else. */
    --alro-font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --alro-font-size: 13px;

    /*
     * Everything below was a colour written into a rule somewhere in this sheet or in app.css. They
     * are named for the job they do and not for what they look like, because that is the only thing
     * that survives the ground flipping: dark ink has to become light ink, while a dark SURFACE -
     * the charcoal headers - has to stay exactly where it is or the white text sitting on it
     * disappears. The same red is two tokens when it paints text in one place and a button in
     * another.
     *
     * Each began as the literal it replaced. The names still say the old colour - blue-35 was the
     * WebForms blue - but the values carry the Helpdesk palette now: the blues are its accent, the
     * greys its cooler slate.
     */
    /* bg */
    --alro-bg-amber-30: #91660a;
    --alro-bg-amber-36: #b45309;
    --alro-bg-amber-83: #ffe8a8;
    --alro-bg-amber-96: #fff9ea;
    --alro-bg-amber-97: #fffaf0;
    --alro-bg-blue-35: #2563eb;
    --alro-bg-blue-38: #2563eb;
    --alro-bg-blue-93: #e6e8ee;
    --alro-bg-blue-93-b: #e6ebf3;
    --alro-bg-blue-94: #eceef2;
    --alro-bg-blue-95: #eef0f4;
    --alro-bg-blue-95-b: #eef1f6;
    --alro-bg-blue-96: #f1f3f7;
    --alro-bg-blue-96-b: #eef3fd;
    --alro-bg-blue-98: #f6f7f9;
    --alro-bg-blue-98-b: #fafbfc;
    --alro-bg-blue-98-c: #f8f9fb;
    --alro-bg-cyan-41: #17a2b8;
    --alro-bg-cyan-91: #d9edf7;
    --alro-bg-gray-27: #383e4a;
    --alro-bg-gray-38: #4b5563;
    --alro-bg-gray-46: #6b7280;
    --alro-bg-green-31: #15803d;
    --alro-bg-green-97: #f0fbf4;
    --alro-bg-light-18: rgba(255, 255, 255, .18);
    --alro-bg-light-55: rgba(255, 255, 255, .55);
    --alro-bg-navy-55: rgba(43, 48, 59, .55);
    --alro-bg-red-38: #b91c1c;
    --alro-bg-red-54: #dc2626;
    --alro-bg-red-95: #fdecea;
    --alro-bg-red-97: #fdf3f3;
    --alro-bg-shade-02: rgba(0, 0, 0, .025);
    --alro-bg-shade-45: rgba(16, 24, 40, .45);
    --alro-bg-shade-50: rgba(16, 24, 40, .5);
    --alro-bg-tint-80: rgba(235, 235, 235, .8);

    /* ink */
    --alro-ink-amber-25: #7a5a06;
    --alro-ink-amber-36: #b07908;
    --alro-ink-amber-37: #b45309;
    --alro-ink-amber-44: #b08a2e;
    --alro-ink-blue-25: #1d4ed8;
    --alro-ink-blue-35: #2563eb;
    --alro-ink-blue-38: #2563eb;
    --alro-ink-blue-50: #4f7fd6;
    --alro-ink-blue-72: #b4bccb;
    --alro-ink-blue-83: #ced4da;
    --alro-ink-blue-84: #cfd5df;
    --alro-ink-blue-98: #f8f9fa;
    --alro-ink-cyan-38: #31708f;
    --alro-ink-cyan-41: #17a2b8;
    --alro-ink-gray-00: #000000;
    --alro-ink-gray-100: #ffffff;
    --alro-ink-gray-15: #1f2430;
    --alro-ink-gray-23: #2d3340;
    --alro-ink-gray-31: #4b5563;
    --alro-ink-gray-40: #5b6472;
    --alro-ink-gray-56: #858b97;
    --alro-ink-gray-58: #8a909c;
    --alro-ink-green-27: #166534;
    --alro-ink-red-46: #c0392b;
    --alro-ink-red-54: #dc2626;

    /* line */
    --alro-line-amber-82: #f3e0ad;
    --alro-line-amber-84: #f2e2b8;
    --alro-line-blue-34: #2563eb;
    --alro-line-blue-35: #2563eb;
    --alro-line-blue-38: #2563eb;
    --alro-line-blue-62: #7aa2ea;
    --alro-line-blue-76: #b8c1cf;
    --alro-line-blue-77: #b8c1cf;
    --alro-line-blue-85: #dadee6;
    --alro-line-blue-88: #dde1e8;
    --alro-line-blue-89: #e0e2e8;
    --alro-line-blue-90: #e0e3e9;
    --alro-line-blue-90-b: #e0e3e9;
    --alro-line-blue-90-c: #e3e5ea;
    --alro-line-blue-95: #eef0f4;
    --alro-line-blue-98: #f8f9fa;
    --alro-line-cyan-41: #17a2b8;
    --alro-line-cyan-84: #bce8f1;
    --alro-line-gray-23: #2b303b;
    --alro-line-gray-46: #6b7280;
    --alro-line-gray-66: #a9a9a9;
    --alro-line-gray-71: #adb5bd;
    --alro-line-green-41: #16a34a;
    --alro-line-green-79: #b7ddc0;
    --alro-line-green-86: #cfe9d8;
    --alro-line-green-86-b: #cfe7d6;
    --alro-line-light-35: rgba(255, 255, 255, .35);
    --alro-line-red-38: #b91c1c;
    --alro-line-red-54: #dc2626;
    --alro-line-red-85: #f2c4bf;

    /* shadow */
    --alro-shadow-blue-38: #2563eb;
    --alro-shadow-blue-62: #7aa2ea;
    --alro-shadow-navy-05: rgba(16, 24, 40, .05);
    --alro-shadow-navy-05-b: rgba(16, 24, 40, .05);
    --alro-shadow-navy-06: rgba(16, 24, 40, .06);
    --alro-shadow-navy-10: rgba(16, 24, 40, .10);
    --alro-shadow-navy-10-b: rgba(16, 24, 40, .1);
    --alro-shadow-navy-12: rgba(16, 24, 40, .12);
    --alro-shadow-navy-18: rgba(37, 99, 235, .18);
    --alro-shadow-navy-18-b: rgba(16, 24, 40, .18);
    --alro-shadow-navy-22: rgba(16, 24, 40, .22);
    --alro-shadow-navy-30: rgba(37, 99, 235, .3);
    --alro-shadow-shade-20: rgba(0, 0, 0, .2);
    --alro-shadow-shade-22: rgba(0, 0, 0, .22);
    --alro-shadow-shade-28: rgba(0, 0, 0, .28);
    --alro-shadow-shade-35: rgba(12, 20, 30, .35);
}

/*
 * Dark mode, the Helpdesk's blue-slate rather than a neutral grey. Only the tokens that have to move
 * are listed: the charcoal headers are chrome, they are dark in both themes, and the white text on
 * them is still white.
 *
 * data-theme is set on <html> by the inline script in index.html before the first paint, so the
 * page never flashes white on its way to being dark.
 */
:root[data-theme="dark"] {
    color-scheme: dark;

    --alro-bg-amber-83: #574a2b;
    --alro-bg-amber-96: #352c17;
    --alro-bg-amber-97: #2a2418;
    --alro-bg-blue-93-b: #262d3a;
    --alro-bg-blue-93: #2c3039;
    --alro-bg-blue-94: #2a2e37;
    --alro-bg-blue-95-b: #222837;
    --alro-bg-blue-95: #2a2e37;
    --alro-bg-blue-96-b: #263247;
    --alro-bg-blue-96: #232833;
    --alro-bg-blue-98-b: #1b1f28;
    --alro-bg-blue-98-c: #1c2029;
    --alro-bg-blue-98: #262a33;
    --alro-bg-cyan-91: #213640;
    --alro-bg-green-97: #182a1f;
    --alro-bg-light-55: rgba(29, 32, 39, .55);
    --alro-bg-red-95: #3a1f1f;
    --alro-bg-red-97: #321c1d;
    --alro-bg-shade-02: rgba(255, 255, 255, .025);
    --alro-bg-tint-80: rgba(29, 32, 39, .8);
    --alro-bg: #14161d;
    --alro-danger-line: #5c2b2b;
    --alro-danger-soft: #3a1d1d;
    --alro-danger: #f87171;
    --alro-ink-amber-25: #fbbf24;
    --alro-ink-amber-36: #e2b65b;
    --alro-ink-amber-37: #e3985f;
    --alro-ink-amber-44: #dfc484;
    --alro-ink-blue-25: #93c5fd;
    --alro-ink-blue-35: #60a5fa;
    --alro-ink-blue-38: #7fb0f0;
    --alro-ink-blue-50: #a9c4f5;
    --alro-ink-blue-72: #6b7280;
    --alro-ink-cyan-38: #75b2d0;
    --alro-ink-cyan-41: #6ed5e5;
    --alro-ink-gray-00: #f7f8fa;
    --alro-ink-gray-15: #eceef3;
    --alro-ink-gray-23: #d0d4dc;
    --alro-ink-gray-31: #bcc1cb;
    --alro-ink-gray-40: #a9afba;
    --alro-ink-gray-56: #848b97;
    --alro-ink-gray-58: #808794;
    --alro-ink-green-27: #4ade80;
    --alro-ink-red-46: #fca5a5;
    --alro-ink-red-54: #f87171;
    --alro-line-amber-82: #5a4a26;
    --alro-line-amber-84: #54462a;
    --alro-line-blue-62: #4d6a96;
    --alro-line-blue-76: #4b515e;
    --alro-line-blue-77: #494f5c;
    --alro-line-blue-85: #3a3f4a;
    --alro-line-blue-88: #363b46;
    --alro-line-blue-89: #343842;
    --alro-line-blue-90-b: #323641;
    --alro-line-blue-90-c: #30343e;
    --alro-line-blue-90: #323641;
    --alro-line-blue-95: #282c35;
    --alro-line-blue-98: #22252d;
    --alro-line-cyan-84: #2f4a52;
    --alro-line-gray-66: #5f6570;
    --alro-line-gray-71: #555b67;
    --alro-line-green-79: #2f5a3c;
    --alro-line-green-86-b: #24512f;
    --alro-line-green-86: #24512f;
    --alro-line-red-85: #5c2b2b;
    --alro-line-strong-ink: #6b7280;
    --alro-line-strong: #434856;
    --alro-line: #343842;
    --alro-primary-soft: #1f2b45;
    --alro-primary-line: #31456e;
    --alro-primary: #60a5fa;
    --alro-success-soft: #17301f;
    --alro-success: #4ade80;
    --alro-surface-sunk: #23262e;
    --alro-surface: #1d2027;
    --alro-bar: #181a21;
    --alro-text-dim: #9aa1ad;
    --alro-text-faint: #6b7280;
    --alro-text: #e6e8ee;
    --alro-warning-soft: #433519;
    --alro-warning: #fbbf24;
    --alro-violet: #c4b5fd;
    --alro-violet-soft: #2e2550;
    --alro-bg-violet-45: #7c3aed;
}

/*
 * Two the rule above could not reach, kept apart from it so regenerating that block cannot quietly
 * undo them.
 *
 * Both are AFFORDANCES - the outline and the wash that say "let go here" - and the rule treats them
 * as what they look like instead. A line colour dark enough to be a border is left alone, which is
 * right for a border and wrong for something whose whole job is to stand out; and a pale wash
 * inverts to a dark one that landed, by arithmetic accident, at the same lightness as the column
 * behind the cards. Measured on the board: the outline came to 2.38 against the card and the wash
 * to 1.00 against the tray, which is to say the wash was not there at all.
 *
 * The outline takes the value the rule gives the same colour when it paints text, so the two stay
 * in step. The wash is lifted until it separates from BOTH the card under it and the column behind
 * it, and no further - two of the four things using it are ordinary row hovers.
 */
:root[data-theme="dark"] {
    --alro-line-blue-38: #7fb0f0;
    --alro-bg-blue-96-b: #263247;
}


/* ---- label ---- */

.alro-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--alro-text-dim);
    margin-bottom: 3px;
}

.alro-label-required {
    color: var(--alro-danger);
    margin-left: 2px;
}

/* ---- fields ---- */

.alro-field {
    display: block;
    margin-bottom: var(--alro-gap-lg);
}

.alro-input,
.alro-select {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font: inherit;
    color: var(--alro-text);
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    border-radius: var(--alro-radius);
}

.alro-input:focus,
.alro-select:focus {
    outline: 2px solid var(--alro-primary);
    outline-offset: -1px;
    border-color: var(--alro-primary);
}

.alro-input:disabled,
.alro-select:disabled {
    background: var(--alro-surface-sunk);
    color: var(--alro-text-dim);
}

.alro-input-bad {
    border-color: var(--alro-danger);
}

/* ---- a box that suggests as it is typed into ---- */

/* Looks like an input; what has been picked sits inside it as chips, ahead of where the typing goes,
   and the suggestions drop under it over whatever follows. */
.alro-suggest { position: relative; }

.alro-suggest-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    box-sizing: border-box;
    padding: 3px 6px;
    color: var(--alro-text);
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    border-radius: var(--alro-radius);
    cursor: text;
}

.alro-suggest-box:focus-within {
    outline: 2px solid var(--alro-primary);
    outline-offset: -1px;
    border-color: var(--alro-primary);
}

.alro-suggest-input {
    flex: 1 1 140px;
    min-width: 120px;
    padding: 3px 2px;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    outline: none;
}

.alro-suggest-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 4px 1px 8px;
    font-size: .85em;
    font-variant-numeric: tabular-nums;
    background: var(--alro-surface-sunk);
    border: 1px solid var(--alro-line);
    border-radius: 999px;
}

.alro-suggest-chip-text {
    max-width: 220px;
    overflow: hidden;
    color: var(--alro-text-dim);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.alro-suggest-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 10px;
    color: var(--alro-text-dim);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.alro-suggest-x:hover {
    color: var(--alro-danger);
    background: var(--alro-line);
}

.alro-suggest-spin {
    font-size: 12px;
    color: var(--alro-text-dim);
}

.alro-suggest-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 280px;
    margin: 2px 0 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    border-radius: var(--alro-radius);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.alro-suggest-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.alro-suggest-active { background: var(--alro-surface-sunk); }

.alro-suggest-value {
    flex: 0 0 auto;
    min-width: 72px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.alro-suggest-text {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--alro-text-dim);
    overflow-wrap: anywhere;
}

.alro-suggest-none {
    padding: 6px 10px;
    font-style: italic;
    color: var(--alro-text-dim);
}

/* ---- masked date and time fields ---- */

/* The icon sits inside the right edge of the box, and the box leaves it room. */
.alro-mask { position: relative; }

.alro-mask-input {
    padding-right: 26px;
    font-variant-numeric: tabular-nums;
}

.alro-mask-icon {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--alro-text-dim);
    cursor: pointer;
}

.alro-mask-icon:hover { color: var(--alro-primary); }

.alro-mask-input:disabled + .alro-mask-icon { cursor: default; opacity: .5; }

/* On the page itself rather than inside the dialog, so no card or scrolling body can clip it; the
   script places it against the field. Above every dialog and confirm, since it is always opened
   from one. No transition: it shows and hides at once. */
.alro-pop {
    position: fixed;
    z-index: 1300;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    border-radius: var(--alro-radius);
    box-shadow: 0 6px 20px var(--alro-shadow-shade-35);
    font-size: 12px;
    color: var(--alro-text);
}

.alro-pop :where(button) {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.alro-pop-cal { width: 232px; padding: 8px; }

.alro-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.alro-cal-title { font-weight: 700; }

.alro-cal-nav {
    width: 26px;
    height: 26px;
    border-radius: var(--alro-radius);
    color: var(--alro-text-dim);
}

.alro-cal-nav:hover { background: var(--alro-surface-sunk); color: var(--alro-primary); }

.alro-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.alro-cal-dow {
    padding: 2px 0 4px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--alro-text-dim);
}

.alro-cal-day {
    height: 28px;
    border-radius: var(--alro-radius);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.alro-cal-day:hover { background: var(--alro-primary-soft); }

/* Shown and pickable, only quieter: a stop on the 1st is often chosen from the month before. */
.alro-cal-other { color: var(--alro-text-faint); }

.alro-cal-today { box-shadow: inset 0 0 0 1px var(--alro-primary); }

.alro-cal-on,
.alro-cal-on:hover {
    color: var(--alro-ink-gray-100);
    background: var(--alro-primary-fill);
    font-weight: 700;
}

.alro-pop-time {
    width: 92px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.alro-time {
    display: block;
    width: 100%;
    padding: 3px 12px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* The hours are what the eye runs down; the quarters in between are the fine adjustment. */
.alro-time-hour { font-weight: 700; }

.alro-time:hover { background: var(--alro-primary-soft); }

.alro-time-on,
.alro-time-on:hover {
    color: var(--alro-ink-gray-100);
    background: var(--alro-primary-fill);
}

.alro-field-error {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--alro-danger);
}

.alro-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--alro-gap);
    cursor: pointer;
}

.alro-checkbox-off {
    color: var(--alro-text-dim);
    cursor: default;
}

/* ---- buttons ---- */

.alro-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font: inherit;
    font-weight: 600;
    color: var(--alro-text);
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    border-radius: var(--alro-radius);
    cursor: pointer;
}

.alro-button:hover:not(:disabled) {
    background: var(--alro-surface-sunk);
}

.alro-button:disabled {
    opacity: .55;
    cursor: default;
}

.alro-button-primary {
    color: var(--alro-ink-gray-100);
    background: var(--alro-primary-fill);
    border-color: var(--alro-primary);
}

.alro-button-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    background: var(--alro-primary-fill);
}

.alro-button-info {
    color: var(--alro-ink-cyan-41);
    background: transparent;
    border-color: var(--alro-line-cyan-41);
}

.alro-button-info:hover:not(:disabled) {
    color: var(--alro-ink-gray-100);
    background: var(--alro-bg-cyan-41);
}

.alro-button-danger {
    color: var(--alro-ink-gray-100);
    background: var(--alro-danger-fill);
    border-color: var(--alro-danger);
}

.alro-button-success {
    color: var(--alro-ink-gray-100);
    background: var(--alro-success-fill);
    border-color: var(--alro-success);
}

.alro-button-spinner,
.alro-loader-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: alro-spin .7s linear infinite;
}

@keyframes alro-spin {
    to { transform: rotate(360deg); }
}

.alro-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 15px;
    color: var(--alro-text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--alro-radius);
    cursor: pointer;
}

.alro-icon-button:hover:not(:disabled) {
    color: var(--alro-text);
    background: var(--alro-surface-sunk);
    border-color: var(--alro-line);
}

.alro-icon-button-on {
    color: var(--alro-primary);
    background: var(--alro-primary-soft);
    border-color: var(--alro-primary);
}

.alro-icon-button:disabled {
    opacity: .45;
    cursor: default;
}

/* ---- badges and stats ---- */

.alro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    background: var(--alro-surface-sunk);
    color: var(--alro-text-dim);
}

.alro-badge-primary { background: var(--alro-primary-soft); color: var(--alro-primary); }
.alro-badge-success { background: var(--alro-success-soft); color: var(--alro-success); }
.alro-badge-warning { background: var(--alro-warning-soft); color: var(--alro-warning); }
.alro-badge-danger { background: var(--alro-danger-soft); color: var(--alro-danger); }

.alro-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.alro-stat-value {
    font-size: 15px;
    font-weight: 700;
}

.alro-stat-primary { color: var(--alro-primary); }
.alro-stat-success { color: var(--alro-success); }
.alro-stat-warning { color: var(--alro-warning); }
.alro-stat-danger { color: var(--alro-danger); }

.alro-stat-label {
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--alro-text-dim);
}

/* A zero is dimmed rather than hidden, so the badges keep the same order on every card and the eye
   can compare one card to the next. */
.alro-stat-zero .alro-stat-value,
.alro-stat-zero .alro-stat-label {
    color: var(--alro-line-strong-ink);
}

/* ---- loader and info bar ---- */

.alro-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    color: var(--alro-text-dim);
}

.alro-infobar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: var(--alro-gap);
    border-radius: var(--alro-radius);
    border-left: 3px solid var(--alro-danger);
    background: var(--alro-danger-soft);
    color: var(--alro-danger);
}

.alro-infobar-primary { border-left-color: var(--alro-primary); background: var(--alro-primary-soft); color: var(--alro-primary); }
.alro-infobar-success { border-left-color: var(--alro-success); background: var(--alro-success-soft); color: var(--alro-success); }
.alro-infobar-warning { border-left-color: var(--alro-warning); background: var(--alro-warning-soft); color: var(--alro-warning); }

/* Info had no rule of its own, so it fell through to the base style and every "this is for admins"
   or "coming soon" bar read as an error. Said in the calm blue, like Primary. */
.alro-infobar-info { border-left-color: var(--alro-primary); background: var(--alro-primary-soft); color: var(--alro-primary); }

.alro-infobar-text {
    flex: 1;
}

/* Buttons at the end of a bar that offers something to do. */
.alro-infobar-actions {
    display: flex;
    flex-wrap: wrap;
    align-self: center;
    gap: 8px;
}

/* ---- toast ---- */

/* Fixed to the viewport, so a message costs no layout and nothing on the page moves when one
   arrives. Bottom right rather than across the top: the board's three columns and their toolbars are
   all at the top, and that is exactly where a full width bar was pushing everything down from. */
.alro-toast-dock {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: var(--alro-gap);

    /* The dock is only a position. Clicks pass straight through it to the board underneath; the
       toast itself takes its own back, so its dismiss button still works. */
    pointer-events: none;
}

.alro-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: min(420px, calc(100vw - 36px));
    padding: 10px 12px;
    border-radius: var(--alro-radius);
    border-left: 3px solid var(--alro-danger);
    background: var(--alro-danger-soft);
    color: var(--alro-danger);
    box-shadow: 0 6px 18px var(--alro-shadow-shade-28);
    animation: alroToastIn .22s cubic-bezier(.2, .8, .3, 1);
}

.alro-toast-primary { border-left-color: var(--alro-primary); background: var(--alro-primary-soft); color: var(--alro-primary); }
.alro-toast-success { border-left-color: var(--alro-success); background: var(--alro-success-soft); color: var(--alro-success); }
.alro-toast-warning { border-left-color: var(--alro-warning); background: var(--alro-warning-soft); color: var(--alro-warning); }

.alro-toast-text { flex: 1; }

.alro-toast-close {
    font-size: 16px;
    line-height: 1;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

@keyframes alroToastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Leaves the way it came. The 220ms here is the number the control waits before it clears the
   message - change one and change the other, or the toast will disappear mid-animation. */
.alro-toast-out {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .22s linear, transform .22s cubic-bezier(.2, .8, .3, 1);
}

/* Somebody who has asked for less motion still gets the message and still gets it taken away; it
   just appears and goes rather than sliding. */
@media (prefers-reduced-motion: reduce) {
    .alro-toast { animation: none; }

    .alro-toast-out { transition: none; }
}

.alro-infobar-close {
    font-size: 16px;
    line-height: 1;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ---- card ---- */

.alro-card {
    background: var(--alro-surface);
    border: 1px solid var(--alro-line);
    border-radius: var(--alro-radius-lg);
    box-shadow: var(--alro-shadow);
    margin-bottom: var(--alro-gap);
    overflow: hidden;
}

.alro-card-clickable {
    cursor: pointer;
}

.alro-card-clickable:hover {
    border-color: var(--alro-line-strong);
}

.alro-card-on {
    border-color: var(--alro-primary);
    box-shadow: 0 0 0 1px var(--alro-primary), var(--alro-shadow);
}

.alro-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--alro-gap);
    padding: 8px 10px;
    border-bottom: 1px solid var(--alro-line);
}

.alro-card-body {
    padding: 8px 10px;
}

.alro-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--alro-gap);
    padding: 6px 10px;
    font-size: 11px;
    color: var(--alro-text-dim);
    background: var(--alro-surface-sunk);
    border-top: 1px solid var(--alro-line);
}

/* ---- column ---- */

.bd-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-blue-85);
    border-radius: 6px;
    box-shadow: 0 1px 2px var(--alro-shadow-navy-06);
}

.bd-col-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--alro-ink-gray-100);
    background: var(--alro-charcoal);
    border-radius: 5px 5px 0 0;
}

.bd-col-head b {
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bd-col-count {
    padding: 0 7px;
    border-radius: 11px;
    background: var(--alro-bg-light-18);
    font-size: .72rem;
    font-weight: 700;
}

.bd-col-tools {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.bd-col-tools .alro-icon-button {
    width: 24px;
    height: 24px;
    font-size: .8rem;
    color: var(--alro-ink-blue-98);
    border-color: var(--alro-line-light-35);
}

.bd-col-tools .alro-icon-button:hover:not(:disabled) {
    color: var(--alro-ink-gray-23);
    background: var(--alro-bg-blue-98);
    border-color: var(--alro-line-blue-98);
}

.bd-col-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    background: var(--alro-bg-blue-98-b);
    border-bottom: 1px solid var(--alro-line-blue-90);
}

/* The input takes the slack so the Jump button sits to its right. Narrow enough and they cannot
   share one line - the row wraps rather than running off the edge of the column - and the min-width
   stops the input being squeezed to an unusable sliver before that happens. */
.bd-col-filter .alro-field {
    flex: 1 1 120px;
    min-width: 120px;
    margin-bottom: 0;
}

/* Both halves of the row are given the SAME explicit height rather than being left to whatever their
   own padding and line-height work out to. They are different controls with different font sizes, so
   matching the paddings alone still left the input visibly shorter than the button beside it. */
.bd-col-filter .alro-input,
.bd-col-filter .alro-select,
.bd-col-filter .alro-button {
    height: 28px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: .78rem;
    line-height: 1;
}

.bd-col-filter .alro-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.bd-col-error {
    margin: 6px 8px 0;
}

/* Recessed, so the cards read as sitting in a tray rather than floating on the panel. Each column
   scrolls on its own. */
.bd-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 7px;
    background: var(--alro-bg-blue-96);
}

.bd-empty {
    padding: 22px 10px;
    text-align: center;
    color: var(--alro-text-dim);
    font-size: .84rem;
}

.bd-loading .fa-circle-notch {
    display: block;
    margin: 0 auto 8px;
    font-size: 1.5rem;
    color: var(--alro-ink-blue-38);
}

/* ---- count badge ---- */

.bd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 11px;
    background: var(--alro-bg-blue-95);
    color: var(--alro-text-dim);
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    overflow: hidden;
}

.bd-badge i {
    flex: 0 0 auto;
}

.bd-badge-count {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.1;
}

.bd-badge-po.bd-badge-live { background: var(--alro-bg-blue-38); color: var(--alro-ink-gray-100); }
.bd-badge-fire.bd-badge-live { background: var(--alro-bg-red-54); color: var(--alro-ink-gray-100); }
.bd-badge-part.bd-badge-live { background: var(--alro-bg-amber-36); color: var(--alro-ink-gray-100); }
.bd-badge-leg.bd-badge-live { background: var(--alro-bg-violet-45); color: var(--alro-ink-gray-100); }
/* ---- toolbar and dialog ---- */

.alro-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--alro-gap);
    padding: 6px 10px;
}

.alro-toolbar-start,
.alro-toolbar-middle,
.alro-toolbar-end {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Above the drill-in panel (.mt-veil, 1050), not below it. A dialog is always opened FROM something,
   so it has to sit in front of whatever opened it - at 900 the PO options menu and every write form
   opened over the panel and rendered behind it, which looked like nothing had happened. */
.alro-dialog-veil {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--alro-bg-shade-45);
}

/* A confirm is asked BY a dialog - "replace this vendor's contacts?", "merge these trucks?" - so it
   has to clear the one that asked it. */
.alro-dialog-veil:has(> .alro-confirm) { z-index: 1200; }

.alro-dialog {
    display: flex;
    flex-direction: column;
    width: min(1080px, 100%);
    max-height: 90vh;
    background: var(--alro-surface);
    border-radius: var(--alro-radius-lg);
    box-shadow: 0 10px 40px var(--alro-shadow-shade-35);
}

.alro-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--alro-line);
}

.alro-dialog-title {
    margin: 0;
    font-size: 15px;
}

/* Every modal moves by its header ("moving a dialog" in alro.js) - the header of anything with
   role="dialog", so AlroDialog and the drill-in panel alike. touch-action hands a finger on it to the
   drag instead of to scrolling the page. */
[role="dialog"] > header {
    cursor: move;
    user-select: none;
    touch-action: none;
}

/* The title is not part of the handle, and stays selectable inside a header that is not: the truck
   and PO numbers in a title get copied. */
[role="dialog"] > header :is(h1, h2, h3, h4, h5, h6) {
    cursor: auto;
    user-select: text;
}

.alro-dialog-icon { margin-right: 8px; color: var(--alro-text-dim); }

.alro-dialog-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

.alro-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--alro-gap);
    padding: 10px 14px;
    border-top: 1px solid var(--alro-line);
}

/* ---- drill-in panel ---- */

.mt-veil {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
    background: var(--alro-bg-shade-50);
}

.mt-shell {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-height: calc(100vh - 3.5rem);
    background: var(--alro-surface);
    border-radius: 6px;
    box-shadow: 0 10px 40px var(--alro-shadow-shade-35);
}

.mt-shell-head {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--alro-line-blue-89);
}

.mt-shell-title {
    flex: 0 0 auto;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Pushes itself and the close button to the right edge, which is what leaves the trail the slack in
   the middle. */
.mt-refresh { margin-left: auto; }

.mt-crumbs {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    top: 2px;
    display: flex;
    align-items: baseline;
    font-size: .74rem;
    color: var(--alro-ink-gray-56);
    white-space: nowrap;
    overflow: hidden;
}

.mt-crumbs i {
    flex: 0 0 auto;
    margin: 0 7px;
    font-size: .58rem;
    color: var(--alro-ink-blue-83);
}

.mt-crumb { color: var(--alro-ink-blue-35); text-decoration: none; }
.mt-crumb:hover { color: var(--alro-ink-blue-25); text-decoration: underline; }
.mt-crumb-here { color: var(--alro-ink-gray-31); font-weight: 600; }

.mt-shell-body {
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* The log views scroll one very wide table, so the body becomes the flex container and the table's
   own scroller is what the sticky header sticks to. */
.mt-shell-body.mt-shell-fill {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mt-shell-body.mt-shell-fill > .mt-scroll {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
}

.mt-shell-foot {
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px;
    border-top: 1px solid var(--alro-line-blue-89);
}

.mt-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.mt-mb { margin-bottom: 16px; }

.mt-empty {
    padding: 18px;
    text-align: center;
    color: var(--alro-text-dim);
    font-size: .85rem;
}

.mt-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-id { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-toll { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-lineno { white-space: nowrap; }
.mt-dash { color: var(--alro-text-faint); }
.mt-hot { color: var(--alro-ink-red-54); margin-left: 4px; }
.mt-late { color: var(--alro-ink-red-54); font-weight: 600; }

.mt-trucks { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }

.mt-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* The drill-in's Set status picker, sized to sit in the stats row with the pills. */
.mt-setstatus.alro-field { margin-bottom: 0; }
.mt-setstatus .alro-select { padding: 1px 6px; font-size: .74rem; }

.mt-stat {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--alro-surface-sunk);
    border: 1px solid var(--alro-line);
    color: var(--alro-ink-gray-31);
    font-size: .78rem;
    white-space: nowrap;
}

.mt-stat b { margin-right: 5px; font-size: .95rem; color: var(--alro-ink-gray-15); }

.mt-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}

.mt-pill-ok { background: var(--alro-success-soft); color: var(--alro-success); }
.mt-pill-bad { background: var(--alro-danger-soft); color: var(--alro-danger); }
.mt-pill-warn { background: var(--alro-warning-soft); color: var(--alro-warning); }
.mt-pill-info { background: var(--alro-primary-soft); color: var(--alro-primary); }

.mt-fromtoll,
.mt-pd {
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--alro-warning-soft);
    color: var(--alro-warning);
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: help;
}

.mt-po-link { color: var(--alro-ink-blue-35); cursor: pointer; text-decoration: none; }
.mt-po-link:hover { text-decoration: underline; }

/* A Toll PO cell whose leg was never linked: the board's leg colour, with the likely leg as its link. */
.mt-legbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--alro-violet-soft);
    color: var(--alro-violet);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: help;
}

.mt-legbadge i { font-size: .7rem; }

.mt-legbadge a { color: inherit; text-decoration: none; cursor: pointer; }

.mt-legbadge a:hover { text-decoration: underline; }

/* The line above Jump To Truck's match list. */
.mt-find-note { margin: 0 0 8px; color: var(--alro-text-dim); font-size: .85rem; }

.mt-opt-cell { width: 34px; white-space: nowrap; padding-right: 0 !important; }

.mt-card {
    border: 1px solid var(--alro-line-blue-89);
    border-radius: 5px;
    overflow: hidden;
    height: 100%;
}

/* Wide tables scroll inside their card rather than putting a bar on the dialog around them. */
.mt-card-body { overflow-x: auto; }

.mt-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--alro-bg-blue-95);
    border-bottom: 1px solid var(--alro-line-blue-89);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--alro-ink-gray-31);
}

.mt-count {
    display: inline-block;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--alro-bg-blue-93);
    color: var(--alro-text-dim);
    font-size: .7rem;
    text-align: center;
}

.mt-table { width: 100%; margin: 0; font-size: .78rem; border-collapse: collapse; }

.mt-table thead th {
    padding: 5px 12px;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--alro-ink-gray-56);
    white-space: nowrap;
    text-align: left;
    border-bottom: 1px solid var(--alro-line-blue-89);
}

.mt-table td {
    padding: 5px 12px;
    vertical-align: middle;
    border-top: 1px solid var(--alro-line-blue-95);
}

.mt-table tbody tr:hover > td { background: var(--alro-bg-blue-98); }

.mt-history-src { margin-left: 6px; color: var(--alro-text-faint); font-size: .7rem; }

.mt-act-added, .mt-act-created { color: var(--alro-success); font-weight: 600; }
.mt-act-removed, .mt-act-deleted { color: var(--alro-danger); font-weight: 600; }
.mt-act-moved, .mt-act-merged, .mt-act-status, .mt-act-weight, .mt-act-updated { color: var(--alro-warning); font-weight: 600; }

.mt-log-table {
    width: 100%;
    font-size: .76rem;
    white-space: nowrap;
    border-collapse: collapse;
}

.mt-log-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 4px 10px;
    background: var(--alro-surface-sunk);
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--alro-text-dim);
    text-align: left;
}

.mt-log-table td { padding: 4px 10px; vertical-align: middle; border-top: 1px solid var(--alro-line-blue-95); }

/* The tint sits on the cells, not the row, because a row-level hover rule would win over it. */
.mt-log-table tr.mt-vendorfeed > td { background: var(--alro-warning-soft); color: var(--alro-warning); cursor: help; }
.mt-log-table tr.mt-vendorfeed:hover > td { background: var(--alro-bg-amber-83); }
.mt-log-table tr.mt-vendorfeed > td.mt-job { font-weight: 700; }

.mt-logged-from { padding: 8px 10px; margin: 0; color: var(--alro-text-dim); font-size: .78rem; }

.mt-hdr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.mt-hdr-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 9px 12px;
    background: var(--alro-bg-blue-98);
    border: 1px solid var(--alro-line);
    border-left: 3px solid var(--alro-line-strong);
    border-radius: 4px;
}

.mt-hdr-wide { grid-column: span 2; }
.mt-hdr-ok { border-left-color: var(--alro-line-green-41); }
.mt-hdr-bad { border-left-color: var(--alro-line-red-54); }
.mt-hdr-mute { border-left-color: var(--alro-line-gray-71); }

.mt-hdr-k {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--alro-text-dim);
    font-weight: 600;
}

.mt-hdr-v {
    font-size: .95rem;
    font-weight: 600;
    color: var(--alro-ink-gray-15);
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.mt-splitfrom {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--alro-bg-blue-95-b);
    border: 1px solid var(--alro-line-blue-88);
    color: var(--alro-ink-gray-40);
    font-size: .62rem;
    font-weight: 600;
    cursor: help;
}

.mt-splitfrom i { margin-right: 4px; font-size: .58rem; color: var(--alro-warning); }

.mt-partialrcv {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--alro-warning-soft);
    border: 1px solid var(--alro-line-amber-82);
    color: var(--alro-ink-amber-25);
    font-size: .62rem;
    font-weight: 600;
    cursor: help;
}

.mt-partialrcv i { margin-right: 4px; font-size: .58rem; }

.mt-lineopts { width: min(480px, 100%); }

.mt-optmenu { display: flex; flex-direction: column; gap: 6px; }

/* Wraps because one of the options carries a second line explaining what it sets, and a button that
   cannot wrap pushes that line out of the dialog instead of under the label. */
.mt-optbtn { width: 100%; justify-content: flex-start; flex-wrap: wrap; text-align: left; }

/* A menu is a list to read down, so every option gets the same weight whatever severity the shared
   button styles would give it. The filled blue and red made two options shout over the nine beside
   them, a disabled fill washed out into something that read as neither, and a row of tinted icons
   was no quieter - the grouping above already says which tier an option belongs to. */
.mt-optbtn.alro-button-primary,
.mt-optbtn.alro-button-danger,
.mt-optbtn.alro-button-warning,
.mt-optbtn.alro-button-success {
    color: var(--alro-text);
    background: var(--alro-surface);
    border-color: var(--alro-line-strong);
}

.mt-optbtn.alro-button-primary:hover:not(:disabled),
.mt-optbtn.alro-button-danger:hover:not(:disabled),
.mt-optbtn.alro-button-warning:hover:not(:disabled),
.mt-optbtn.alro-button-success:hover:not(:disabled) {
    filter: none;
    background: var(--alro-surface-sunk);
}

.mt-optbtn > i { color: var(--alro-text); }

.mt-admin-tag {
    margin-left: auto;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--alro-bg-red-97);
    border: 1px solid var(--alro-danger-line);
    color: var(--alro-danger);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
/* ---- list pages ---- */

/* The title over a line on what the page is for, as the Helpdesk heads its pages, with anything the
   page offers about itself on the right. */
.al-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.al-head-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.al-head-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.al-title { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.al-sub { font-size: .85rem; color: var(--alro-text-dim); }

.al-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.al-spacer { flex: 1 1 auto; }

.al-stat {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--alro-surface-sunk);
    border: 1px solid var(--alro-line);
    color: var(--alro-ink-gray-31);
    font-size: .78rem;
    white-space: nowrap;
}

.al-stat b { margin-right: 5px; font-size: .95rem; color: var(--alro-ink-gray-15); }

.al-stat-danger { background: var(--alro-danger-soft); border-color: var(--alro-danger-line); color: var(--alro-danger); }
.al-stat-danger b { color: var(--alro-danger); }
.al-stat-warning { background: var(--alro-warning-soft); border-color: var(--alro-line-amber-82); color: var(--alro-warning); }
.al-stat-warning b { color: var(--alro-warning); }
.al-stat-success { background: var(--alro-success-soft); border-color: var(--alro-line-green-86); color: var(--alro-success); }
.al-stat-success b { color: var(--alro-success); }

.al-reportbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--alro-bg-blue-98);
    border: 1px solid var(--alro-line);
    border-radius: 6px;
}

.al-reportlabel {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--alro-ink-gray-56);
}

.al-reportgroup { display: flex; }

.al-reportbtn {
    padding: 2px 10px;
    font-size: .78rem;
    color: var(--alro-text-dim);
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-strong);
    cursor: pointer;
}

.al-reportbtn:first-child { border-radius: 4px 0 0 4px; }
.al-reportbtn:last-child { border-radius: 0 4px 4px 0; }
.al-reportbtn + .al-reportbtn { border-left: 0; }
.al-reportbtn:hover { background: var(--alro-bg-blue-94); color: var(--alro-ink-gray-15); }

.al-reportbtn.active {
    color: var(--alro-ink-gray-100);
    background: var(--alro-charcoal);
    border-color: var(--alro-line-gray-23);
}

.al-reportnote { margin-left: auto; font-size: .8rem; color: var(--alro-text-dim); }

.al-blurb { margin: -4px 0 12px; font-size: .8rem; color: var(--alro-text-dim); }
.al-blurb b { color: var(--alro-ink-gray-31); }

/* Sized in the page so the table scrolls inside it and the window itself never gets a second bar. */
.al-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--alro-line-blue-89);
    border-radius: 5px;
    background: var(--alro-surface);
}

.al-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.al-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 10px;
    background: var(--alro-charcoal);
    color: var(--alro-ink-gray-100);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.al-sortable { cursor: pointer; user-select: none; }
.al-sortable:hover { background: var(--alro-bg-gray-27); }

/* Reserved whether or not this is the sorted column, so clicking between headers never shifts the
   row of them sideways. */
.al-caret { margin-left: 6px; font-size: .62rem; opacity: .65; }

.al-table td {
    padding: 4px 10px;
    vertical-align: middle;
    white-space: nowrap;
    border-top: 1px solid var(--alro-line-blue-95);
}

.al-table tbody tr.al-alt > td { background: var(--alro-bg-shade-02); }
.al-table tbody tr:hover > td { background: var(--alro-bg-blue-96-b); }

.al-table tbody tr.al-clickable { cursor: pointer; }

.al-table tbody tr.al-clickable:focus-visible {
    outline: 2px solid var(--alro-primary);
    outline-offset: -2px;
}

.al-right { text-align: right; font-variant-numeric: tabular-nums; }
.al-center { text-align: center; }

/* The heading rule above sets every heading left, and outranks .al-right on its own. */
.al-table thead th.al-right { text-align: right; }
.al-table thead th.al-center { text-align: center; }

.al-empty { padding: 24px; text-align: center; color: var(--alro-text-dim); }

/* A line already riding a truck is the one thing on these pages that is not actionable, so it is
   greyed rather than left to look like everything else. */
.al-ontruck > td { background: var(--alro-bg-blue-98); }
/* ---- list page shell and its one-offs ---- */

/* border-box, the same trap .lg-page and .bd-wrap fell into: the padding is added ON TOP of a height
   that is already the whole of the space available, so the page ends up 24px taller than the window
   and scrolls for no reason anybody can see. */
.al-wrap {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 18px 24px 12px;
}

.al-toolbar .alro-field { margin-bottom: 0; }
.al-w220 { width: 220px; }
.al-w230 { width: 230px; }
.al-w260 { width: 260px; }
.al-w300 { width: 300px; }


.al-hot { color: var(--alro-ink-red-54); font-weight: 700; }
.al-partial { color: var(--alro-warning); font-weight: 700; }
.al-unsettled { color: var(--alro-danger); font-weight: 700; }

.al-datebands {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 14px;
    border-left: 1px solid var(--alro-line-blue-89);
}

.al-dateband {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: .78rem;
    cursor: pointer;
}

.al-dateband.al-off { color: var(--alro-text-faint); cursor: default; }

.al-locknote {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border-radius: 9px;
    background: var(--alro-warning-soft);
    color: var(--alro-warning);
    font-size: .68rem;
    font-weight: 600;
}

/* ---- received lines with no linked leg (the Purchase Orders page's Unlinked Legs report) ---- */

.ul-made { color: var(--alro-success); font-weight: 600; white-space: nowrap; }

.ul-check { color: var(--alro-warning); font-weight: 600; white-space: nowrap; }

/* The open-leg count in the board's own leg colour, so the report and the vendor card's pill read as
   the same thing. */
.al-stat.ul-stat-leg { background: var(--alro-violet-soft); border-color: var(--alro-violet-soft); color: var(--alro-violet); }

.al-stat.ul-stat-leg b { color: var(--alro-violet); }

.ul-truck { white-space: nowrap; }

.ul-truck-status { margin-left: 4px; font-size: .7rem; color: var(--alro-text-dim); }

/* ---- partially delivered trucks ---- */

.pd-dialog { width: min(1180px, 100%); }

.pd-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--alro-line);
}

.pd-section {
    margin-bottom: 14px;
    border: 1px solid var(--alro-line-blue-89);
    border-radius: 5px;
    overflow: hidden;
}

.pd-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--alro-bg-blue-98);
    border-bottom: 1px solid var(--alro-line-blue-89);
    cursor: pointer;
    font-size: .85rem;
}

.pd-success .pd-icon { color: var(--alro-success); }
.pd-warning .pd-icon { color: var(--alro-warning); }

.pd-chev { width: 12px; color: var(--alro-ink-gray-56); font-size: .72rem; }

.pd-count {
    padding: 0 7px;
    border-radius: 9px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--alro-ink-gray-100);
}

.pd-success .pd-count { background: var(--alro-bg-green-31); }
.pd-warning .pd-count { background: var(--alro-bg-amber-30); }

.pd-word { color: var(--alro-text-dim); }

.pd-linecount {
    padding: 0 7px;
    border: 1px solid var(--alro-line-blue-89);
    border-radius: 9px;
    font-size: .72rem;
    color: var(--alro-ink-gray-31);
}

.pd-note { color: var(--alro-text-dim); font-size: .8rem; }

/* Capped rather than left to grow: there can be hundreds, and the dialog's own scroller would put
   the second section out of reach. */
.pd-section-body {
    max-height: 32vh;
    overflow-y: auto;
    padding: 8px;
    background: var(--alro-bg-blue-96);
}

.pd-truck {
    margin-bottom: 6px;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-blue-88);
    border-radius: 5px;
    overflow: hidden;
}

.pd-truck-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: .82rem;
}

.pd-truck-head:hover { background: var(--alro-bg-blue-98); }

.pd-meta { color: var(--alro-text-dim); font-size: .76rem; }
.pd-weight { font-variant-numeric: tabular-nums; }
.pd-vendor { color: var(--alro-ink-gray-31); }
.pd-spacer { flex: 1 1 auto; }

.pd-lines { border-top: 1px solid var(--alro-line-blue-90-b); }
.mt-noterow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-top: 1px solid var(--alro-line-blue-89);
}

.mt-noterow .alro-field { flex: 1 1 auto; margin-bottom: 0; }
.mt-noterow .alro-input { padding: 3px 8px; font-size: .8rem; }
/* ---- dragging ---- */

.bd-draggable { cursor: grab; }
.bd-draggable:active { cursor: grabbing; }

/* Selected ready lines travel together, so the selection has to be obvious before the drag starts. */
.bd-po.bd-sel {
    outline: 2px solid var(--alro-line-blue-38);
    outline-offset: -1px;
    background: var(--alro-bg-blue-96-b);
}

/* The blank space under the last card has to be droppable too, because that is where a line being
   taken off a truck is aimed. The floor is there because a percentage resolves against the list's
   height only when that height is definite, and on an empty column there is nothing to measure. */
.bd-droparea { min-height: max(140px, 100%); }

/* The trucks column's equivalent, and it exists for the opposite reason: not to CATCH a drop but to
   notice the pointer has left the cards. It has to reach the bottom of the column, because the empty
   space under the last truck is where a pointer most often ends up on its way somewhere else, and a
   truck left lit after the pointer has gone is worse than one that never lit. */
.bd-truckdrop { min-height: max(140px, 100%); }

/* A resting transparent outline on both card kinds, so the drop highlight has something to fade
   from. Outlines do not take part in layout, so nothing moves when one appears. */
.bd-truck,
.bd-po {
    outline: 2px solid transparent;
    outline-offset: -2px;
    transition: outline-color .12s linear, background-color .12s linear, opacity .12s linear;
}

/* Only a Not Ready truck takes a drop, and only the one under the pointer says so.
   Every eligible truck used to light up the instant a drag began, on the theory that saying so up
   front beat making someone try. In a column of eighteen it reads as noise rather than as an offer,
   and the one card that matters is the one the pointer is on. Eligibility still decides whether a
   drop is ACCEPTED - AcceptsDrop gates preventDefault, so a staged truck still shows a no-drop
   cursor - it just no longer decides what is drawn. Solid rather than dashed now that a single card
   wears it; dashed was a hedge for marking many at once. */
.bd-truck.bd-dropon {
    outline-color: var(--alro-line-blue-38);
    background: var(--alro-bg-blue-96-b);
}

/* The card being carried dims where it sits, so the column still shows where it came from while the
   browser's own translucent preview shows where it is going. Opacity only: a transform would be
   clipped by the column's overflow and would pull the source out from under the pointer.
   The fade is not decoration. Chromium snapshots the drag preview one frame after the dragstart
   handler returns, and a Blazor re-render usually lands after that - but not always. Fading in means
   that even in the bad ordering the snapshot catches the card still very nearly opaque, instead of
   producing a half-transparent ghost of an already-dimmed card. */
.bd-truck.bd-dragsource,
.bd-po.bd-dragsource {
    opacity: .45;
}

/* A re-sort is a server round trip, so the card does not slide into place - it disappears and comes
   back further up the column. One flash on arrival is what says which card just moved. */
@keyframes bdLanded {
    from {
        background: var(--alro-bg-blue-96-b);
        outline-color: var(--alro-line-blue-38);
    }

    to {
        background: var(--alro-surface);
        outline-color: transparent;
    }
}

.bd-truck.bd-landed { animation: bdLanded .9s ease-out 1; }

/* The GAP above a truck is land-here-to-reorder; the truck itself is merge. Closed, this is exactly
   the 7px between two cards - margin-top pulls it up into that gap and its height fills it, so it
   adds nothing to the layout and covers no part of either card.

   It used to be 14px straddling the card's top edge, and that was the bug: a truck dragged onto
   another truck landed on this strip rather than on the card, so the merge never lit up and the
   reorder slot opened instead. The two gestures now have two separate targets that do not overlap -
   on a card is a merge, between cards is a re-order. */
.bd-dropzone {
    height: 7px;
    margin: -7px 0 0;
    position: relative;
    z-index: 1;
    border-radius: 3px;
    transition: height .18s cubic-bezier(.2, .8, .3, 1),
                margin .18s cubic-bezier(.2, .8, .3, 1),
                background-color .18s linear,
                box-shadow .18s linear;
}


/* Open: the slot the truck is about to occupy, with everything below it sliding down to make room.
   This is the re-sort animation, and it is the one thing the legacy got from SortableJS's
   animation: 350 - without a library reordering the DOM behind Blazor's renderer.

   The class is driven from dragenter, NOT from :hover. A browser suppresses pointer events for the
   whole of a native drag, so :hover freezes at whatever it was when the drag began - the rule that
   used to live here could never match, and this strip has never given any feedback at all.

   Growth is downward ONLY, and that is what stops it oscillating: the top margin stays at -7px, so
   opening never moves the strip out from under the pointer, and closing only ever pushes the pointer
   deeper into the card below. Do not "balance" this margin. 180ms rather than the legacy's 350
   because this travels 24px and that travelled a whole card height; at 350 a move this short reads
   as mush. */
.bd-dropzone.bd-dropzone-on {
    height: 38px;
    margin: -7px 0 6px;
    background: var(--alro-bg-blue-96-b);
    box-shadow: inset 0 0 0 2px var(--alro-line-blue-38);
}

/* Everything the drag added, and nothing else on the board, moves. The landing slot still OPENS for
   someone who has asked for less motion - the gap is information rather than decoration - it just
   opens at once. */
@media (prefers-reduced-motion: reduce) {
    .bd-truck,
    .bd-po,
    .bd-dropzone { transition: none; }

    .bd-truck.bd-landed { animation: none; }
}

.alro-confirm { width: min(520px, 100%); }

.alro-confirm-line { margin: 0 0 8px; }
.alro-confirm-line:last-child { margin-bottom: 0; }
/* ---- truck editor and settings ---- */

/* Wide, because the window carries the truck's whole PO line table and a narrow dialog would
   scroll it sideways. 90% of the window, the way the legacy modal is sized - of the window, not of
   the veil, whose padding would take a slice off it - and never past the veil on a narrow screen. */
.tk-edit { width: 90vw; max-width: 100%; }

/* Delete stands apart at the left end of the footer, away from Save and the status steps - the place
   the legacy window gives it. */
.alro-dialog-footer .tk-edit-delete { margin-right: auto; }

/* Below the drill-in panel rather than above it, the one dialog that does. A PO opened from the
   truck's details is opened FROM this modal, so it has to land in front of it; the line menu and its
   write forms are ordinary dialogs and still clear the panel. */
.alro-dialog-veil:has(> .tk-edit) { z-index: 1040; }

/* The route block sits in the details between the stats and the PO lines, spaced like the cards
   around it. */
.tk-edit-route { margin-bottom: 16px; }

/* Each group its own card, so the route reads the way the details around it do instead of running
   pickups and deliveries together. The header is the shared section card's own. */
.tk-edit-card { height: auto; margin-bottom: 14px; }

.tk-edit-card > .mt-card-body { padding: 10px 12px; }

/* The card now supplies the inset, so a stop row keeps only its vertical rhythm - and so does the
   add button under the rows, which otherwise sat 10px in from the dropdowns above it. */
.tk-edit-card .tk-stop,
.tk-edit-card .tk-stop-add { padding-left: 0; padding-right: 0; }

/* Invoice and the copy count share a row, the way the page this is modelled on has them. */
.tk-edit-top {
    display: flex;
    align-items: flex-start;
    gap: var(--alro-gap-lg);
    flex-wrap: wrap;
}

.tk-edit-invoice { max-width: 240px; }

/* Two digits is the whole range - the server refuses more than 25 - so the box is sized for what it
   can hold rather than stretching across the dialog and inviting a bigger number. */
.tk-edit-copies { max-width: 190px; }

.tk-stop {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--alro-line-blue-95);
}

.tk-stop .alro-field { margin-bottom: 0; }
.tk-stop-who { flex: 2 1 220px; }
/* Wide enough to show all 20 characters the column holds. A stop often carries two numbers
   ("52882 & 52883"), and the 80px this used to be hid everything after the first. */
.tk-stop-num { width: 240px; }
/* The date and the times are sized to exactly what they hold, so on a narrow window they keep their
   width and the place, the number and the address give up room instead. */
.tk-stop-date { width: 132px; flex-shrink: 0; }
.tk-stop-time { width: 110px; flex-shrink: 0; }
.tk-stop-address { flex: 2 1 200px; }
.tk-stop-remove { margin-bottom: 3px; }

.tk-stop-add { padding: 8px 10px; }

/* Add a pickup / Add a delivery: Bootstrap's success outline, written out - green border and text,
   filling green on hover - the way the WebForms editor's Add Pickup and Add Delivery have always
   looked. The library's own success button is the filled one. */
.alro-button.tk-stop-add-btn {
    color: var(--alro-success);
    background: transparent;
    border-color: var(--alro-success);
}

.alro-button.tk-stop-add-btn:hover:not(:disabled) {
    color: var(--alro-ink-gray-100);
    background: var(--alro-success-fill);
    border-color: var(--alro-success-fill);
}


.pd-close { padding: 0 8px; font-size: .72rem; line-height: 1.6; }


/* ---- default location sorting ----
   Ported from the legacy SettingsPanel.ascx, rule for rule. Bootstrap's outline buttons are the only
   thing that had to be written out, because this library has no Bootstrap behind it. */

/* 90% of the window tall, so a long drag needs as little scrolling as possible, and its body does
   not scroll - the three panes scroll inside it. */
.alro-dialog.st-dialog {
    width: min(1080px, 100%);
    height: min(90vh, 100%);
}

.alro-dialog.st-dialog > .alro-dialog-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.alro-dialog.st-dialog > .alro-dialog-body > .alro-infobar { flex: 0 0 auto; }

/* Vendor picker: the dialog manages every vendor, so this stays at the top. */
.st-vendorbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.st-vendorbar .alro-label { margin: 0; white-space: nowrap; }

.st-vendorbar .alro-field { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }

.st-vendorbar .alro-select { font-size: .82rem; }

/* Says whether the vendor on screen already has an order saved. */
.st-saved {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}

.st-saved-yes { background: var(--alro-success-soft); color: var(--alro-success); }
.st-saved-no { background: var(--alro-surface-sunk); color: var(--alro-text-dim); }
.st-saved-dirty { background: var(--alro-warning-soft); color: var(--alro-warning); }

/* Its own block between the vendor picker and the panes, rather than small print squeezed between
   two controls. */
.st-blurb {
    flex: 0 0 auto;
    margin-bottom: 12px;
    padding: 8px 11px;
    border-radius: 5px;
    background: var(--alro-bg-cyan-91);
    border: 1px solid var(--alro-line-cyan-84);
    color: var(--alro-ink-cyan-38);
    font-size: .8rem;
    line-height: 1.5;
}

.st-blurb i { color: var(--alro-ink-blue-50); margin-right: 5px; }

/* Two panes: pick on the left, order on the right, and the pins in a narrow one of their own. */
.st-panes {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    gap: 12px;
}

.st-pane {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.st-head {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--alro-ink-gray-56);
    margin-bottom: 5px;
}

.st-count {
    display: inline-block;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--alro-bg-blue-93);
    color: var(--alro-text-dim);
    font-size: .7rem;
}

.st-search { flex: 0 0 auto; margin-bottom: 5px; }

.st-search.alro-field { margin-bottom: 5px; }

.st-search .alro-input { font-size: .8rem; padding: 4px 8px; }

.st-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--alro-line-blue-89);
    border-radius: 5px;
    background: var(--alro-bg-blue-98);
}

.st-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    margin-bottom: 4px;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-blue-90-c);
    border-radius: 4px;
    font-size: .8rem;
}

.st-row:last-child { margin-bottom: 0; }

.st-row:hover { border-color: var(--alro-line-blue-77); }

/* Only the ranked side is dragged; the available side is a plain click-to-add list. */
.st-chosen .st-row { cursor: grab; }

.st-grip { flex: 0 0 auto; color: var(--alro-text-faint); }

.st-rank {
    flex: 0 0 auto;
    min-width: 24px;
    color: var(--alro-ink-gray-56);
    font-size: .72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.st-code {
    flex: 0 0 auto;
    min-width: 32px;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--alro-charcoal);
    color: var(--alro-ink-gray-100);
    font-weight: 700;
    font-size: .72rem;
    text-align: center;
}

.st-name {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--alro-ink-gray-31);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-empty { padding: 20px 8px; text-align: center; color: var(--alro-text-faint); font-size: .8rem; }

/* Bootstrap's outline buttons, written out: this library has no Bootstrap behind it. */
.st-btn {
    flex: 0 0 auto;
    padding: 0 6px;
    font: inherit;
    font-size: .7rem;
    line-height: 1.6;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
}

.st-btn-add { color: var(--alro-primary); border: 1px solid var(--alro-line-blue-35); }
.st-btn-add:hover { color: var(--alro-ink-gray-100); background: var(--alro-bg-blue-35); }

.st-btn-del { color: var(--alro-danger); border: 1px solid var(--alro-line-red-38); }
.st-btn-del:hover { color: var(--alro-ink-gray-100); background: var(--alro-bg-red-38); }

/* Where a dragged row will land, and the row being carried. */
.st-row.st-dragover { border-color: var(--alro-line-blue-62); box-shadow: inset 0 2px 0 var(--alro-shadow-blue-62); }

.st-row.st-dragging { opacity: .6; cursor: grabbing; }

/* The manual-placements column: read-only rows for the trucks dragged into place on the board.
   Amber-tinted throughout, because these outrank whatever the other two panes say. */
.st-pane-pins { flex: 0 0 250px; }

.st-pane-pins .st-list { background: var(--alro-bg-amber-97); border-color: var(--alro-line-amber-84); }

.st-pin-blurb {
    flex: 0 0 auto;
    margin: 0 0 5px;
    font-size: .7rem;
    color: var(--alro-ink-amber-44);
    line-height: 1.35;
}

.st-pin-clear { float: right; padding: 0 8px; font-size: .68rem; }

.st-pin-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    margin-bottom: 4px;
    background: var(--alro-surface);
    border: 1px solid var(--alro-line-amber-84);
    border-radius: 4px;
    font-size: .8rem;
}

.st-pin-row:last-child { margin-bottom: 0; }

.st-pin-row > i { flex: 0 0 auto; margin-right: 2px; color: var(--alro-ink-amber-36); font-size: .72rem; }

.st-pin-truck {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--alro-warning);
    font-variant-numeric: tabular-nums;
}

.st-pin-where {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--alro-ink-amber-44);
    font-size: .74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-pin-where b { color: var(--alro-warning); }

/* Clear this vendor sits hard left, away from Cancel and Save, and is outlined rather than filled -
   it is a destructive option that writes nothing until Save, so it should not shout. */
.st-clear {
    margin-right: auto;
    color: var(--alro-danger);
    background: transparent;
    border-color: var(--alro-line-red-38);
}

.st-clear:hover:not(:disabled) { color: var(--alro-ink-gray-100); background: var(--alro-bg-red-38); }

/* Bootstrap's btn-secondary, which is what the legacy's Cancel is. */
.st-cancel {
    color: var(--alro-ink-gray-100);
    background: var(--alro-bg-gray-46);
    border-color: var(--alro-line-gray-46);
}

.st-cancel:hover:not(:disabled) { background: var(--alro-bg-gray-38); }
/* ---- admin tools: verified look-ups, small forms and the vendor editor ---- */

/* Wider than the default dialog because these carry a form and a verified card side by side. */
.alro-dialog.al-wide { width: min(760px, 100%); }

/* A dialog built around a table rather than a form: it takes a fixed frame and its BODY does not
   scroll - the table inside does, on both axes. With the body scrolling, the toolbar and the sticky
   column headings scrolled away with the rows, and the columns that ran off the right had nothing to
   scroll them into view. */
.alro-dialog.al-fill {
    width: min(1240px, 100%);
    height: min(88vh, 100%);
}

.alro-dialog.al-fill > .alro-dialog-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Only the scroller grows. Everything above it - the counts, the filter, the editor - keeps its own
   height rather than being squeezed as the list gets longer. */
.alro-dialog.al-fill > .alro-dialog-body > *:not(.al-scroll) {
    flex: 0 0 auto;
}

/* The table divides up the width it is GIVEN instead of demanding the width its content wants.
   Without this the declared column widths are only a suggestion, the widest cell wins, and the table
   runs off to the right - so the dialog scrolls sideways however narrow the window is. Fixed layout
   makes the columns share what is there and lets the cells truncate. */
.alro-dialog.al-fill .al-table {
    table-layout: fixed;
    width: 100%;
}

.alro-dialog.al-fill .al-table th,
.alro-dialog.al-fill .al-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.al-lookup { margin-bottom: 14px; }

.al-lookup-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.al-lookup-row .alro-field { flex: 1 1 auto; margin-bottom: 0; }

.al-lookup-row .alro-button { flex: 0 0 auto; }

.al-w90 { flex: 0 0 90px !important; }

/* What a look-up found, shown before anything can be written against it. Green because it is a
   confirmation and not a warning: the point is that it reads as settled at a glance. */
.al-verified {
    margin-top: 8px;
    border: 1px solid var(--alro-line-green-79);
    border-radius: 5px;
    background: var(--alro-bg-green-97);
    overflow: hidden;
}

.al-verified-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--alro-success-soft);
    border-bottom: 1px solid var(--alro-line-green-86-b);
    font-size: .82rem;
    font-weight: 600;
    color: var(--alro-ink-green-27);
}

.al-verified-head i { color: var(--alro-success); }

.al-verified-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
}

.al-formrow {
    display: flex;
    gap: 12px;
}

.al-formrow > * { flex: 1 1 0; }

.al-hint {
    margin: 2px 0 12px;
    font-size: .78rem;
    color: var(--alro-text-dim);
}

/* A sentence about something the write will do that the form does not otherwise say. Amber rather
   than red: it is a consequence to read, not a failure. */
.al-warnline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 7px 10px;
    border: 1px solid var(--alro-line-amber-82);
    border-radius: 5px;
    background: var(--alro-bg-amber-96);
    font-size: .8rem;
    color: var(--alro-ink-amber-25);
}

.al-warnline i { margin-top: 2px; }

.al-editor {
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid var(--alro-line-blue-88);
    border-radius: 6px;
    background: var(--alro-bg-blue-98-c);
}

.al-editor-title {
    margin: 0 0 10px;
    font-size: .95rem;
    font-weight: 600;
}

.al-editor-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.al-toolbar-tight { margin-bottom: 10px; }

.al-rowtools { display: flex; gap: 4px; }

/* A vendor that is turned off is still listed, greyed rather than hidden - it is the row somebody
   came here to turn back on. */
.al-off-row { opacity: .55; }

/* The jump box and its button, above the truck column's tab strip. */
.mt-optnote {
    display: block;
    width: 100%;
    margin-top: 2px;
    font-size: .7rem;
    font-weight: 400;
    color: var(--alro-text-dim);
}

/* ---- the PO line menu's group separators ---- */

/* The three tiers are the only thing that decides whether an item is usable, so the menu is split by
   them rather than listing eleven buttons in a row. */
.mt-optsep {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 2px;
    color: var(--alro-text-dim);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mt-optsep::before,
.mt-optsep::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--alro-line);
}

/* The first tier needs no caption - it is everything above the first separator. */
.mt-optsep span { flex: 0 0 auto; }

/* ---- quick options on a board card ---- */

/* Pushed to the right of the card's top row so the PO number and description keep the left edge. */
.bd-po-tools {
    margin-left: auto;
    display: flex;
    gap: 2px;
    flex: 0 0 auto;
}

.bd-po-tools .alro-icon-button {
    width: 26px;
    height: 24px;
    padding: 0;
    font-size: .74rem;
}

/* The flame is a switch rather than a command, so an urgent line reads as one at rest. */
.bd-po-tools .alro-icon-button-on {
    color: var(--alro-ink-red-46);
    background: var(--alro-bg-red-95);
    border-color: var(--alro-line-red-85);
}

/* ---- the PO panel's inspector ---- */

.mt-inspect-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.mt-inspect-tabs {
    display: flex;
    flex: 1 1 auto;
    border-bottom: 1px solid var(--alro-line);
}

.mt-inspect-tab {
    padding: 6px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--alro-text-dim);
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.mt-inspect-tab:hover { color: var(--alro-ink-gray-23); }

.mt-inspect-tab.active {
    color: var(--alro-ink-gray-15);
    border-bottom-color: var(--alro-line-blue-38);
}

/* The inspector's tables are the wide ones, so the card gives them a fixed frame to scroll inside
   rather than growing the whole panel sideways. */
.mt-inspect .mt-scroll {
    max-height: 46vh;
    overflow: auto;
}

/* Rows that pick the line the inspector is about. Only the PO view passes a handler, so the truck
   view's identical table keeps an ordinary cursor. */
.mt-selectable { cursor: pointer; }

.mt-selectable:hover > td { background: var(--alro-bg-blue-96-b); }

.mt-selected > td {
    background: var(--alro-primary-soft);
    box-shadow: inset 0 0 0 9999px var(--alro-shadow-navy-05);
}

.mt-selected > td:first-child { box-shadow: inset 3px 0 0 var(--alro-shadow-blue-38); }

/* A vendor's contact list, collapsed. The addresses are long and there can be four of them, which
   pushed Active and the row's buttons off the right edge of the dialog. */
.vd-emails {
    display: flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
}

.vd-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vd-email-more {
    flex: 0 0 auto;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--alro-surface-sunk);
    border: 1px solid var(--alro-line);
    color: var(--alro-text-dim);
    font-size: .68rem;
    font-weight: 700;
    cursor: help;
}

/* Bounded and truncating, so no one long name can widen the table past the dialog. The cap follows
   the column rather than being a figure of its own - the table decides the widths now. */
.vd-clip {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
