/* Project memory and request log dialogs. Uses the side panel tokens, so light and dark follow sidepanel.css. */
.records-dialog { width:min(94vw,600px); padding:18px 16px; }
.records-dialog > .hint { margin-bottom:4px; }
.records-dialog select, .records-dialog textarea, .records-dialog input[type="search"] { width:100%; margin-top:6px; padding:8px 10px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; font-size:13px; }
.records-dialog textarea { resize:vertical; font:inherit; font-size:13px; line-height:1.45; }
.records-filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 4px; }
.records-filters > input[type="search"] { flex:1 1 100%; margin:0; }
.records-filters > select { flex:1 1 140px; width:auto; margin:0; }
.records-filters > label:not(.records-check) { flex:1 1 130px; margin:0; }
.records-filters input[type="date"] { margin-top:4px; padding:7px 9px; font-size:13px; }
.records-check[hidden] { display:none !important; }
.records-check { display:flex !important; align-items:center; gap:6px; margin:0 !important; font-size:12.5px !important; color:var(--muted); white-space:nowrap; }
.records-check input { width:auto; margin:0; display:inline; }
#memoryAddToggle { margin-left:auto; }
.records-form { margin:10px 0 4px; padding:4px 12px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.records-form input, .records-form select, .records-form textarea { background:var(--bg); }
.records-form > .hint { margin-top:10px; }
.records-form .row { margin-top:12px; }
#memoryStatus, #logStatusLine { margin:8px 2px 0; overflow-wrap:anywhere; }
#memoryStatus.error, #logStatusLine.error { color:var(--bad); }
.records-list { margin-top:6px; display:grid; gap:8px; }
.records-empty { margin:14px 0 4px; padding:18px 16px; border:1px solid var(--border); border-radius:10px; text-align:center; color:var(--muted); font-size:13px; }
.records-empty strong { display:block; color:var(--text); font-size:14px; margin-bottom:4px; }
.records-empty p { margin:0; font-size:12.5px; line-height:1.5; }
.records-more { display:block; margin:8px auto 0; }
/* memory entries */
.memory-entry { padding:10px 12px; border:1px solid var(--border); border-radius:10px; min-width:0; }
.memory-entry[data-status="outdated"] { background:var(--surface); }
.memory-entry[data-status="outdated"] .memory-topic, .memory-entry[data-status="outdated"] .memory-text { color:var(--muted); }
.memory-head { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; }
.memory-topic { font-size:13.5px; font-weight:600; min-width:0; overflow-wrap:anywhere; flex:1 1 160px; }
.kind-pill, .status-pill { flex:none; padding:1px 8px; border-radius:999px; font-size:10.5px; font-weight:650; letter-spacing:.01em; background:var(--surface-2); color:var(--muted); }
.kind-pill[data-kind="decision"] { background:var(--accent-soft); color:var(--accent); }
.kind-pill[data-kind="finding"] { background:var(--ok-soft); color:var(--ok); }
.kind-pill[data-kind="environment"] { background:var(--surface-2); color:var(--text); }
.kind-pill[data-kind="openquestion"] { background:var(--warn-soft); color:var(--warn); }
.status-pill { background:var(--warn-soft); color:var(--warn); }
.memory-text { margin:6px 0 4px; font-size:13px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.memory-meta, .memory-reason { display:block; font-size:11.5px; color:var(--muted); }
.memory-reason { margin-top:2px; font-style:italic; }
.memory-details { margin-top:6px; font-size:12.5px; }
.memory-details summary { cursor:pointer; color:var(--muted); font-size:12px; width:max-content; max-width:100%; }
.memory-details summary:hover { color:var(--text); }
.memory-details strong { display:block; margin-top:6px; font-size:12px; }
.memory-sources, .memory-history { margin:6px 0 0; padding-left:18px; color:var(--text); }
.memory-sources li, .memory-history li { margin:2px 0; overflow-wrap:anywhere; }
.memory-actions { display:flex; justify-content:flex-end; gap:4px; margin-top:4px; }
.danger-text { color:var(--bad) !important; }
.memory-confirm { margin-top:8px; padding:10px; border-radius:8px; background:var(--bad-soft); font-size:12.5px; }
.memory-confirm input { margin-top:8px; background:var(--bg); }
.memory-confirm .row { margin-top:8px; }
/* request log */
.records-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; min-height:24px; }
.log-table { width:100%; margin-top:6px; border-collapse:separate; border-spacing:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; font-size:12.5px; table-layout:fixed; }
.log-table th { text-align:left; padding:6px 8px; font-size:11px; font-weight:650; letter-spacing:.02em; text-transform:uppercase; color:var(--faint); background:var(--surface); border-bottom:1px solid var(--border); }
.log-table th:first-child { width:74px; } .log-table th:last-child { width:98px; text-align:right; }
.log-table td { padding:7px 8px; vertical-align:top; border-top:1px solid var(--border); }
.log-table tbody tr:first-child td { border-top:0; }
.log-table tbody tr { cursor:pointer; }
.log-table tbody tr:hover, .log-table tbody tr:focus-visible { background:var(--surface); outline:none; }
.log-table tbody tr:focus-visible td:first-child { box-shadow:inset 2px 0 0 var(--accent); }
.log-when { color:var(--muted); font-size:11.5px; line-height:1.35; }
.log-main { min-width:0; }
.log-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.log-main small { display:block; color:var(--muted); font-size:11px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.log-result { text-align:right; }
.log-result .badge, #logDetail .badge { font-size:10.5px; }
.log-back { margin:8px 0 4px; padding-left:0; }
.log-detail-list { display:grid; grid-template-columns:96px minmax(0,1fr); gap:6px 10px; margin:8px 0 0; font-size:12.5px; }
.log-detail-list dt { color:var(--muted); font-size:12px; }
.log-detail-list dd { margin:0; min-width:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.log-items { margin:0; padding-left:16px; white-space:normal; }
.log-items li { margin:1px 0; }
.log-items small { margin-left:6px; font-size:11px; color:var(--muted); }
.log-items small.bad { color:var(--bad); }
@media (max-width:420px) {
  .records-dialog { width:calc(100vw - 16px); max-width:none; padding:16px 12px; }
  .log-detail-list { grid-template-columns:1fr; gap:2px; }
  .log-detail-list dd { margin-bottom:6px; }
  .log-table th:first-child { width:62px; } .log-table th:last-child { width:92px; }
}
/* feedback */
.feedback-more { margin:6px 0 2px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); display:grid; gap:8px; font-size:12.5px; }
.feedback-more strong { font-size:12.5px; }
.feedback-more textarea, #feedbackDialog textarea { width:100%; display:block; margin-top:6px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--text); font:inherit; font-size:13px; resize:vertical; }
.feedback-more textarea { margin:0; }
.feedback-more .row { margin:0; justify-content:flex-end; display:flex; gap:8px; }
.feedback-more .file-status.error { color:var(--bad); }
.feedback-reasons { display:flex; flex-wrap:wrap; gap:6px; }
.feedback-reason { padding:3px 10px; border-radius:999px; border:1px solid var(--border-strong); background:var(--bg); color:var(--text); font-size:12px; }
.feedback-reason[aria-checked="true"] { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); font-weight:600; }
.feedback-thanks { margin:0; color:var(--ok); }
.feedback-project { margin-top:12px !important; }
.records-downloads { display:flex; gap:2px; flex-wrap:wrap; justify-content:flex-end; }
.feedback-summary { margin-top:8px; }
.feedback-summary strong { font-size:12px; }
.feedback-table { table-layout:auto; }
.feedback-table th, .feedback-table td { text-align:left !important; width:auto !important; }
.feedback-table .num { text-align:right !important; font-variant-numeric:tabular-nums; }

.access-key-row { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.access-key-who { flex:1; min-width:160px; }
#accessKeyValue { width:100%; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; }

/* feedback review (administrator) */
.review-tabs { display:flex; gap:2px; margin:12px 0 4px; padding:3px; border-radius:9px; background:var(--surface-2); }
.review-tabs button { flex:1; padding:5px 8px; border:0; border-radius:7px; background:none; color:var(--muted); font-size:12.5px; font-weight:600; }
.review-tabs button[aria-selected="true"] { background:var(--bg); color:var(--text); box-shadow:0 1px 2px rgba(20,26,45,.12); }
.review-bar { flex-wrap:wrap; margin:6px 0 8px; }
.review-bar .hint { flex:1 1 180px; font-size:12px; }
#reviewPick { margin:0 0 8px; }
#reviewStatus { margin:6px 2px 0; overflow-wrap:anywhere; } #reviewStatus.error { color:var(--bad); }
.review-group { display:grid; gap:8px; margin-top:6px; }
.review-group h3 { margin:6px 0 0; font-size:12px; font-weight:650; letter-spacing:.02em; text-transform:uppercase; color:var(--faint); }
.review-item { margin-top:8px; padding:8px 10px; border-radius:8px; background:var(--surface); }
.review-item strong { margin-top:6px; font-size:11.5px; color:var(--muted); }
.review-quote { margin:4px 0 0; font-size:12.5px; line-height:1.45; overflow-wrap:anywhere; }
.review-text { margin:2px 0 0; font-size:12px; line-height:1.45; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; max-height:9em; overflow:auto; }
.review-actions { flex-wrap:wrap; align-items:center; margin-top:8px; }
.review-actions button.primary, .review-actions button.ghost { padding:5px 12px; font-size:12.5px; }
.review-decision { margin:8px 0 0; font-size:12px; color:var(--muted); }
.review-edit label { margin-top:10px; }
.review-edit input, .review-edit select, .review-edit textarea { margin-top:4px; }
