/* page-logs.css — extracted from style.css 2026-05-27 (UX-6 cut 2).
 *
 * /logs page styles — the main grid, Ask AI assistant bar, /logs/ask
 * results page, click-to-explain inline AI rows, sortable column
 * headers, and the domain-autocomplete sidebar dropdown. All `.logs-*`
 * / `.ask-*` / `.lt-*` selectors. Originally style.css commits 2.5
 * through 2.12.
 *
 * NOTE: a few scattered /logs subsections still live in style.css —
 * in-row block menu, severity checkboxes, UUID column, info row,
 * personal-defaults bar, export menu, severity dot column. Those
 * extract in a follow-up cut to keep this diff reviewable.
 *
 * Loaded AFTER style.css + components.css via base.html so page-
 * specific rules win ties against broader rules. See the load-order
 * comment in base.html for the pattern.
 */

/* ─── /logs page ────────────────────────────────────────────────────────── */
.logs-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
  margin: -8px -4px 0;
}
.logs-sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  position: sticky;
  top: calc(var(--hdr-h) + 14px);
  max-height: calc(100vh - var(--hdr-h) - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.ls-section { margin-bottom: 18px; }
.ls-section:last-child { margin-bottom: 4px; }
.ls-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 700;
}
.ls-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ls-list li { margin: 0 0 1px; }
.ls-list a {
  display: block;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-list a:hover { background: var(--bg-soft); color: var(--text); }
.ls-list a.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.ls-list-mono a { font-family: var(--mono); font-size: 14px; }
/* Single-item monospace fallback (used for unmapped site UUIDs in sidebar) */
.ls-list a.ls-mono { font-family: var(--mono); font-size: 14px; opacity: 0.75; }

/* Host group collapsibles (commit 2.42). The Host section now nests a
   <details> per platform (Enhance / Plesk / TrueNAS / NOC / XCP-ng /
   Other / Tenants). Each group remembers its open/closed state via
   localStorage (see logs.js). */
.ls-host-group { margin: 0 0 4px; }
.ls-host-group-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  user-select: none;
}
.ls-host-group-summary::-webkit-details-marker { display: none; }
.ls-host-group-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  font-size: 14px;
  color: var(--text-mute);
  transition: transform 0.12s ease-out;
}
.ls-host-group[open] > .ls-host-group-summary::before {
  transform: rotate(90deg);
}
.ls-host-group-summary:hover { background: var(--bg-soft); color: var(--text); }
.ls-host-group-name { flex: 1; }
.ls-host-group-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mute);
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}
.ls-list-grouped { padding-left: 14px; margin-top: 2px; }
.ls-list-grouped a { padding-left: 10px; }

/* Nested subgroups inside Tenants — one expandable row per customer. */
.ls-host-subgroup { margin: 0 0 2px 14px; }
.ls-host-subgroup-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  user-select: none;
}
.ls-host-subgroup-summary::-webkit-details-marker { display: none; }
.ls-host-subgroup-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 5px;
  font-size: var(--fs-xs);
  color: var(--text-mute);
  transition: transform 0.12s ease-out;
}
.ls-host-subgroup[open] > .ls-host-subgroup-summary::before {
  transform: rotate(90deg);
}
.ls-host-subgroup-summary:hover { background: var(--bg-soft); color: var(--text); }
.ls-host-subgroup-name { flex: 1; }
.ls-host-subgroup-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mute);
  background: var(--bg-soft);
  padding: 0 5px;
  border-radius: 7px;
  min-width: 14px;
  text-align: center;
}
.ls-list-nested { padding-left: 20px; }

/* Visual flag for inventory rows that have no Loki host label yet —
   Promtail isn't running on these VMs so clicking won't return logs.
   commit 2.47. */
.ls-list a.ls-host-no-loki {
  color: var(--text-mute);
  font-style: italic;
  opacity: 0.65;
}
.ls-list a.ls-host-no-loki::after {
  content: " ⚠";
  font-style: normal;
  opacity: 0.5;
  font-size: 14px;
}
.ls-list a.ls-host-no-loki:hover {
  opacity: 1;
  background: var(--bg-soft);
}

/* Sidebar Host section header actions — "▾ all" / "▸ all" quick toggles
   to collapse/expand every group at once. commit 2.48. */
.ls-host-actions {
  float: right;
  font-weight: 400;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.ls-host-action {
  color: var(--text-mute);
  text-decoration: none;
  margin-left: 4px;
}
.ls-host-action:hover {
  color: var(--text);
  text-decoration: underline;
}
.ls-host-action-sep {
  color: var(--text-mute);
  opacity: 0.5;
  margin: 0 2px;
}
.ls-fixed {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--bg-soft);
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ls-locked { font-size: 14px; text-transform: uppercase; color: var(--text-mute); font-weight: 500; }

.logs-main { min-width: 0; }

.logs-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.logs-filterbar input[type="text"],
.logs-filterbar select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  color: var(--text);
}
.logs-filterbar input[type="text"]:focus,
.logs-filterbar select:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(247,148,30,0.18);
}
.fb-search { flex: 1 1 280px; min-width: 200px; }
.fb-range { font-size: 14px; }
.fb-toggle {
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.fb-toggle input { accent-color: var(--brand); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { filter: brightness(0.95); }
.fb-reset { color: var(--text-mute); font-size: 14px; margin-left: 4px; }
.fb-reset:hover { color: var(--brand); }

.logs-info {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.logs-info-sep { opacity: 0.5; }
.logs-info-range { color: var(--text-2); font-weight: 500; }
.logs-tail-on { color: var(--green); font-weight: 600; }
.logs-trunc {
  width: 100%;
  margin-top: 4px;
  color: var(--orange);
  font-size: 14px;
}

.logs-pager {
  font-size: 14px;
  color: var(--text-mute);
  margin: 6px 0;
}
.logs-pager a {
  color: var(--brand-deep);
  text-decoration: none;
  margin: 0 4px;
  padding: 2px 6px;
  border-radius: 4px;
}
.logs-pager a:hover { background: var(--brand-soft); }
.logs-pager .lp-cur {
  font-weight: 700;
  color: var(--text);
  padding: 2px 6px;
  background: var(--bg-soft);
  border-radius: 4px;
  margin: 0 4px;
}

.logs-table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
  max-height: 65vh;
  box-shadow: var(--shadow-sm);
}
.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 14px;
  /* fixed layout so column widths are honored deterministically, instead
   * of letting one long off-screen row blow out a column and starve the
   * EVENT column. With auto-layout, table-layout measures every row to
   * decide column widths — a single 30-char Plesk domain in SITE was
   * forcing SITE wider than EVENT. */
  table-layout: fixed;
}
.logs-table thead th {
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 8px 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
}
.logs-table tbody td {
  padding: 5px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.logs-table tbody tr:nth-child(2n) { background: var(--bg-soft); }
.logs-table tbody tr.lt-red {
  background: var(--red-bg) !important;
  color: var(--text);
}
.logs-table tbody tr.lt-red .lt-line code,
.logs-table tbody tr.lt-red .lt-host,
.logs-table tbody tr.lt-red .lt-time { color: var(--text); }
.logs-table tbody tr.lt-rawrow td {
  background: var(--bg-soft);
  color: var(--text-mute);
}
.logs-table tbody tr.lt-rawrow pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 14px;
}

/* Column widths — `table-layout: fixed` (see .logs-table) makes these
 * authoritative. EVENT gets `auto` which under fixed-layout means "all
 * the remaining width." Long metadata values truncate with ellipsis and
 * the hover-title (set on the inner span/code) reveals the full text. */
.lt-time   { width: 70px;  white-space: nowrap; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; }
.lt-host   { width: 110px; white-space: nowrap; font-weight: 600; font-family: var(--sans); overflow: hidden; text-overflow: ellipsis; }
.lt-comp   { width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-site   { width: 160px; white-space: nowrap; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; }
.lt-sev    { width: 36px;  white-space: nowrap; text-align: center; }
.lt-status { width: 52px;  white-space: nowrap; }
.lt-ip     { width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-uuid   { width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* EVENT: no width = takes everything left over under table-layout:fixed. */
.lt-line   { word-break: break-word; }
.lt-line code { word-break: break-word; white-space: pre-wrap; color: var(--text-2); }
.lt-empty { text-align: center; color: var(--text-mute); padding: 24px; font-family: var(--sans); }

.lt-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-soft);
  color: var(--text-2);
  font-family: var(--sans);
}
.lt-pill-red    { background: var(--red-bg); color: var(--red-deep); }
.lt-pill-yellow { background: var(--yellow-bg); color: var(--yellow-deep); }
.lt-pill-blue   { background: #dbeafe; color: #1d4ed8; }
[data-theme="dark"] .lt-pill-blue { background: #1e3a8a; color: #93c5fd; }

/* HTTP status-code text on white — deep tokens for AA (bright tokens were 2.9-3.3:1) */
.status-2xx { color: var(--green-deep); font-weight: 700; }
.status-3xx { color: var(--yellow-deep); font-weight: 700; }
.status-4xx { color: var(--orange-deep); font-weight: 700; }
.status-5xx { color: var(--red-deep); font-weight: 700; }

/* ─── Sortable column headers (Time, Host, Source, Site, Sev, Status, IP) ─── */
.lt-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.lt-sort-link:hover { color: var(--accent); }
.lt-sort-arrow {
  font-size: 14px;
  line-height: 1;
  opacity: 0.85;
}
.lt-sort-arrow .lt-sort-inactive {
  opacity: 0.35;
  font-size: 14px;
}
.logs-table thead th.lt-sort-active {
  background: var(--bg-soft);
  color: var(--accent);
}
.logs-table thead th.lt-sort-active .lt-sort-arrow {
  color: var(--accent);
  opacity: 1;
}

/* ─── Ask AI — prominent natural-language assistant bar ─── */
/* Layout note: the global `.btn-primary` has `width: 100%` so we can't just
 * rely on `flex: 0 0 auto` on the button — we have to explicitly override
 * `width: auto`. Also, flex children with intrinsic content (textareas) need
 * `min-width: 0` to shrink/grow correctly inside a flex row. */
.ask-bigbar {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: stretch;
  margin: 0 0 14px 0;
  padding: 14px;
  background: linear-gradient(135deg, #ecfeff 0%, #f5f3ff 100%);
  border: 1px solid #67e8f9;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
/* Logs → /ai handoff bar (commit 2.30 — replaced the broken Ask AI form) */
.logs-ai-handoff { align-items: center; gap: 14px; padding: 12px 16px; }
.logs-ai-handoff-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.logs-ai-handoff-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.logs-ai-handoff-label { display: block; font-size: 14px; color: var(--text); }
.logs-ai-handoff-q {
  display: block; font-size: 14px; line-height: 1.4;
  font-style: italic; overflow: hidden; text-overflow: ellipsis;
}
[data-theme="dark"] .ask-bigbar {
  background: linear-gradient(135deg, #164e63 0%, #312e81 100%);
  border-color: #0e7490;
}
.ask-textarea {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;       /* allow shrinking below intrinsic textarea width */
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
}
.ask-textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.ask-textarea::placeholder { color: var(--text-mute); }
.ask-submit.btn.btn-primary {
  /* Override .btn-primary's width:100% AND beat the cascade order. */
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
  align-self: stretch;
  padding: 10px 22px;
  font-size: 14px;
}
.ai-flash {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 8px 12px;
  margin: 0 0 10px 0;
  background: #ecfeff;
  border: 1px solid #67e8f9;
  border-radius: 6px;
  font-size: 14px;
  color: #155e75;
}
[data-theme="dark"] .ai-flash {
  background: #164e63;
  border-color: #0e7490;
  color: #cffafe;
}
.ai-flash-icon { font-size: 16px; }
.ai-flash-orig { color: var(--text-mute); font-size: 14px; font-style: italic; }
.ai-flash-error {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

/* ─── /logs/ask result page (analyst view) ─── */
.ask-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 8px;
}
.ask-page-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}
.ask-back {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 14px;
}
.ask-back:hover { color: var(--accent); }
.ask-page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ask-question {
  margin: 16px 0 8px 0;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.ask-question-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.ask-question-text {
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  margin-top: 4px;
}
.ask-summary {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 16px 0 24px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ecfeff 0%, #f5f3ff 100%);
  border: 1px solid #67e8f9;
  border-radius: 10px;
}
[data-theme="dark"] .ask-summary {
  background: linear-gradient(135deg, #164e63 0%, #312e81 100%);
  border-color: #0e7490;
}
.ask-summary-icon { font-size: 22px; flex-shrink: 0; }
.ask-summary-text { font-size: 15px; line-height: 1.55; color: var(--text); }
.ask-section-title {
  margin: 28px 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}
.ask-finding {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg);
}
.ask-finding-red    { border-left-color: var(--red); }
.ask-finding-yellow { border-left-color: var(--yellow); }
.ask-finding-blue   { border-left-color: #3b82f6; }
.ask-finding-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ask-sev-badge {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
}
.ask-sev-red    { background: var(--red); }
.ask-sev-yellow { background: var(--yellow); color: #5a4400; }
.ask-sev-blue   { background: #3b82f6; }
.ask-finding-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.ask-finding-why {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0 0 12px 0;
}
.ask-finding-actions {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ask-finding-action {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.ask-finding-action-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.ask-finding-action-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.ask-empty {
  padding: 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
}
.ask-empty p { margin: 8px 0; }
.ask-context {
  margin-top: 28px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 6px;
}
.ask-context-summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--text-mute);
  font-weight: 500;
}
.ask-context-summary:hover { color: var(--accent); }
.ask-context-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 14px;
}
.ask-context-table th,
.ask-context-table td {
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.ask-context-sample {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-mute);
  background: transparent;
  padding: 0;
}
.ask-footnote {
  margin-top: 32px;
  font-size: 14px;
  text-align: center;
}

/* ─── Click-to-explain row + inline AI explanation ─── */
.lt-clickable { cursor: pointer; }
.lt-clickable:hover { background: var(--bg-soft) !important; }
.lt-explainrow td {
  background: #fefce8 !important;
  padding: 0 !important;
  border-top: 0;
}
[data-theme="dark"] .lt-explainrow td { background: #422006 !important; }
.lt-explain-loading,
.lt-explain-text,
.lt-explain-error {
  padding: 10px 14px 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.lt-explain-loading { color: var(--text-mute); font-style: italic; }
.lt-explain-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  vertical-align: middle;
}
.lt-explain-body { color: var(--text); }
.lt-explain-error { color: var(--red); }

/* ─── Domain autocomplete dropdown (sidebar Domain input) ─── */
.domain-ac-wrap { position: relative; }
.domain-ac-input {
  width: 100%;
  padding: 6px 9px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  box-sizing: border-box;
}
.domain-ac-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.domain-ac-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-family: var(--mono);
  font-size: 14px;
}
.domain-ac-item {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.domain-ac-item:hover,
.domain-ac-item.active {
  background: var(--bg-soft);
  border-left-color: var(--accent);
}
.domain-ac-domain {
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}
.domain-ac-meta {
  color: var(--text-mute);
  font-size: 14px;
  margin-top: 2px;
}
.domain-ac-alias .domain-ac-domain {
  color: var(--text-mute);
  font-style: italic;
}



/* ════════════════════════════════════════════════════════════════════
 * Cut 9 fold-in (2026-05-27): scattered /logs subsections that
 * didn't fit cut 2's contiguous extraction. With these in place,
 * every /logs CSS rule now lives here in page-logs.css. */
/* ─── Ask AI diagnostic panel (Phase A.1, Task #60) ─── */
.ask-debug {
  margin: 24px 0;
  padding: 14px 18px;
  background: #fef3c7;
  border: 1px solid var(--yellow);
  border-radius: 8px;
}
[data-theme="dark"] .ask-debug { background: #422006; }
.ask-debug summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.ask-debug-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.ask-debug-dl dt { color: var(--text-mute); font-weight: 500; }
.ask-debug-dl dd { margin: 0; }
.ask-debug h4 {
  margin: 14px 0 4px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.ask-debug-pre {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg);
  padding: 8px 10px;
  border-radius: 4px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
}

/* (UX-6 cut 7, 2026-05-27) /alerts action bar styles moved to
 * page-alerts.css. */

/* ─── Active-filter breadcrumb chips (above the result table) ─── */
.logs-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  font-size: 14px;
}
.logs-chips-label {
  color: var(--text-mute);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.logs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}
.logs-chip-domain {
  background: #ecfeff;
  border-color: #67e8f9;
  color: #155e75;
}
[data-theme="dark"] .logs-chip-domain {
  background: #164e63;
  border-color: #0e7490;
  color: #cffafe;
}
.logs-chip-x {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  color: var(--text-mute);
  text-decoration: none;
  font-weight: 700;
}
.logs-chip-x:hover { background: var(--red); color: #fff; }

/* ─── Severity-colored checkboxes in the filter bar ─── */
.fb-sev-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.fb-toggle.fb-sev-red    input:checked { accent-color: var(--red); }
.fb-toggle.fb-sev-yellow input:checked { accent-color: var(--yellow); }
.fb-toggle.fb-sev-blue   input:checked { accent-color: #3b82f6; }

/* ─── UUID column (collapsed by default) ─── */
.lt-uuid {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-mute);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lt-uuid code {
  background: transparent;
  padding: 0;
  font-size: 14px;
}

/* ─── Logs personal-defaults micro-bar (sits below the filter form) ─── */
.logs-prefs-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 0;
}
.logs-prefs-state {
  font-size: 14px;
  color: var(--green, #16a34a);
  font-style: italic;
}
.logs-prefs-state.logs-prefs-platform {
  color: var(--text-mute);
}
.logs-prefs-save { font-size: 14px; }
.logs-prefs-clear {
  font-size: 14px;
  color: var(--text-mute);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  margin-left: 12px;
}
.logs-prefs-clear:hover { color: var(--red); }

/* ─── Logs info row — small hints about active filters ─── */
.logs-info-mode {
  display: inline-block;
  padding: 1px 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  border-radius: 4px;
}
.logs-info-source-loki {
  display: inline-block;
  padding: 1px 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  cursor: help;
}
[data-theme="dark"] .logs-info-source-loki {
  color: #fcd34d;
  background: #422006;
}
.logs-info-hint {
  font-size: 14px;
  color: var(--text-mute);
  font-style: italic;
}
.logs-info-hint a {
  color: var(--accent);
  text-decoration: none;
  font-style: normal;
  margin-left: 2px;
}
.logs-info-hint a:hover { text-decoration: underline; }

/* Quick-range pills — one-click time-window switcher above the
   results. Sits between the filter bar and the result info line.
   Commit 2.43 Phase 0 — default range is 1h; pills make widening
   discoverable without hunting through the dropdown. */
.logs-quick-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 14px;
}
.logs-quick-range-label {
  color: var(--text-mute);
  font-weight: 500;
  margin-right: 4px;
}
.logs-quick-range-pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  background: var(--bg-elev);
  transition: background 0.1s, border-color 0.1s;
}
.logs-quick-range-pill:hover {
  background: var(--bg-soft);
  border-color: var(--text-mute);
  color: var(--text);
}
.logs-quick-range-pill-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
  font-weight: 600;
}

/* Empty-state hint — appears when 0 rows match. Suggests widening
   the time window or toggling severity. Reduces "I can't find my
   data" UX confusion. */
.logs-empty-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--text-mute));
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-2);
}
.logs-empty-hint-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--text-mute);
}
.logs-empty-hint-body strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.logs-empty-hint-link {
  display: inline-block;
  margin: 0 4px;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent, var(--brand));
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.logs-empty-hint-link:hover {
  background: var(--bg-soft);
}

/* ─── Severity dot column (Sev) — compact at-a-glance indicator ─── */
.lt-sev { width: 38px; text-align: center; }
.lt-sev-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
}
.lt-sev-dot.lt-sev-red    { background: var(--red); }
.lt-sev-dot.lt-sev-yellow { background: var(--yellow); }
.lt-sev-dot.lt-sev-blue   { background: #3b82f6; opacity: 0.55; }

@media (max-width: 900px) {
  .logs-shell { grid-template-columns: 1fr; }
  .logs-sidebar { position: static; max-height: 240px; }
}

/* ─── User-chip link wrapper (links username/avatar to /me/activity) ───────── */

/* ─── /logs export menu (folded in by cut 9) ─── */
/* ─── /logs export menu (CSV / Markdown / HTML) ────────────────────────── */
.logs-export-menu { position: relative; display: inline-block; }
.logs-export-menu > summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
}
.logs-export-menu > summary::-webkit-details-marker { display: none; }
.logs-export-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logs-export-menu-list a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 4px;
}
.logs-export-menu-list a:hover { background: var(--bg-soft); color: var(--text); }

/* ─── /system/* detail pages — shared ────────────────────────────────── */
