.role-workspace-nav { display:flex; justify-content:space-between; align-items:start; gap:16px; margin-bottom:24px; }
.role-departments { display:flex; flex-wrap:wrap; gap:8px; }
.role-workspace-nav nav { display:inline-flex; flex-wrap:wrap; gap:4px; padding:4px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.role-workspace-nav nav a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 16px; }
.role-workspace-nav nav a, .role-task-tabs a { padding:9px 12px; border-radius:10px; color:var(--ink-soft); text-decoration:none; }
.role-workspace-nav a[aria-current=page], .role-task-tabs a[aria-current=page] { background:var(--brand-tint); color:var(--brand); font-weight:700; }
.role-preview { max-width:400px; font-size:.8rem; }
.role-preview summary { cursor:pointer; color:var(--muted); padding:9px 0; }
.role-preview form { display:flex; gap:8px; margin:10px 0; }
.role-preview select { min-width:0; }
.role-preview .field-hint { display:block; }
.role-workspace-hero { margin-bottom:20px; }
.role-workspace-hero .hero-actions { align-items:stretch; }
.role-workspace-hero .button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; }
.role-departments { margin-bottom:16px; }
.role-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; padding:18px; border:1px solid var(--line); background:var(--surface); border-radius:var(--radius-md); margin-bottom:18px; }
.role-filters>label { flex:1 1 180px; margin:0; }
.role-filters>.role-search { flex:2 1 260px; }
.role-filters .role-date { flex:1 1 250px; min-width:0; }
.role-filters .date-filter { width:100%; max-width:none; min-width:0; margin:0; }
.role-filters .role-mine { display:flex; align-items:center; gap:8px; flex:0 1 auto; min-height:44px; }
.role-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.role-metrics>div { display:flex; flex-direction:column; gap:8px; padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); }
.role-metrics span { color:var(--muted); font-size:.8rem; }
.role-metrics strong { font-size:1.8rem; font-variant-numeric:tabular-nums; }
.role-product-summary summary { cursor:pointer; font-weight:700; }
.role-product-summary small { display:block; margin-top:3px; }
.role-product-summary .table-wrap { margin-top:12px; }
.role-quantity { font-weight:700; font-variant-numeric:tabular-nums; }
.role-list-heading { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin:24px 0 16px; }
.role-list-heading h2 { margin:0; font-size:1.2rem; }
.role-task-tabs { display:flex; flex-wrap:wrap; gap:4px; font-size:.85rem; }
.role-work-note { margin-bottom:16px; }
.role-order-list { display:grid; gap:14px; }
.role-order { display:grid; grid-template-columns:minmax(180px,.95fr) minmax(220px,1.25fr) minmax(220px,.9fr); gap:24px; padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); box-shadow:var(--shadow-xs); }
.role-order>div { min-width:0; overflow-wrap:anywhere; }
.role-recipient h3 { margin:10px 0 6px; font-size:1rem; }
.role-recipient p { margin:6px 0; font-size:.85rem; }
.role-recipient>a { font-size:.8rem; }
.role-recipient small { display:block; }
.role-time { padding-top:8px; }
.role-column-label { display:block; color:var(--muted); font-size:.75rem; margin-bottom:10px; }
.role-composition ul { list-style:none; padding:0; margin:0; }
.role-composition li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:.85rem; }
.role-composition li:first-child { padding-top:0; }
.role-composition strong { font-variant-numeric:tabular-nums; white-space:nowrap; }
.role-composition small { color:var(--muted); font-weight:400; }
.role-comment { margin:12px 0 0; padding:10px 12px; border-left:3px solid var(--brand); background:var(--surface-subtle); border-radius:0 8px 8px 0; font-size:.8rem; white-space:pre-wrap; }
.role-progress>.badge { white-space:normal; }
.role-next { font-size:.85rem; margin:12px 0; color:var(--ink-soft); font-weight:600; }
.department-marks { display:grid; gap:10px; margin:16px 0; font-size:.75rem; }
.department-mark { border-left:2px solid var(--line); padding-left:10px; }
.department-mark>span, .department-mark>strong, .department-mark>small { display:block; }
.department-mark>span, .department-mark>small { color:var(--muted); }
.department-mark>strong { font-size:.8rem; font-weight:500; margin:3px 0; }
.department-mark.is-done { border-color:var(--brand); }
.department-mark.is-stale { border-color:#b97b00; }
.department-mark.is-stale>strong { font-weight:700; }
.role-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px; }
.role-row-actions form, .role-row-actions .button { width:100%; }
.role-row-actions button { width:100%; }
.role-open { font-size:.8rem; }
.role-sync-error { color:var(--danger); font-size:.75rem; margin-bottom:0; }
.order-workbench-action>.department-marks { border-top:1px solid var(--line); padding-top:16px; }
.order-workbench-action>form:has([name=token]) { margin-top:12px; }
.order-workbench-action>form:has([name=token]) button { width:100%; }
@media(max-width:1200px) {
 .role-order { grid-template-columns:minmax(180px,1fr) minmax(220px,1.3fr); gap:20px; }
 .role-progress { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:0 24px; border-top:1px solid var(--line); padding-top:16px; }
 .role-progress>.department-marks { grid-column:2; grid-row:1/4; margin:0; }
 .role-progress>.badge { justify-self:start; }
 .role-row-actions { margin-top:4px; }
}
@media(max-width:680px) {
 .role-workspace-nav { flex-direction:column; gap:4px; }
 .role-workspace-nav nav { gap:0; }
 .role-workspace-nav nav a { padding:9px; font-size:.85rem; }
 .role-preview { width:100%; max-width:none; }
 .role-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .role-metrics>div { padding:14px; }
 .role-metrics span { min-height:32px; }
 .role-order { grid-template-columns:minmax(0,1fr); gap:18px; padding:18px; }
 .role-composition { border-top:1px solid var(--line); padding-top:16px; }
 .role-progress { display:block; }
 .role-progress>.department-marks { margin:16px 0; }
 .role-filters { padding:14px; }
 .role-filters>.role-search, .role-filters>.role-date, .role-filters>label { flex-basis:100%; }
 .role-filters>button, .role-filters>.button { flex:1 1 120px; }
 .role-task-tabs a { padding:8px; }
 .role-composition li { grid-template-columns:minmax(0,1fr) auto; }
}
/* Keep the queue visible without a dashboard-sized introduction. */
.role-workspace-hero { padding:22px 26px; gap:18px; }
.role-workspace-hero h1 { font-size:1.9rem; margin:0 0 6px; }
.role-workspace-hero p { margin:0; font-size:.9rem; }
.role-metrics { gap:0; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.role-metrics>div { border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; padding:12px 18px; gap:4px; }
.role-metrics>div:last-child { border-right:0; }
.role-metrics strong { font-size:1.5rem; }
@media(max-width:680px) {
 .role-workspace-hero { padding:18px; }
 .role-workspace-hero h1 { font-size:1.65rem; }
 .role-metrics { gap:0; }
 .role-metrics>div { padding:10px 14px; }
 .role-metrics>div:nth-child(2) { border-right:0; }
 .role-metrics>div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
 .role-metrics span { min-height:0; }
}

/* Dense daily queue: details expand only when requested. */
.role-order-list { gap:0; border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; }
.role-order { grid-template-columns:minmax(170px,1fr) minmax(220px,1.2fr) minmax(240px,1fr); gap:16px; padding:14px 18px; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; }
.role-order:last-child { border-bottom:0; }
.role-recipient h3 { margin:3px 0; font-size:.9rem; }
.role-recipient p { margin:3px 0; font-size:.8rem; }
.role-recipient small { font-size:.7rem; }
.role-time { padding-top:0; }
.role-column-label { margin-bottom:6px; }
.role-composition li { padding:4px 0; font-size:.8rem; }
.role-next { margin:5px 0; font-size:.8rem; }
.role-marks-compact { display:flex; flex-wrap:wrap; gap:2px 12px; font-size:.7rem; color:var(--muted); }
.role-row-actions { margin-top:8px; gap:8px; }
.role-row-actions form, .role-row-actions .button { width:auto; }
.role-row-actions button, .role-row-actions .button { min-height:36px; padding:7px 10px; font-size:.8rem; }
.role-address, .role-more-lines { font-size:.75rem; margin:4px 0; }
.role-address summary, .role-more-lines summary { cursor:pointer; color:var(--brand); }
.role-progress { display:block; grid-column:auto; border:0; padding:0; }
.departure-plan { font-size:.85rem; }
.departure-plan summary { margin-top:6px; cursor:pointer; }
.dispatch-work-details { border-top:1px solid var(--line); padding-top:10px; }
.dispatch-work-details>summary { cursor:pointer; font-weight:600; }
.dispatch-brief-lines { display:flex; gap:4px 16px; flex-wrap:wrap; margin:8px 0; font-size:.85rem; }
.dispatch-order-compact { padding:16px 20px; margin-bottom:10px; }
.dispatch-order-compact h2 { font-size:1rem; margin:4px 0; }
.dispatch-order-compact>p { margin:6px 0; }
@media(max-width:1000px) {
 .role-order { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .role-progress { grid-column:1/-1; border-top:1px solid var(--line); padding-top:8px; }
}
@media(max-width:540px) {
 .role-order { grid-template-columns:minmax(0,1fr); padding:14px; gap:10px; }
 .role-composition { padding-top:8px; }
 .role-progress { grid-column:auto; }
}
