.spool-allocation-actions {
    display: inline-grid;
    grid-template-columns: max-content;
    justify-items: stretch;
    vertical-align: top;
}
.spool-allocation-report {
    box-sizing: border-box;
    max-width: 1100px;
    padding: 16px 20px;
    border: 1px solid #c9d5df;
    border-radius: 6px;
    background: white;
    color: #243746;
    font: 14px/1.4 Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}
.spool-allocation-report header, .spool-allocation-report .ar-filters,
.spool-allocation-report .ar-view {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
dialog.spool-allocation-report {
    width: min(1100px, 94vw); max-height: 90vh; overflow: auto; resize: both;
    box-shadow: 0 12px 48px #0004;
}
dialog.spool-allocation-report::backdrop { background: #16283966; }
.spool-allocation-report header { justify-content: space-between; margin-bottom: 14px; }
.spool-allocation-report h2 { margin: 0 0 3px; color: #243746; font: 600 21px/1.2 Arial, sans-serif; }
.spool-allocation-report [data-asof], .spool-allocation-report [data-status] { color: #4d6170; }
.spool-allocation-report .ar-view { gap: 0; margin-bottom: 9px; }
.spool-allocation-report .ar-view b { margin-right: 10px; }
.spool-allocation-report .ar-view [data-loading] { margin-left: 10px; }
.spool-allocation-report .ar-view label { position: relative; margin-right: 0; cursor: pointer; }
.spool-allocation-report .ar-view input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.spool-allocation-report .ar-view span { display: block; border: 1px solid #aebfca; padding: 6px 12px; }
.spool-allocation-report .ar-view label:first-of-type span { border-radius: 4px 0 0 4px; }
.spool-allocation-report .ar-view label + label span { border-left: 0; }
.spool-allocation-report .ar-view label:last-of-type span { border-radius: 0 4px 4px 0; }
.spool-allocation-report .ar-view :checked + span { color: white; background: #324d60; }
.spool-allocation-report .ar-view :focus-visible + span { outline: 2px solid currentColor; outline-offset: -4px; }
.spool-allocation-report .ar-filters { border-bottom: 1px solid #cbd6de; padding: 4px 0 12px; margin-bottom: 12px; }
.spool-allocation-report .ar-filters label { display: inline-flex; align-items: center; gap: 5px; }
.spool-allocation-report .ar-filters [hidden] { display: none; }
.spool-allocation-report select, .spool-allocation-report button { font: inherit; }
.spool-allocation-report button { padding: 5px 9px; }
.spool-allocation-report [data-status] { margin-left: auto; }
.spool-allocation-report .ar-group { margin-bottom: 12px; }
.spool-allocation-report .ar-group h3 {
    margin: 0; padding: 6px 9px; border-left: 3px solid #467894;
    background: #eff4f8; color: #243746; font: 600 15px/1.4 Arial, sans-serif;
}
.spool-allocation-report h3 small { margin-left: 10px; font-weight: normal; }
.spool-allocation-report .ar-scroll { overflow-x: auto; }
.spool-allocation-report table { border-collapse: collapse; width: 100%; margin: 0; font-size: 13px; }
.spool-allocation-report .ar-group table { table-layout: fixed; }
.spool-allocation-report .ar-group th { box-sizing: border-box; }
/* Priority takes the space left by the other five columns. */
.spool-allocation-report .ar-group th:first-child { width: 11.5em; }
.spool-allocation-report .ar-group th:nth-child(3) { width: 9em; }
.spool-allocation-report .ar-group th:nth-child(4),
.spool-allocation-report .ar-group th:nth-child(5) { width: 7.5em; }
.spool-allocation-report .ar-group th:last-child { width: 8em; }
.spool-allocation-report .ar-group td:nth-child(-n+2) { overflow-wrap: anywhere; }
@media screen {
    .spool-allocation-report .ar-group table { min-width: 51em; }
}
.spool-allocation-report th, .spool-allocation-report td { padding: 6px 8px; border-bottom: 1px solid #d5dfe5; text-align: left; }
.spool-allocation-report th { color: #405662; white-space: nowrap; }
.spool-allocation-report th:nth-last-child(-n+3), .spool-allocation-report .ar-number { text-align: right; }
.spool-allocation-report td small { display: block; color: #536a77; }
.spool-allocation-report td .ar-overdue { color: #913e33; }
.spool-allocation-report .ar-number { white-space: nowrap; }
.spool-allocation-report .ar-number small { white-space: normal; }
.spool-allocation-report .ar-completed-by { cursor: help; }
.spool-allocation-report .ar-meter { display: inline-block; background: #e0e8ed; width: 32px; height: 4px; vertical-align: middle; margin-right: 5px; }
.spool-allocation-report .ar-meter i { display: block; height: 100%; background: #467894; }
.spool-allocation-report .ar-meter + span { display: inline-block; min-width: 32px; }
.allocation-print-sheet { display: none; }
@media (max-width: 650px) {
    .spool-allocation-report { padding: 10px; }
    .spool-allocation-report [data-status] { margin-left: 0; }
    .spool-allocation-report .ar-meter { display: none; }
}
@media print {
    body:has(> .allocation-print-sheet) { margin: 0; padding: 0; background: white; }
    body:has(> .allocation-print-sheet) > :not(.allocation-print-sheet),
    body:has(> .allocation-print-sheet) dialog.spool-allocation-report::backdrop { display: none !important; }
    .allocation-print-sheet { display: block; max-width: none; width: auto; margin: 0; padding: 0; border: 0; }
    .allocation-print-sheet .ar-meter, .allocation-print-sheet .ar-completed-by { display: none; }
    .allocation-print-sheet .ar-scroll { overflow: visible; }
    .allocation-print-sheet .ar-group h3 { break-after: avoid; border-left: 0; border-bottom: 1px solid; }
    .allocation-print-sheet tr { break-inside: avoid; }
    .allocation-print-sheet thead { display: table-header-group; }
}
