/* Contract identity is red, independently of allocation/driver status.
   The marker is server-rendered on entries and on AJAX replacement fragments. */
[data-contract-work] :is(.col-time .t, .col-ref > a, .col-cust, .col-route, .col-destination, .col-return),
[data-contract-work] :is(.dcard-time, .dcard-ref, .dcard-cust, .dcard-route),
[data-contract-work] :is(.dpanel-ref, .dpanel-cust, .dpanel-route > p),
[data-contract-work] .diary-contract-text,
[data-contract-work].diary-contract-text {
    color: var(--dte-contract-ink, #b3261e);
}

/* A valid drag target keeps the planner's existing pale green drop cue. */
[data-contract-work].drop-ok { --dte-contract-ink: #a61b1b; }

/* Small labels need a known surface: accepted timeline bars are green, and
   weekly cells also communicate workload and leave. Keep those backgrounds. */
[data-contract-work].tl-bar .tl-bar-ref,
[data-contract-work].tl-stay > span {
    color: #a61b1b;
    background: #fff0ef;
    border-radius: 3px;
    padding-inline: 3px;
}
[data-contract-work] .badge-cp.c,
.dweek td .dw-pills a.dw-pill[data-contract-work],
.mpill[data-contract-work] :is(.mref, .mref-tab) {
    color: #a61b1b;
    background: #fff0ef;
}
.dweek td .dw-pills a.dw-pill[data-contract-work]:is(:hover, :focus-visible, .kin),
.mpill[data-contract-work] :is(.mref, .mref-tab):is(:hover, :focus-visible),
.mpill[data-contract-work].kin :is(.mref, .mref-tab) {
    background: #ffe0dd;
}

/* The weekly unassigned bucket used red for every reference. Keep its warning
   counts and leave/workload signals, while reserving red references for contracts. */
.dweek tr.unassigned td.hot .dw-pills a.dw-pill:not([data-contract-work]) {
    color: var(--dte-link, #0b5a2d);
    background: var(--dte-card, #fff);
}
