/* DESIGN-20261117 · Maintenance · nine menus. Reuses the R9 workspace (.ws-*) look: shell, colours, type, rows, states,
 * buttons and density. Only what the new menu pages add is styled here. */
.dk .ws-sum.dk-sum3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dk-stat { cursor: default; }
.dk .ws-find .field { min-width: 0; }
.dk .ws-find .search { flex: 1 1 260px; min-width: 0; }
.dk-segs { display: flex; flex-wrap: wrap; gap: 4px; }
.dk-segs .btn.is-on { background: var(--dom-maint-bg); border-color: var(--dom-maint); color: var(--text); font-weight: 600; }

/* list rows: long codes, titles and shop names wrap inside the row; a row action sits under the link */
.dk .ws-rn { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; }
.dk-code { font-variant-numeric: tabular-nums; }
/* group headers on these pages name a state, not a truck: R9's 16px truck-code size is too loud here */
.dk .ws-gcode b { font-size: 13px; letter-spacing: 0; }
.dk .ws-gcode svg { width: 14px; height: 14px; }
.dk-t, .dk-why, .dk-vendor, .dk-rr, .dk-ct { overflow-wrap: anywhere; min-width: 0; }
.dk .ws-rs > span { min-width: 0; overflow-wrap: anywhere; }
.dk .ws-row.has-act { display: grid; }
.dk .ws-row.has-act .dk-rowact { justify-self: start; margin: -4px 12px 9px 14px; }
.dk .ws-rx.t-act { color: var(--dom-maint); font-weight: 600; }
.dk .ws-rx.t-wait { color: var(--warning-fg, #8a5a00); }
.dk .ws-rx.t-money { color: var(--text); }

/* right pane */
.dk .ws-pane { display: grid; gap: 12px; min-width: 0; align-content: start; }
.dk-ids { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0; font-size: 13px; color: var(--text-2); }
.dk-ids small { color: var(--text-3, var(--text-2)); }
.dk-ret, .dk-up { justify-self: start; }
.dk-retbar { display: flex; }
.dk-sec { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); min-width: 0; container: dksec / inline-size; }
/* dk19 · Truck status has no mxsheet container, so the four visit cells follow this section's own width:
   2 × 2 on a phone / narrow pane, one per row on a very narrow pane — never four skinny columns. */
@container dksec (max-width: 640px) { .dk-sec > .mx-vfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container dksec (max-width: 300px) { .dk-sec > .mx-vfacts { grid-template-columns: minmax(0, 1fr); } }
/* UICOPY · vendor RO line: value + last change, what it is (and is not), then the record/change button in the visit menus */
.dk-ro { display: grid; gap: 4px; justify-items: start; margin: 0; font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.dk-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0; font-size: 14px; }
.dk-h .cell-sub { font-weight: 400; }
.dk-acts .btn { display: inline-flex; gap: 6px; align-items: center; }
/* a step button names its job: a long job title wraps inside the pane instead of running past it (R9 .btn is nowrap) */
.dk .ws-pane .btn { max-width: 100%; }
.dk-acts .btn, .dk-rowact { height: auto; min-height: var(--control-h); white-space: normal; text-align: left; justify-content: flex-start; padding-block: 5px; overflow-wrap: anywhere; }
.dk-acts .btn-sm, .dk-rowact.btn-sm { min-height: var(--btn-sm-h); padding-block: 3px; }
.dk-acts .btn > svg, .dk-acts .btn > .i, .dk-rowact > svg { flex: none; }
.dk-in { font-weight: 400; color: var(--text-2); }
.btn-primary .dk-in { color: inherit; opacity: .85; }
.dk-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--text-2); }
.dk-restr, .dk-cases, .dk-plain, .dk-waits, .dk-log, .dk-fl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dk-restr > li, .dk-plain > li, .dk-waits > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--border); }
.dk-restr > li:first-child, .dk-plain > li:first-child, .dk-waits > li:first-child, .dk-cases > li:first-child { border-top: 0; }
.dk-restr > li > div { display: grid; gap: 2px; min-width: 0; }
.dk-waits > li { grid-template-columns: auto minmax(0, 1fr); font-size: 13px; }
.dk-cases > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.dk-case.is-closed .dk-ct { color: var(--text-2); }
.dk-cm { display: grid; gap: 2px; min-width: 0; }
.dk-ct { font-weight: 600; }
.dk-cx { justify-self: end; }
.dk-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 0; }
.dk-dl dt { font-size: 12px; color: var(--text-2); }
.dk-dl dd { margin: 0; overflow-wrap: anywhere; }
.dk-dl .span2 { grid-column: 1 / -1; }
.dk-log > li { padding: 4px 0; font-size: 13px; }
.dk-wot td, .dk-vt td { overflow-wrap: anywhere; }
.dk-vt tr.is-here td { background: var(--dom-maint-bg); }
.dk-sib { margin: 0; }
.dk-addjob { margin: 0; }
.dk-new { max-width: 1100px; }

/* Find truck */
.dk-fl { margin-top: 8px; }
.dk-fr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 2px 10px; align-items: center; width: 100%; padding: 8px 6px; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--border); cursor: pointer; }
.dk-fr:hover, .dk-fr:focus-visible { background: var(--surface-sunken); }
.dk-fr .cell-sub:last-child { grid-column: 3; }

@media (max-width: 1199px) {
  .dk .ws-split { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .dk .ws-sum.dk-sum3 { grid-template-columns: minmax(0, 1fr); }
  .dk .ws-split { grid-template-columns: minmax(0, 1fr); }
  .dk-cases > li { grid-template-columns: minmax(0, 1fr); }
  .dk-cx { justify-self: start; }
  .dk-restr > li { grid-template-columns: auto minmax(0, 1fr); }
  .dk-restr > li > .btn { grid-column: 2; justify-self: start; }
}
