/* Permit Reviewer screens: queue views, case header, Review tab.
   Uses the tokens of app.css only, so light and dark both follow. */
.eyebrow { margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: normal; color: var(--fg-2); }
.queue-views { margin: 0 0 14px; padding: 0; flex-wrap: wrap; }
.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 14px;
  min-width: 0;
}
.queue-toolbar > .tabs,
.queue-toolbar > .queue-views { margin: 0; flex: 1 1 auto; min-width: 0; }
.queue-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 16rem;
  max-width: 100%;
  min-width: 0;
}
.queue-find label { font-size: .8rem; font-weight: 600; color: var(--fg-2); }
.queue-find input[type="search"] {
  flex: 1 1 12rem;
  width: 14rem;
  max-width: 100%;
  min-width: 0;
}
.queue-find-summary { padding: 10px 16px 0; margin: 0; }
.queue-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  max-width: 100%;
  vertical-align: middle;
}
.queue-tag {
  white-space: nowrap;
  flex: 0 0 auto;
  height: 18px;
  padding: 0 6px;
  font-size: .68rem;
  line-height: 18px;
}
.tag-filters { margin: 0; flex: 1 1 auto; min-width: 0; }
.queue-find-hit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  min-width: 0;
}
.queue-table td { vertical-align: top; }
.queue-table .dates { white-space: nowrap; font-size: .8rem; }
.queue-table .t1 { font-weight: 500; overflow-wrap: anywhere; }
.next-action { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-md); padding: 10px 14px; margin: 0 0 16px; background: var(--accent-soft); }
.next-action h2 { margin: 0 0 4px; font-size: .95rem; }
.next-action p { margin: 2px 0; }
.issue-plain { margin: 6px 0 12px; padding-left: 1.1rem; }
.issue-plain li { margin: 4px 0; overflow-wrap: anywhere; }
.follow-up { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--r-md); padding: 8px 14px; margin: 10px 0; }
.follow-up h3 { margin: 0 0 4px; }
.ai-summary { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--muse-soft); overflow-wrap: anywhere; }
.stage-line { margin: 14px 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--fg-2); }
.revisions { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 10px; }
.revisions li { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; overflow-wrap: anywhere; }
.case-head h1 { margin: 2px 0; }
.case-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
[data-testid="review-panel"] > section, [data-testid="documents-panel"] > h2 { margin-top: 18px; }
[data-testid="review-panel"] > section:first-child { margin-top: 0; }
[data-testid="review-panel"] h2, [data-testid="documents-panel"] h2, [data-testid="people-panel"] h2, [data-testid="timeline-panel"] h2 { font-size: 1.02rem; }
.workspace-ai-label .pill { margin-left: 4px; }
@media (max-width: 560px) {
  .queue-table .dates { white-space: normal; }
  .case-head .actions { width: 100%; }
  /* The review queue becomes one card per case. Stage and Next action stay
     on the card. The table wrap must not scroll sideways at phone width. */
  body[data-screen="review_queue"] .tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  body[data-screen="review_queue"] .queue-find,
  body[data-screen="queue"] .queue-find {
    width: 100%;
    flex-basis: 100%;
  }
  body[data-screen="review_queue"] .review-table-wrap {
    overflow-x: visible;
    max-width: 100%;
  }
  body[data-screen="review_queue"] .review-queue-table,
  body[data-screen="review_queue"] .review-queue-table tbody,
  body[data-screen="review_queue"] .review-queue-table tr,
  body[data-screen="review_queue"] .review-queue-table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  body[data-screen="review_queue"] .review-queue-table thead { display: none; }
  body[data-screen="review_queue"] .review-row {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
  }
  body[data-screen="review_queue"] .review-queue-table td {
    border: 0;
    overflow-wrap: anywhere;
    padding: 2px 0;
    text-align: left;
  }
  body[data-screen="review_queue"] .review-queue-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--fg-3);
    font-size: 0.72rem;
  }
}
