/* queues screen styles (team round, 23.11.2026). Loaded after screens.css; prefix screen-only classes. */
/* W1-D: Queues overview, queue detail, Possibly Sent, Failed Messages. Replaces the old .queue-card, .decide-card,
   .qcol and .dlq-item rules in screens.css (no longer used by queues.js). */

/* ---------- Overview: decision cards ---------- */
.q-decide-grid { margin-bottom: var(--sp-2); }
.card.q-decide { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); min-width: 0; }
.q-decide-ic { width: 40px; height: 40px; flex: none; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-muted); }
.q-decide-ic svg { width: 20px; height: 20px; }
.q-decide-ic.bad { background: var(--danger-soft); color: #FCA5A5; }
.q-decide-ic.warn { background: var(--warning-soft); color: #FCD34D; }
.q-decide-text { flex: 1 1 auto; min-width: 0; }
.q-decide-name { font-weight: 700; font-size: var(--fs-md); }
.q-decide-d { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.q-decide-num { flex: none; text-align: right; min-width: 92px; }
.q-decide-n { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.q-decide-n.bad { color: #FCA5A5; }
.q-decide-n.warn { color: #FCD34D; }
.q-decide-old { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; margin-top: 2px; }
.card.q-decide > .btn { flex: none; }

/* ---------- Overview: message flow lanes ---------- */
.q-lanes { display: grid; gap: var(--sp-4); }
.card.q-lane { padding: var(--sp-5); min-width: 0; }
.q-lane-head h3 { display: flex; align-items: center; gap: 10px; }
.q-lane-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }
.q-steps { display: flex; align-items: stretch; gap: var(--sp-2); margin-top: var(--sp-4); }
.q-steps > .q-step { flex: 1 1 0; min-width: 0; }
.q-step-arrow { flex: none; display: flex; align-items: center; color: var(--text-disabled); }
.q-step-arrow svg { width: 16px; height: 16px; }
.q-step { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--bg-elevated); color: var(--text-primary); transition: border-color var(--dur-fast), background var(--dur-fast); }
.q-step:hover { border-color: var(--border-strong); background: var(--bg-hover); text-decoration: none; }
.q-step-n { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-hover); color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 800; font-variant-numeric: tabular-nums; }
.q-step-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-step-name { font-weight: 700; font-size: var(--fs-sm); }
.q-step-hint { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.4; }
.q-step-num { flex: none; display: flex; flex-direction: column; align-items: flex-end; min-width: 56px; }
.q-step-num b { font-size: var(--fs-md); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-step-num span { font-size: var(--fs-xs); color: var(--text-muted); }
.q-targets-h { display: flex; align-items: center; gap: 10px; margin: var(--sp-4) 0 var(--sp-3); font-weight: 700; font-size: var(--fs-sm); }
.q-none { font-size: var(--fs-sm); color: var(--text-muted); padding: var(--sp-3) 0 0; }

/* Per LIS connection / per instrument rows: fixed columns, the name takes the rest. */
.q-tbl { table-layout: fixed; width: 100%; }
.q-tbl th:nth-child(2), .q-tbl td:nth-child(2) { width: 96px; }
.q-tbl th:nth-child(3), .q-tbl td:nth-child(3) { width: 130px; }
.q-tbl th:nth-child(4), .q-tbl td:nth-child(4) { width: 190px; }
.q-tbl th:nth-child(5), .q-tbl td:nth-child(5) { width: 170px; }
.q-tbl th:nth-child(6), .q-tbl td:nth-child(6) { width: 140px; }
.q-tbl td { white-space: normal; padding-top: 8px; padding-bottom: 8px; }
.q-tbl td.q-c-name { overflow-wrap: break-word; }
.q-qname { display: inline-flex; align-items: center; gap: 8px; color: var(--text-primary); font-weight: 600; max-width: 100%; }
.q-qname svg { width: 15px; height: 15px; flex: none; color: var(--text-muted); }
.q-qname:hover svg { color: var(--accent); }
.q-cell-sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.q-late { color: #FCD34D; }

/* ---------- Queue detail ---------- */
.q-dtbl { table-layout: fixed; width: 100%; }
.q-dtbl th:nth-child(1), .q-dtbl td:nth-child(1) { width: 180px; }
.q-dtbl th:nth-child(3), .q-dtbl td:nth-child(3) { width: 120px; }
.q-dtbl th:nth-child(5), .q-dtbl td:nth-child(5) { width: 270px; }
.q-dtbl td { white-space: normal; padding-top: 8px; padding-bottom: 8px; }
.q-err { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-sm); line-height: 1.4; }
.q-dtbl .actions .btn, .q-ptbl .actions .btn { white-space: nowrap; }

/* ---------- Possibly Sent ---------- */
.q-ptbl { table-layout: fixed; width: 100%; }
.q-ptbl th:nth-child(1), .q-ptbl td:nth-child(1) { width: 170px; }
.q-ptbl th:nth-child(3), .q-ptbl td:nth-child(3) { width: 130px; }
.q-ptbl th:nth-child(5), .q-ptbl td:nth-child(5) { width: 110px; }
.q-ptbl th:nth-child(6), .q-ptbl td:nth-child(6) { width: 250px; }

/* ---------- Failed Messages ---------- */
.q-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.q-toolbar-sum { font-size: var(--fs-sm); color: var(--text-muted); }
.q-group + .q-group { margin-top: var(--sp-5); }
.q-group-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); font-weight: 700; font-size: var(--fs-md); }
.q-code { font-family: var(--font-mono); font-variant-ligatures: none; font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--danger-soft); color: #FCA5A5; }
.q-group-list { display: grid; gap: var(--sp-3); }
.card.q-fail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: start; padding: var(--sp-4); }
.q-fail-main { min-width: 0; }
.q-fail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--sp-2); font-weight: 600; }
.q-fail-head .mono { font-family: var(--font-mono); font-variant-ligatures: none; font-size: var(--fs-sm); font-weight: 700; }
.q-sep { color: var(--text-disabled); }
.q-fail-reason { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }
.q-fail-fix { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }
.q-fail-fix svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--text-muted); }
.q-fail-fix b { color: var(--text-primary); font-weight: 600; }
.q-fail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }
.q-fail-meta > * { white-space: nowrap; }
.q-fail-meta > * + *::before { content: '·'; margin: 0 8px; color: var(--text-disabled); }
.q-cid { font-family: var(--font-mono); font-variant-ligatures: none; white-space: nowrap; }
.q-fail-acts { display: flex; align-items: center; gap: var(--sp-2); }
.q-fail-acts .q-act { min-width: 132px; justify-content: center; }
.q-act-wrap { display: inline-flex; cursor: not-allowed; }
/* A disabled button gets no hover events: let the wrapper show its reason tooltip. */
.q-act-wrap > .btn[disabled] { pointer-events: none; }

/* Bulk replay progress */
.banner.q-bulk { align-items: center; margin-bottom: var(--sp-4); }
.q-bulk-body { flex: 1 1 auto; min-width: 0; }
.q-progress { height: 6px; margin-top: var(--sp-2); border-radius: var(--r-full); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.q-progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--dur-base) var(--ease-out); }

/* ---------- Menu on the top layer (More, row menus) ---------- */

/* Empty states inside a card */
.card.q-empty { padding: 0; }
