.order-production-icon {
    color: #2053aa;
    text-decoration: none;
    font-size: .96rem;
}
.order-production-statuses { position: absolute; inset-block-start: 0; inset-inline-end: 0; }
.order-production-statuses:empty { display: none; }
.order-position-cell { position: relative; }
.order-position-cell:has(.order-production-details) { padding-inline-end: 1.15rem; }
.production-urgent {
    align-self: flex-start;
    display: inline-block;
    padding: .12rem .45rem;
    border-radius: .3rem;
    background: #a52332;
    color: #fff;
    font-size: .76em;
}
.production-order-table [data-order-priority="1"] .production-task-cell:has(.production-urgent) {
    box-shadow: inset 3px 0 #a52332;
}
.production-report small { display: block; }
.order-production-details .order-production-summary {
    display: flex;
    justify-content: center;
    gap: .12rem;
    width: 1.12rem;
    height: .63rem;
    background: transparent;
    list-style: none;
}
.order-production-summary::-webkit-details-marker { display: none; }
.order-production-dot { display: inline-block; flex: 0 0 .34rem; width: .34rem; height: .34rem; border-radius: 50%; background: #2d63b3; }
.order-production-dot[data-state="work"] { background: #148344; }
.order-production-menu {
    position: absolute;
    z-index: 2;
    inset-block-start: 100%;
    inset-inline-start: 0;
    width: max-content;
    max-width: min(15rem, 80vw);
    max-height: min(16rem, 45vh);
    overflow: auto;
    margin: 0;
    padding: .4rem .55rem;
    border: 1px solid var(--border);
    border-radius: .38rem;
    list-style: none;
    text-align: start;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 3px 10px #17233c26;
}
.order-tools-left .order-production-menu { inset-inline-start: auto; inset-inline-end: 0; }
.order-production-menu li + li { margin-top: .18rem; }

.order-production-popup {
    display: none;
    position: fixed;
    inset: auto;
    width: min(29rem, calc(100% - 16px));
    max-height: calc(100dvh - 16px);
    margin: 0;
    padding: .8rem;
    overflow: auto;
    color: var(--text);
    box-shadow: 0 6px 24px #17233c30;
}
.order-production-popup:popover-open { display: block; }
.order-production-popup .dialog-head { margin-bottom: .55rem; }
.order-production-popup h2 { min-width: 0; overflow-wrap: anywhere; }
.order-production-popup .stack { gap: .55rem; }

.production-assign { max-width: 48rem; }
.production-form { display: flex; align-items: end; flex-wrap: wrap; gap: .5rem; }
.production-form > label { min-width: 0; flex: 1 1 12rem; }
.production-assigned { margin: .7rem 0 0; padding-inline-start: 1.2rem; }
.production-selected-order { margin: .9rem 0 .55rem; }
.production-matches { margin-top: .65rem; }
.production-choices { margin: 0; padding: 0; min-inline-size: 0; border: 0; }
.production-choices legend { margin-bottom: .3rem; padding: 0; font-size: .88rem; font-weight: 700; }
.production-choice-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.production-choice-list label, .production-position {
    display: flex;
    align-items: center;
    gap: .42rem;
    padding: .4rem .58rem;
    border: 1px solid var(--border);
    border-radius: .4rem;
    cursor: pointer;
}
.production-choice-list label:has(:checked), .production-position:has(:checked) {
    background: #eaf2ff;
    border-color: #698ec9;
}
.production-choice-list input[type="radio"], .production-position input[type="checkbox"] {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
}
.production-position-picker { display: grid; gap: .32rem; max-height: 16rem; overflow: auto; }
.production-position span { min-width: 0; overflow-wrap: anywhere; }
.production-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
}
.production-machine {
    min-width: 0;
    padding: .9rem clamp(.35rem, 1.4vw, .9rem);
    border: 1px solid var(--border);
    border-radius: .55rem;
    background: #edf2fa;
}
.production-machine h3 { margin: .8rem 0 .35rem; font-size: .95rem; }
.production-machine h3 small { margin-inline-start: .25rem; }
.production-order-table tbody.dragging { opacity: .52; }
.production-empty { font-size: .87rem; }
.production-queue-save { margin-top: .5rem; }
.production-history { margin-top: .8rem; }
.production-history summary, .production-manage summary { cursor: pointer; font-size: .87rem; }
.production-history[open] summary, .production-manage[open] summary { margin-bottom: .42rem; }
.production-manage form + form { margin-top: .42rem; }

.production-order-table col.order-extra-col { width: calc(var(--column-width) * 100% / var(--table-weight)); }
.order-table .production-task-cell { padding: clamp(.19rem, .55vw, .45rem); }
.production-task-content { display: grid; gap: .32rem; min-width: 0; }
.production-task-content .toolbar { gap: .25rem; justify-content: center; }
.production-task-content .stack > .toolbar { justify-self: center; }
.production-task-content .production-urgent { justify-self: center; }
.production-task-content .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.production-task-content label { font-size: inherit; }
