/* Compact, scoped terminal inbox shared by the V1 and V2 shells. */
.trq { padding: 20px; margin: 20px 0; color: #25344d; }
.trq *, .trq-dialog * { box-sizing: border-box; }
.trq-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.trq-heading h2 { margin: 0 0 6px; font-size: 20px; }
.trq-heading p { margin: 0; color: #647089; font-size: 13px; }
.trq-heading a { color: #173b63; font-weight: 650; }
.trq-help, .trq-limit { padding: 12px 14px; background: #fff9e8; border-radius: 10px; color: #79501d; line-height: 1.5; font-size: 13px; }
.trq-filters { display: grid; grid-template-columns: minmax(180px,1fr) minmax(150px,220px) auto; align-items: end; gap: 12px; margin: 18px 0; }
.trq label { font-size: 13px; font-weight: 600; }
.trq-filters label, .trq-bulk > label { display: grid; gap: 6px; }
.trq input:not([type=checkbox]) { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; background: white; color: #25344d; font: inherit; }
.trq input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; margin: 0; flex: 0 0 18px; accent-color: #173b63; }
.trq button, .trq-dialog button { width: auto; min-height: 42px; padding: 10px 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: #173b63; cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; }
.trq button:disabled { opacity: .5; cursor: default; }
.trq-selection, .trq-selection label { display: flex; align-items: center; gap: 10px; }
.trq-selection { justify-content: space-between; flex-wrap: wrap; padding: 12px 0; font-size: 13px; }
.trq-groups { display: grid; gap: 8px; }
.trq-group { border: 1px solid #dfe5ef; border-radius: 10px; background: #fff; }
.trq [hidden] { display: none !important; }
.trq-group-heading { display: grid; grid-template-columns: 42px minmax(0,1fr); }
.trq-check { display: flex; align-items: flex-start; justify-content: center; padding-top: 20px; }
.trq details { min-width: 0; }
.trq summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 0; list-style: none; }
.trq summary::-webkit-details-marker { display: none; }
.trq summary strong { font-size: 14px; }
.trq-meta { display: block; color: #647089; font-size: 12px; font-weight: 400; margin-top: 4px; }
.trq-reasons { display: block; color: #79501d; font-size: 12px; line-height: 1.5; margin-top: 5px; overflow-wrap: anywhere; }
.trq-expand { color: #173b63; font-size: 12px; white-space: nowrap; }
.trq-expand::after { content: ' +'; }
.trq details[open] .trq-expand::after { content: ' −'; }
.trq-records { border-top: 1px solid #e5e7eb; padding: 0 16px 4px 0; }
.trq-record { display: grid; grid-template-columns: minmax(160px,1fr) minmax(120px,1fr) auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf0f5; }
.trq-record:last-child { border-bottom: 0; }
.trq-record > label { display: flex; gap: 10px; align-items: center; }
.trq-record [data-terminal-evidence-output] { grid-column: 1 / -1; font-size: 13px; }
.trq-record [data-terminal-evidence-output]:empty { display: none; }
.trq-record img { max-width: min(240px,100%); border-radius: 8px; }
.trq-bulk { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; margin-top: 16px; padding: 16px; background: #f1f6fa; border-radius: 10px; }
.trq-bulk > button, .trq-dialog [data-confirm] { background: #173b63; color: white; border-color: #173b63; }
.trq-bulk > p { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.5; }
.trq-bulk > p:empty { display: none; }
.trq-dialog { width: min(520px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid #cbd5e1; border-radius: 16px; padding: 24px; color: #25344d; }
.trq-dialog::backdrop { background: #10243d80; }
.trq-dialog h2 { font-size: 20px; margin-top: 0; }
.trq-dialog p { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.trq-dialog-note { padding: 12px; background: #f1f6fa; border-radius: 8px; }
.trq-dialog > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
@media (max-width: 700px) {
  .trq { padding: 14px; }
  .trq-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .trq-filters > label:first-child { grid-column: 1 / -1; }
  .trq summary { align-items: start; gap: 8px; }
  .trq-expand { font-size: 11px; white-space: normal; text-align: right; }
  .trq-record { grid-template-columns: minmax(0,1fr); }
  .trq-record button { justify-self: start; }
  .trq-bulk { grid-template-columns: minmax(0,1fr); }
}
