/* One compact value; urgency is a faint background across the entire table row. */
.deadline-badge { display:block; box-sizing:border-box; width:100%; max-width:100%; padding:0; margin:0; border:0; border-radius:0; background:none; color:inherit; line-height:inherit; font:inherit; font-variant-numeric:tabular-nums; text-align:inherit; }
.deadline-date { display:block; width:100%; white-space:nowrap; font:inherit; color:inherit; }
.register-due { min-width:145px; }
.production-board th.queue-due-heading { width:90px; }
.orders-list-table th.order-metric-due { width:100px; }
.deal-deadline-value { width:100%; min-width:0; }
.job-deadline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.job-deadline>.deadline-badge { width:auto; flex:1; }
.worker-queue-deadline,.mobile-order-deadline { padding:2px 8px 5px; font-size:11px; }
.deadline-legend { margin:4px 0 6px; font-size:11px; color:var(--look-muted,#687a71); }
.deadline-legend>summary { width:fit-content; cursor:pointer; }
.deadline-legend-items { display:flex; flex-wrap:wrap; gap:6px 15px; margin-top:6px; }
.deadline-legend-item { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.deadline-legend-item .deadline-badge { display:inline-block; width:16px; height:10px; border:1px solid #c8d3cc; border-radius:2px; background:var(--deadline-row,transparent); }
.deadline-legend p { margin:5px 0; font-size:11px; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-fortnight) { --deadline-row:#f1f6fb; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-week) { --deadline-row:#faf8e9; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-soon) { --deadline-row:#fcf4e7; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-urgent) { --deadline-row:#fdf0e7; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-today) { --deadline-row:#fceeea; }
:is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-overdue) { --deadline-row:#fbe9e9; }
/* Direct-child cells avoid colouring unrelated expanded position tables. */
html body table tbody>tr:has(>td>[data-deadline]):not(:has(>td>.deadline-done)):not(:has(>td>.deadline-none))>td:not(.route-cell.done):not(.route-cell.work) { background-color:var(--deadline-row,transparent); }
html body table tbody>tr:has(>td>[data-deadline]):hover>td:not(.route-cell.done):not(.route-cell.work) { filter:brightness(.985); }
.worker-queue-entry:has([data-deadline]),.mobile-order-deadline:has([data-deadline]),.job-deadline:has([data-deadline]),.deal-info-row:has(.deadline-badge) { background-color:var(--deadline-row,transparent); }
html body .worker-queue-entry:has([data-deadline])>.worker-queue-card { background-color:transparent; }
.deadline-fortnight { --deadline-row:#f1f6fb; }.deadline-week { --deadline-row:#faf8e9; }.deadline-soon { --deadline-row:#fcf4e7; }.deadline-urgent { --deadline-row:#fdf0e7; }.deadline-today { --deadline-row:#fceeea; }.deadline-overdue { --deadline-row:#fbe9e9; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-fortnight),[data-crm-theme="dark"] .deadline-fortnight { --deadline-row:#23313b; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-week),[data-crm-theme="dark"] .deadline-week { --deadline-row:#333426; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-soon),[data-crm-theme="dark"] .deadline-soon { --deadline-row:#393126; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-urgent),[data-crm-theme="dark"] .deadline-urgent { --deadline-row:#3b2e27; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-today),[data-crm-theme="dark"] .deadline-today { --deadline-row:#3c2b29; }
[data-crm-theme="dark"] :is(tr,.worker-queue-entry,.mobile-production-order,.mobile-order-deadline,.job-deadline,.deal-info-row):has(.deadline-overdue),[data-crm-theme="dark"] .deadline-overdue { --deadline-row:#40292d; }
@media print { .deadline-legend { display:none; } html body table tbody>tr:has(>td>[data-deadline])>td { background:none; } }
