#modal:has(.workorder-review) {
    width: min(1260px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
}
.workorder-review { display: flex; flex-direction: column; gap: 16px; padding: clamp(12px, 2vw, 24px); }
.workorder-review h3, .workorder-review p { margin: 0; }
.workorder-review .review-top, .workorder-review .review-actions {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.workorder-review .review-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.workorder-review .review-stats > div { padding: 9px 14px; border-radius: 8px; background: #16364a; }
.workorder-review .review-stats strong { display: block; color: #f3f8fb; font-size: 1.25rem; }
.workorder-review .review-stats small { color: #adc2d0; }
.workorder-review .review-scroll {
    overflow: auto; max-height: min(54dvh, 580px); min-height: 76px;
    border: 1px solid #2a485b; border-radius: 8px;
}
.workorder-review table { width: 100%; min-width: 940px; }
.workorder-review thead th { position: sticky; top: 0; z-index: 1; background: #18394d; color: #dfedf5; }
.workorder-review th, .workorder-review td { padding: 10px 12px; }
.workorder-review .review-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.workorder-review .review-number, .workorder-review .review-status { white-space: nowrap; }
.workorder-review .review-check { text-align: center; }
.workorder-review input[type=checkbox] { width: 18px; height: 18px; accent-color: #00ec54; vertical-align: middle; }
.workorder-review tbody tr:nth-child(even) { background: #122e40; }
.workorder-review tbody tr:has(input:checked) { background: #194b43; }
.workorder-review .review-search { max-width: 430px; }
.workorder-review .review-confirm-fields { display: grid; gap: 14px; padding: 12px; }
.workorder-review .review-confirm-fields textarea { min-height: 65px; }
.workorder-review .review-error { color: #ffbf9e; }
@media (max-height: 760px), (max-width: 650px) {
    #modal:has(.workorder-review) { overflow: auto; }
    .workorder-review { gap: 10px; }
    .workorder-review .review-scroll { max-height: 46dvh; }
}


.workorder-group + .workorder-group {
    margin-top: 24px;
}
.workorder-group .workorder-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 12px 15px;
    border: 1px solid #284758;
    border-left: 3px solid var(--stage-color);
    border-radius: 8px;
    background: #143143;
    color: #edf5fa;
    font-size: 1rem;
    --stage-color: #f3be75;
}
.workorder-group-title[data-stage="1"] { --stage-color: #8dc5ff; }
.workorder-group-title[data-stage="2"] { --stage-color: #60e7a0; }
.workorder-group-title .workorder-group-count {
    min-width: 25px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #0b2636;
    color: var(--stage-color);
    text-align: center;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}
