/* Focused layout fixes kept separate while the main style sheet remains compact. */
.audit-row {
  grid-template-columns: 112px minmax(0, 1fr) auto;
}

.audit-row > div {
  min-width: 0;
}

.audit-row b,
.audit-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Opinion-feedback queue: uses the existing dark console tokens and status colors. */
.nav-feedback-badge { background: rgb(94 168 255 / 18%); border-radius: 999px; color: #a9d1ff; font-size: 10px; font-weight: 800; margin-left: auto; min-width: 19px; padding: 2px 5px; text-align: center; }
.nav-feedback-badge.unknown { color: #ffd695; }
.feedback-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 14px; }
.feedback-segments { background: #0d1727; border: 1px solid var(--border); border-radius: 6px; display: flex; overflow: hidden; }
.feedback-segments button { background: transparent; border: 0; color: var(--text-2); min-height: 32px; padding: 0 10px; }
.feedback-segments button + button { border-left: 1px solid var(--border); }
.feedback-segments button.active { background: rgb(74 179 167 / 15%); color: #b4f0e8; font-weight: 700; }
.feedback-readonly-setting,.feedback-result-count { color: var(--muted); font-size: 12px; margin: 0; }
.feedback-settings { color: var(--text-2); font-size: 12px; margin-left: auto; position: relative; }
.feedback-settings summary { cursor: pointer; list-style: none; padding: 7px 0; }
.feedback-settings summary::after { color: var(--muted); content: "⌄"; margin-left: 5px; }
.feedback-settings[open] { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow); padding: 8px 10px; z-index: 2; }
.feedback-settings form { align-items: center; display: flex; gap: 7px; margin-top: 7px; }
.feedback-settings input { background: #0d1727; border: 1px solid var(--border); border-radius: 5px; color: var(--text); height: 31px; padding: 0 7px; width: 64px; }
.feedback-settings p { color: var(--muted); line-height: 1.5; margin: 8px 0 0; max-width: 245px; }
.feedback-version { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-summary { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; line-height: 1.55; overflow: hidden; }
.feedback-row:focus-visible,.feedback-card:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.feedback-cards { display: none; }
.feedback-card { background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--text-2); display: grid; gap: 5px; padding: 13px 14px; text-align: left; width: 100%; }
.feedback-card:hover { background: var(--surface-hover); }
.feedback-card > span:first-child { align-items: center; display: flex; justify-content: space-between; }
.feedback-card time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.feedback-card b { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-card small { color: var(--muted); font-family: "Cascadia Mono",Consolas,monospace; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-result-count { padding: 10px 14px; }
.feedback-detail-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-detail-meta > span:not(.status) { color: var(--muted); font-size: 11px; }
.feedback-content { color: var(--text-2); font-size: 13px; line-height: 1.7; margin: -5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.feedback-images { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-image { align-items: center; background: #0d1727; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); display: flex; font-size: 11px; height: 88px; justify-content: center; overflow: hidden; padding: 0; width: 88px; }
.feedback-image:hover { border-color: var(--focus); }
.feedback-image img { height: 100%; object-fit: cover; width: 100%; }
.feedback-image.failed { border-color: rgb(238 114 114 / 45%); color: #ffb4b4; padding: 8px; text-align: center; }
.feedback-preview { align-items: center; background: rgb(0 0 0 / 78%); display: flex; flex-direction: column; gap: 14px; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 70; }
.feedback-preview > .icon-button { position: fixed; right: 18px; top: 18px; }
.feedback-preview img { max-height: calc(100vh - 130px); max-width: min(900px,100%); object-fit: contain; }
.feedback-preview > div { align-items: center; color: var(--text-2); display: flex; gap: 10px; font-size: 12px; }

@media (min-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .feedback-toolbar { align-items: stretch; display: grid; grid-template-columns: 1fr; }
  .feedback-toolbar > .filter-select,.feedback-toolbar > .secondary-button,.feedback-segments { min-width: 0; width: 100%; }
  .feedback-segments button { flex: 1; }
  .feedback-settings { margin-left: 0; }
  .feedback-settings[open] { width: 100%; }
  .feedback-settings form { align-items: stretch; flex-wrap: wrap; }
  .feedback-settings form label { align-items: center; display: flex; gap: 5px; }
  .feedback-table-wrap { display: none; }
  .feedback-cards { display: block; }
  .feedback-preview { padding: 16px; }
}

@media (max-width: 319px) {
  body { min-width: 300px; }
  .topbar { padding: 0 10px; }
  .page-content { padding: 12px; }
  body.feedback-page { min-width: 0; overflow-x: hidden; }
  body.feedback-page .feedback-toolbar,
  body.feedback-page #feedback-results,
  body.feedback-page .drawer,
  body.feedback-page .drawer-head,
  body.feedback-page .drawer-body,
  body.feedback-page .drawer-actions,
  body.feedback-page .kv-grid,
  body.feedback-page .kv-item { max-width: 100%; min-width: 0; }
  body.feedback-page .drawer-head > div { min-width: 0; }
  body.feedback-page .drawer-head h3 { overflow-wrap: anywhere; }
  body.feedback-page .drawer-actions { flex-wrap: wrap; }
}
