.wiata-bom__heading, .wiata-schedule-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 18px;
}
.wiata-schedule-tools { align-items: center; margin-left: auto; font-size: 13px; color: var(--muted); }
.wiata-bom [hidden] { display: none; }
.wiata-undo { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.wiata-bom [data-wiata-empty] { padding: 14px; color: var(--muted); }
.wiata-schedule tbody th { min-width: 190px; }
.wiata-row-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wiata-row-item > div:first-child { min-width: 0; }
.wiata-row-item label { cursor: pointer; }
.wiata-row-actions { flex-shrink: 0; display: flex; gap: 3px; }
.wiata-row-actions button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
    color: var(--forest);
    font-size: 19px;
    line-height: 1;
}
.wiata-row-actions button:hover, .wiata-row-actions button:focus-visible { border-color: var(--forest); }
.wiata-fields-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-width: 145px; }
.wiata-fields-pair label { display: block; min-width: 0; color: var(--muted); font-size: 12px; }
.wiata-bom .wiata-schedule tbody .td-input {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid #acb7ac;
    border-radius: 5px;
    background: white;
    color: var(--ink);
    font-size: 15px;
    font-weight: normal;
}
.wiata-fields-pair .td-input { width: 100%; margin-top: 3px; }
.wiata-schedule .wiata-order-length, .wiata-bom .wiata-schedule .wiata-bom__qty { width: 76px; }
.wiata-schedule .wiata-own-name { width: 100%; min-width: 10ch; }
.wiata-schedule tr.is-excluded { color: var(--muted); }
.wiata-bom .wiata-schedule tr[data-custom] { background: #f0f5ef; }
.wiata-bom .wiata-schedule tfoot td { width: auto; padding: 0; border-top: 1px solid var(--line); }
.wiata-add-row {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    background: #f1f5ee;
    color: var(--forest);
    font-size: 15px;
    font-weight: 650;
    text-align: center;
}
.wiata-add-row:hover { background: #e6eee2; }
.wiata-bom :focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.wiata-add-row:focus-visible { outline-offset: -3px; }
.wiata-bom__actions button:disabled { opacity: .56; }
.wiata-quote__message { min-width: 0; }
#wiata-message {
    font: 14px/1.6 ui-monospace, Consolas, monospace;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    tab-size: 12;
}
@media (max-width: 800px) {
    .wiata-bom .wiata-schedule tbody tr {
        grid-template-areas: "mark name name" ". profile profile" ". length quantity";
        grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
    .wiata-bom .wiata-schedule tbody td:nth-child(1) { grid-area: mark; }
    .wiata-bom .wiata-schedule tbody th { grid-area: name; min-width: 0; }
    .wiata-bom .wiata-schedule tbody td:nth-child(3) { grid-area: profile; }
    .wiata-bom .wiata-schedule tbody td:nth-child(4) { grid-area: length; }
    .wiata-bom .wiata-schedule tbody td:nth-child(5) { grid-area: quantity; }
    .wiata-schedule tbody td:nth-child(n+4)::before { min-height: 2lh; }
    .wiata-schedule tfoot, .wiata-schedule tfoot tr, .wiata-bom .wiata-schedule tfoot td { display: block; width: 100%; }
    .wiata-row-item { gap: 7px; align-items: start; }
    .wiata-row-actions button { min-height: 40px; }
}
