/* ============================================================
   ZeroQuarry — CSS-variable driven theme
   ============================================================ */

/* ---- Theme variables ------------------------------------------ */
:root, [data-theme="dark"] {
  --bg-body:      var(--dark-account-page-bg, #0e1013);
  --bg-surface:   var(--dark-account-sidebar-bg, #161a21);
  --bg-highlight: var(--dark-account-highlight, #24374f);
  --bg-surface2:  #141820;
  --bg-inset:     #0b0e13;
  --bg-hover:     #1a212b;
  --border:       #242a33;
  --border-light: #1f252e;
  --text:         var(--dark-account-text-primary, #d7dbe0);
  --text-heading: var(--dark-account-text-primary, #f0f3f7);
  --text-muted:   var(--dark-account-text-secondary, #8a93a0);
  --text-code:    #e8ecf1;
  --link:         #6fb8ff;
  --accent:       var(--dark-accent, #3a7ad9);
  --accent-hover: var(--dark-accent-hover, #4a8ae9);
  --btn-bg:       #1f2632;
  --btn-border:   #2b3444;
  --btn-hover:    #26303f;
  --input-bg:     #14181f;
  --input-border: #2a3240;
  --warn-bg:      #2a1d08;
  --warn-border:  #6a4a14;
  --warn-text:    #ffd8a0;
  --error:        #ff9292;
  --error-pre-bg: #1b1013;
  --error-pre-brd:#4a1f1f;
  --success:      #63d37e;
  --running:      #ffc24d;
  --sev-critical-bg: var(--dark-sev-critical-bg, #6b1111);
  --sev-critical-fg: var(--dark-sev-critical-fg, #ffcaca);
  --sev-high-bg:     var(--dark-sev-high-bg, #7a3410);
  --sev-high-fg:     var(--dark-sev-high-fg, #ffd8b5);
  --sev-medium-bg:   var(--dark-sev-medium-bg, #6a5a10);
  --sev-medium-fg:   var(--dark-sev-medium-fg, #ffe89a);
  --sev-low-bg:      var(--dark-sev-low-bg, #2a4a1f);
  --sev-low-fg:      var(--dark-sev-low-fg, #bfe5aa);
  --sev-info-bg:     var(--dark-sev-info-bg, #1f3551);
  --sev-info-fg:     var(--dark-sev-info-fg, #b6d8ff);
}

[data-theme="light"] {
  --bg-body:      var(--light-account-page-bg, #f5f6f8);
  --bg-surface:   var(--light-account-sidebar-bg, #ffffff);
  --bg-highlight: var(--light-account-highlight, #dbe8ff);
  --bg-surface2:  #f0f2f5;
  --bg-inset:     #e8eaee;
  --bg-hover:     #eceef2;
  --border:       #d0d5dd;
  --border-light: #e0e4ea;
  --text:         var(--light-account-text-primary, #1e2128);
  --text-heading: var(--light-account-text-primary, #0d0f14);
  --text-muted:   var(--light-account-text-secondary, #5a6270);
  --text-code:    #24292e;
  --link:         #1a6dd3;
  --accent:       var(--light-accent, #2f64c0);
  --accent-hover: var(--light-accent-hover, #1e52a8);
  --btn-bg:       #e8ecf0;
  --btn-border:   #c5ccd6;
  --btn-hover:    #dbe0e6;
  --input-bg:     #ffffff;
  --input-border: #c5ccd6;
  --warn-bg:      #fff8e1;
  --warn-border:  #e0b84a;
  --warn-text:    #6d4c00;
  --error:        #c0392b;
  --error-pre-bg: #fef0f0;
  --error-pre-brd:#e0a0a0;
  --success:      #27ae60;
  --running:      #e67e22;
  --sev-critical-bg: var(--light-sev-critical-bg, #f8d7da);
  --sev-critical-fg: var(--light-sev-critical-fg, #721c24);
  --sev-high-bg:     var(--light-sev-high-bg, #ffe1cf);
  --sev-high-fg:     var(--light-sev-high-fg, #8a3d12);
  --sev-medium-bg:   var(--light-sev-medium-bg, #fff3cd);
  --sev-medium-fg:   var(--light-sev-medium-fg, #856404);
  --sev-low-bg:      var(--light-sev-low-bg, #d4edda);
  --sev-low-fg:      var(--light-sev-low-fg, #155724);
  --sev-info-bg:     var(--light-sev-info-bg, #dbeafe);
  --sev-info-fg:     var(--light-sev-info-fg, #1d4f91);
}

/* ---- Reset-ish + base ------------------------------------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; color: var(--text-code); }
.small { font-size: 0.85em; }
.muted { color: var(--text-muted); }
pre { overflow-x: auto; }

/* ---- App shell / sidebar -------------------------------------- */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
body.sidebar-collapsed .app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem 1rem;
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface2));
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.brand {
  font-weight: 700; letter-spacing: 0.05em; font-size: 1.1rem;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.brand-wordmark {
  max-height: 2rem;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
/* Dark + light wordmark variants render together; the inactive one is
   hidden via the `data-theme` attribute on <html>, which base.html keeps
   in sync on theme switches. When only one variant is uploaded the other
   simply isn't in the DOM, so this is also harmless. */
[data-theme="dark"] .brand-wordmark--light,
[data-theme="light"] .brand-wordmark--dark {
  display: none !important;
}
body.sidebar-collapsed .brand-wordmark {
  max-height: 1.6rem;
  max-width: 2.4rem;
}
.wordmark-preview {
  display: inline-block;
  max-height: 2.5rem;
  max-width: 16rem;
  vertical-align: middle;
  background: var(--bg-surface2);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
/* Branding admin page — three slot grid with theme-tinted preview frames
   so admins can see the dark logo against a dark surface, the light logo
   against a light surface, and the PDF logo against white. */
.branding-wordmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.branding-wordmark-slot {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg-surface);
}
.branding-wordmark-slot h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}
.wordmark-preview-frame {
  display: inline-block;
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
}
.wordmark-preview-frame--dark   { background: #161a21; }
.wordmark-preview-frame--light  { background: #ffffff; }
.wordmark-preview-frame--pdf    { background: #ffffff; }
.wordmark-preview-frame .wordmark-preview {
  background: transparent;
  border: none;
  padding: 0;
}
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--text-muted);
  flex: 0 0 auto;
}
.sidebar-toggle:hover {
  background: var(--bg-hover);
  text-decoration: none;
  color: var(--text);
}
.sidebar-toggle-closed {
  display: none;
}
.sidebar-meta {
  transition: opacity 0.15s ease;
}
.sidebar-top { display: flex; flex-direction: column; gap: 0.35rem; }
.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.sidebar-section { display: flex; flex-direction: column; gap: 0.35rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
}
.sidebar-link:hover { background: var(--bg-hover); text-decoration: none; }
.sidebar-link.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text-heading);
}
.sidebar-link.active-project {
  background: var(--bg-highlight);
  color: var(--text-heading);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.sidebar-link.active-project:hover {
  background: color-mix(in srgb, var(--bg-highlight) 88%, var(--bg-hover));
}
.sidebar-link-parent { font-weight: 600; }
.sidebar-icon,
.material-symbols-outlined.sidebar-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex: 0 0 auto;
}
.sidebar-text {
  min-width: 0;
}
.sidebar-icon-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  color: var(--text-muted);
}
.sidebar-icon-link:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.sidebar-project-link { margin-left: 0.35rem; font-size: 0.94rem; }
.sidebar-project-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}
.sidebar-search {
  width: 100%;
  padding: 0.45rem 0.6rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text);
}
.sidebar-expand { text-align: left; padding-left: 0.65rem; }
.sidebar-popover {
  position: absolute;
  left: calc(100% + 0.85rem);
  top: 0;
  width: min(22rem, 60vw);
  padding: 0.8rem;
  background: color-mix(in srgb, var(--bg-surface) 95%, var(--bg-body));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  z-index: 20;
}
.sidebar-popover[hidden] {
  display: none !important;
}
.sidebar-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.sidebar-popover-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}
.sidebar-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: min(65vh, 34rem);
  overflow-y: auto;
  margin-top: 0.65rem;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.65rem;
}
body.sidebar-collapsed .sidebar {
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
body.sidebar-collapsed .sidebar-toggle-open {
  display: none;
}
body.sidebar-collapsed .sidebar-toggle-closed {
  display: inline;
}
body.sidebar-collapsed .sidebar-top {
  align-items: center;
}
body.sidebar-collapsed .brand {
  display: none;
}
body.sidebar-collapsed .sidebar-meta,
body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .sidebar-expand {
  display: none;
}
body.sidebar-collapsed .sidebar-nav,
body.sidebar-collapsed .sidebar-bottom {
  align-items: center;
}
body.sidebar-collapsed .sidebar-section {
  width: 100%;
  align-items: center;
  position: relative;
}
body.sidebar-collapsed .sidebar-link {
  width: 100%;
  min-height: 2.35rem;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
body.sidebar-collapsed .sidebar-link .sidebar-text {
  display: none;
}
body.sidebar-collapsed .sidebar-project-list-wrap {
  display: none;
}
body.sidebar-collapsed .sidebar-project-search-toggle {
  display: inline-flex;
}
body.sidebar-collapsed .sidebar-project-link {
  margin-left: 0;
}
body.sidebar-collapsed .sidebar-popover .sidebar-link {
  width: 100%;
  justify-content: flex-start;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
body.sidebar-collapsed .sidebar-popover .sidebar-link .sidebar-text {
  display: inline;
}
body.sidebar-collapsed .sidebar-actions {
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 0;
  padding-right: 0;
}
body.sidebar-collapsed .logout .btn-link {
  width: 100%;
}
.is-hidden { display: none !important; }

/* Theme toggle */
#theme-toggle { font-size: 1.15rem; line-height: 1; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: inline; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: inline; }

/* ---- Layout ---------------------------------------------------- */
.container { max-width: 1180px; margin: 1.5rem auto; padding: 0 1.25rem; }
.container.with-sidebar {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.5rem 2rem 2rem;
}
h1, h2, h3 { color: var(--text-heading); }
h1 { margin-top: 0; }
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.page-head-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.project-title-form { margin: 0; }
.project-title-wrap { margin-bottom: 0; }
.project-title-input {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  border-radius: 6px;
}
.project-title-input:hover,
.project-title-input:focus {
  background: var(--bg-surface2);
  box-shadow: 0 0 0 1px var(--border);
  outline: none;
  padding: 0.08rem 0.3rem;
  margin-left: -0.3rem;
}
.project-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 1rem;
  align-items: start;
}
.project-stats .disc-stat {
  min-width: 110px;
}
.sev-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.bulk-action-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  align-self: end;
}
.bulk-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
  margin-bottom: 0.7rem;
}
.bulk-controls label {
  margin-bottom: 0;
}
.data-table th a {
  color: inherit;
  text-decoration: none;
}
.data-table th a:hover {
  color: var(--text-heading);
  text-decoration: underline;
}

/* ---- Tables ---------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.data-table th, .data-table td {
  text-align: left; padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border-light); vertical-align: top;
}
.data-table th {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); background: var(--bg-highlight);
}
.data-table tr:hover td { background: var(--bg-surface2); }

/* ---- Forms ----------------------------------------------------- */
.scan-form label, .rescan-form label, .settings-form label {
  display: block; margin-bottom: 1rem; font-weight: 500;
}
.scan-form input[type="text"],
.scan-form input[type="url"],
.scan-form select,
.scan-form textarea,
.rescan-form textarea,
.meta-form select,
.inline-form input[type="text"],
.inline-form select {
  display: block; width: 100%;
  padding: 0.55rem 0.7rem; margin-top: 0.35rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code); font-family: inherit; font-size: 0.95rem;
}
.scan-form textarea, .rescan-form textarea {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88rem;
}
.scan-form label.checkbox { display: flex; align-items: center; gap: 0.5rem; }
.form-actions { margin-top: 1rem; }

.btn, button, input[type="submit"] {
  display: inline-block; padding: 0.5rem 0.95rem;
  background: var(--btn-bg); color: var(--text);
  border: 1px solid var(--btn-border); border-radius: 4px;
  cursor: pointer; font-size: 0.95rem;
}
.btn:hover, button:hover { background: var(--btn-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent-hover); color: white; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.warn { background: #7a2b2b; border-color: #8c3535; color: white; }
.btn-link { background: none; border: none; color: var(--link); padding: 0; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* ---- Status + severity pills ---------------------------------- */
.status-queued         { color: var(--text-muted); }
.status-running        { color: var(--running); }
.status-awaiting_batch { color: #c080ff; }
.status-completed      { color: var(--success); }
.status-failed         { color: var(--error); }
.status-cancelled      { color: var(--text-muted); }

.sev {
  display: inline-block; padding: 0.1rem 0.5rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: 3px; font-weight: 600;
}
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }
.sev-high     { background: var(--sev-high-bg);     color: var(--sev-high-fg); }
.sev-medium   { background: var(--sev-medium-bg);   color: var(--sev-medium-fg); }
.sev-low      { background: var(--sev-low-bg);      color: var(--sev-low-fg); }
.sev-info     { background: var(--sev-info-bg);      color: var(--sev-info-fg); }

.finding-counts { display: inline-flex; gap: 0.3rem; }

/* ---- Mode-picker cards ---------------------------------------- */
.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.mode-card {
  display: block; background: var(--bg-surface2); padding: 1.2rem;
  border: 1px solid var(--border); border-radius: 6px; color: inherit;
}
.mode-card:hover { background: var(--bg-hover); text-decoration: none; }
.mode-card h2 { margin-top: 0; }
.mode-card .warn { color: var(--running); font-size: 0.9rem; }

/* ---- Key/value list ------------------------------------------- */
.kv {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 0.3rem 1rem; margin: 0 0 1.2rem;
}
.kv dt { color: var(--text-muted); font-size: 0.88rem; }
.kv dd { margin: 0; }

.target-list { list-style: none; padding-left: 0; }
.target-list li { padding: 0.2rem 0; }
.target-list .kind {
  display: inline-block; background: var(--btn-bg); color: var(--text);
  padding: 0 0.4rem; font-size: 0.72rem; border-radius: 3px; margin-right: 0.3rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.1rem 0 0.35rem;
}
.section-head h2 {
  margin: 0;
}

/* ---- Notices --------------------------------------------------- */
.notice { border-radius: 4px; padding: 0.8rem 1rem; margin-bottom: 1.2rem; border: 1px solid; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }

.error { color: var(--error); }
.error-text { color: var(--error); }
.error-pre {
  background: var(--error-pre-bg); border: 1px solid var(--error-pre-brd);
  color: var(--error); padding: 0.6rem; border-radius: 4px;
  white-space: pre-wrap; font-size: 0.86rem;
}

/* ---- Log pane (live) ------------------------------------------ */
.log-pane {
  background: var(--bg-inset); border: 1px solid var(--border-light);
  border-radius: 4px; padding: 0.6rem; max-height: 60vh; overflow-y: auto;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.82rem;
}
.log-row { display: grid; grid-template-columns: 170px 110px 1fr; gap: 0.5rem; padding: 0.15rem 0; }
.log-row .log-ts { color: var(--text-muted); }
.log-row .log-agent { color: var(--link); }
.log-row.level-error .log-msg { color: var(--error); }
.log-row.level-tool  .log-msg { color: var(--link); white-space: pre-wrap; }
.log-row.level-agent .log-msg { color: var(--text); white-space: pre-wrap; }
.log-row.level-info  .log-msg { color: var(--text-muted); }

/* ---- Finding detail ------------------------------------------- */
.finding-list { list-style: none; padding: 0; }
.finding-list li a { display: block; padding: 0.4rem 0.6rem; border-radius: 4px; }
.finding-list li a:hover { background: var(--bg-surface2); }

.summary-box {
  background: var(--bg-surface2); border-left: 3px solid var(--accent);
  padding: 0.6rem 0.9rem; border-radius: 0 4px 4px 0; margin-bottom: 1rem;
}
.summary-box.markdown-body {
  max-width: none;
  width: 100%;
}
.summary-box > :first-child,
.non-issues-list .markdown-body > :first-child {
  margin-top: 0;
}
.summary-box > :last-child,
.non-issues-list .markdown-body > :last-child {
  margin-bottom: 0;
}
.notes-box {
  background: var(--bg-surface2); border-left: 3px solid var(--success);
  padding: 0.6rem 0.9rem; border-radius: 0 4px 4px 0; margin-bottom: 1rem;
  white-space: pre-wrap;
}

/* Summary truncation on dashboard */
.summary-cell { max-width: 360px; }
.truncate {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.summary-row td {
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr.summary-row:last-child td {
  border-bottom: none;
}
.report-row td {
  border-bottom: none;
}
.summary-row .summary-gutter {
  background: var(--bg-surface2);
  border-top: none;
}
.summary-row .summary-cell {
  max-width: none;
  padding-top: 0.1rem;
  padding-bottom: 0.85rem;
}
.data-table tbody tr.report-row:hover td,
.data-table tbody tr.summary-row:hover td {
  background: var(--bg-surface2);
}
.summary-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
  word-break: break-word;
}

/* Version history list */
.version-list { list-style: none; padding-left: 0; }
.version-list li {
  padding: 0.25rem 0; display: flex; gap: 0.75rem;
  align-items: baseline; flex-wrap: wrap;
}

.markdown-body { max-width: 85ch; }
.markdown-body code { background: var(--bg-inset); padding: 0.08rem 0.35rem; border-radius: 3px; }
.markdown-body pre { background: var(--bg-inset); padding: 0.7rem; border-radius: 4px; }
.markdown-body h1 { font-size: 1.4rem; } .markdown-body h2 { font-size: 1.15rem; }
.markdown-body table { border-collapse: collapse; }
.markdown-body table th, .markdown-body table td { border: 1px solid var(--border); padding: 0.3rem 0.6rem; }

/* ---- Code + copy button wrapper ------------------------------- */
.code-block-wrap { position: relative; }
.code-block-wrap .copy-btn {
  position: absolute; top: 0.4rem; right: 0.4rem;
  background: var(--btn-bg); color: var(--text-muted); border: 1px solid var(--border);
  padding: 0.2rem 0.5rem; font-size: 0.75rem; border-radius: 3px; cursor: pointer;
  opacity: 0.7; transition: opacity 0.15s;
}
.code-block-wrap:hover .copy-btn { opacity: 1; }
.code-block-wrap .copy-btn:hover { background: var(--btn-hover); color: var(--text); }

.poc-wrap { border: 1px solid var(--border-light); border-radius: 4px; overflow: auto; }
.poc-code { background: var(--bg-inset) !important; padding: 0.6rem; }
.poc-code .linenos,
.poc-code .lineno,
.source-code .linenos,
.source-code .lineno {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.email-draft { background: var(--bg-surface2); padding: 1rem; border-radius: 4px; }

/* ---- Source viewer -------------------------------------------- */
.source-viewer { max-height: 80vh; overflow: auto; }
.source-viewer pre { margin: 0; }
.source-viewer .highlight-line { background: #3a2a0055; }
[data-theme="light"] .source-viewer .highlight-line { background: #fff3c455; }

/* ---- Chat ----------------------------------------------------- */
.chat-section { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }
.chat-messages { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.8rem; }
.chat-msg { padding: 0.55rem 0.75rem; border-radius: 5px; max-width: 88ch; }
.chat-msg.role-user { background: var(--bg-surface2); border-left: 3px solid var(--accent); }
.chat-msg.role-assistant { background: var(--bg-inset); border-left: 3px solid var(--success); }
.chat-msg .chat-meta { display: flex; gap: 0.6rem; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.chat-msg .chat-content { white-space: pre-wrap; }

.chat-form textarea {
  width: 100%; padding: 0.55rem 0.7rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code); font-family: inherit; font-size: 0.95rem;
}
.chat-form button { margin-top: 0.5rem; }

/* ---- Notable non-issues --------------------------------------- */
.non-issues-list { list-style: none; padding-left: 0; }
.non-issues-list li {
  padding: 0.35rem 0.6rem; border-radius: 4px; margin-bottom: 0.3rem;
  background: var(--bg-surface2); border-left: 3px solid var(--success);
}
.non-issues-list .ni-label { color: var(--success); font-weight: 600; margin-right: 0.5rem; }
.non-issues-list .markdown-body { max-width: none; }

/* ---- Manage section ------------------------------------------- */
.manage-section { margin-top: 2rem; }
.manage-group {
  margin: 0.65rem 0; padding: 0.65rem 0.9rem;
  background: var(--bg-surface2); border: 1px solid var(--border); border-radius: 4px;
}
.manage-group h3 { margin: 0 0 0.4rem 0; font-size: 1rem; color: var(--text); }
.manage-group > :last-child { margin-bottom: 0; }
.manage-group p { margin: 0.25rem 0 0.45rem; }
.manage-inline-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.manage-inline-group h3 {
  margin: 0;
}
.manage-project-form {
  margin-left: auto;
}
.meta-form label { display: block; margin-bottom: 0.6rem; font-weight: 500; }
.meta-form input[type="text"] {
  display: block; width: 100%; padding: 0.45rem 0.6rem; margin-top: 0.25rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code); font-size: 0.9rem;
}
.manage-group.danger { border-color: var(--error-pre-brd); }
.rescan-form textarea {
  display: block; width: 100%; padding: 0.55rem 0.7rem; margin-top: 0.35rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88rem;
}
.rescan-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.rescan-buttons form { margin: 0; }
.btn.danger { background: #6b1111; border-color: #7a1818; color: #ffcaca; }
.btn.danger:hover { background: #7a1818; }
.inline-form {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
}
.inline-form input[type="text"],
.inline-form select {
  min-width: 180px;
  flex: 1;
  margin-top: 0;
}
.account-pref-form {
  align-items: flex-start;
  flex-wrap: nowrap;
}
.account-pref-form label:not(.checkbox) {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  flex: 0 1 260px;
  min-width: 220px;
}
.account-pref-form label.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  flex: 0 1 auto;
}
.account-pref-form input[type="number"] {
  min-width: 8rem;
}
/* Align Save with the input field next to a stacked label. */
.account-pref-form:not(.checkbox-form) .btn {
  align-self: flex-start;
  margin-top: 1.8rem;
  margin-bottom: 0;
  position: relative;
  top: -1px;
}
.account-pref-form.checkbox-form {
  align-items: center;
}
.account-pref-form.checkbox-form .btn {
  margin: 0;
}
.account-pref-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 800px) {
  .account-pref-row { grid-template-columns: 1fr; }
}

/* ---- Report page ---------------------------------------------- */
.report-page-head {
  margin-bottom: 1rem;
}
.report-page-title {
  min-width: 0;
  flex: 1 1 56rem;
}
.report-title-form {
  margin: 0;
}
.report-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.15rem);
  line-height: 1.15;
}
.report-title-input {
  flex: 1 1 44rem;
  min-width: 22rem;
  max-width: none;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  border-radius: 6px;
}
.report-title-input:hover,
.report-title-input:focus {
  background: var(--bg-surface2);
  box-shadow: 0 0 0 1px var(--border);
  outline: none;
  padding: 0.08rem 0.3rem;
  margin-left: -0.3rem;
}
.report-version {
  flex: 0 0 auto;
  font-size: 0.9rem;
}
.report-tags-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.tag-add-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tag-add-form input[type="text"] {
  width: 8.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 999px;
  color: var(--text-code);
  font-size: 0.85rem;
}
.tag-add-form .btn {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* ---- Settings ------------------------------------------------- */
.settings-form fieldset {
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0.8rem 1rem; margin-bottom: 1rem;
}
.settings-form legend { color: var(--text-heading); font-weight: 600; padding: 0 0.4rem; }
.color-row, .color-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.color-pair { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.settings-form input[type="color"] {
  border: 1px solid var(--border); border-radius: 3px; width: 48px; height: 28px; cursor: pointer;
}
.color-settings-table input[type="color"] {
  width: 100%;
  min-width: 56px;
  height: 34px;
  background: transparent;
  border: none;
}
.color-settings-table th {
  white-space: nowrap;
}
.invite-form {
  margin-bottom: 1rem;
}
.invite-inline {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.invite-inline select,
.invite-form input[type="email"] {
  display: block;
  padding: 0.45rem 0.6rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--text-code);
  font-size: 0.9rem;
}
.invite-form input[type="email"] {
  flex: 1 1 20rem;
  min-width: 16rem;
}
.invite-inline select {
  flex: 0 0 10rem;
}
/* Legacy per-card LLM list (kept for other pages that still use it). */
.llm-key-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.llm-key-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.8rem 0.9rem;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.llm-key-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.llm-key-form {
  flex: 1 1 24rem;
  justify-content: flex-end;
}
.llm-key-form input[type="password"] {
  min-width: 18rem;
  flex: 1 1 20rem;
  margin-top: 0;
}
/* Compact single-row editor with a provider picker. */
.llm-key-status {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem;
  margin: 0.25rem 0 0.7rem; font-size: 0.85rem;
}
.llm-key-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  background: var(--bg-body); border: 1px solid var(--border);
}
.llm-key-chip .dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--border);
}
.llm-key-chip.configured .dot { background: var(--success); }
.llm-key-chip.platform .dot { background: var(--text-muted, #888); }
.llm-key-chip.missing .dot { background: var(--error, #c66); }
.llm-key-editor {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.llm-key-editor select {
  flex: 0 0 auto; min-width: 12rem;
}
.llm-key-editor input[type="password"] {
  flex: 1 1 18rem; min-width: 14rem; margin-top: 0;
}
.llm-key-editor .remove-wrap {
  margin-left: 0.25rem;
}

/* Two-column account overview on wide screens. */
.account-grid {
  display: grid; gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}
.account-grid > .manage-group.span-2 { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-grid > .manage-group.span-2 { grid-column: auto; }
}

/* ---- Login ---------------------------------------------------- */
.login-body { background: var(--bg-body); min-height: 100vh; display: grid; place-items: center; }
.login-card {
  background: var(--bg-surface); padding: 1.8rem 2rem;
  border: 1px solid var(--border); border-radius: 6px; min-width: 320px;
}
.login-card h1 { margin-top: 0; font-size: 1.3rem; letter-spacing: 0.05em; }
.login-card input[type="password"] {
  display: block; width: 100%; padding: 0.55rem 0.7rem; margin-top: 0.35rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code);
}
.login-card button { margin-top: 1rem; width: 100%; }
.login-providers { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.login-btn { width: 100%; text-align: center; padding: 0.65rem; }
.login-divider {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-muted); font-size: 0.85rem; margin: 1rem 0 0.75rem;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.login-card input[type="email"] {
  display: block; width: 100%; padding: 0.55rem 0.7rem; margin-top: 0.35rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code);
}

/* ---- Misc ----------------------------------------------------- */
/* ---- H1 eligibility review ------------------------------------ */
.h1-summary {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  margin: 0.6rem 0 1rem 0; padding: 0.55rem 0.8rem;
  background: var(--bg-surface2); border: 1px solid var(--border);
  border-radius: 4px;
}
.h1-filter-toggle { margin-left: auto; font-size: 0.88rem; }
.h1-filter-toggle input { margin-right: 0.3rem; }

.h1-badge {
  display: inline-block; padding: 0.1rem 0.5rem;
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; border-radius: 3px; font-weight: 600;
}
.h1-eligible   { background: #1e4d2b; color: #9ee6b0; }
.h1-borderline { background: #4a3b10; color: #ffd98a; }
.h1-ineligible { background: #4a1f1f; color: #ffb8b8; }
.h1-unreviewed { background: var(--btn-bg); color: var(--text-muted); }

[data-theme="light"] .h1-eligible   { background: #d4edda; color: #155724; }
[data-theme="light"] .h1-borderline { background: #fff3cd; color: #856404; }
[data-theme="light"] .h1-ineligible { background: #f8d7da; color: #721c24; }
[data-theme="light"] .h1-unreviewed { background: #e2e3e5; color: #495057; }

/* Dim ineligible rows slightly */
tr.h1-row-ineligible td { opacity: 0.55; }
tr.h1-row-ineligible td a { text-decoration: line-through; }

/* Hidden mode when filter toggle is on */
body.h1-hide-ineligible tr.h1-row-ineligible { display: none; }
body.hide-low-confidence tr.conf-row-low { display: none; }

/* ---- Confidence badges --------------------------------------- */
.conf-badge {
  display: inline-block; padding: 0.1rem 0.5rem;
  font-size: 0.72rem; letter-spacing: 0.04em;
  border-radius: 3px; font-weight: 600;
}
.conf-verified { background: #1e4d2b; color: #9ee6b0; }
.conf-medium   { background: #3a3f4a; color: #d7dbe0; }
.conf-low      { background: #4a1f1f; color: #ffb8b8; }
[data-theme="light"] .conf-verified { background: #d4edda; color: #155724; }
[data-theme="light"] .conf-medium   { background: #e2e3e5; color: #495057; }
[data-theme="light"] .conf-low      { background: #f8d7da; color: #721c24; }
tr.conf-row-low td { opacity: 0.65; }

/* ---- Required headers (remote scan form) ---------------------- */
.required-headers { display: flex; flex-direction: column; gap: 0.4rem; }
.required-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}
.required-header-row input {
  padding: 0.4rem 0.55rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88rem;
}
.required-headers-actions { margin-top: 0.5rem; }
.required-headers-display {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--bg-surface2);
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.75rem; border-radius: 4px;
}
.required-headers-display code { white-space: nowrap; }

/* ---- Auth indicator on report --------------------------------- */
.auth-indicator {
  color: #e6b422; font-size: 1.05em;
  margin-right: 0.25rem;
}

/* ---- Auth section on scan form -------------------------------- */
.auth-details {
  background: var(--bg-surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.6rem 1rem; margin-bottom: 1rem;
}
.auth-details > summary {
  cursor: pointer; font-weight: 600; color: var(--text-heading);
  padding: 0.2rem 0;
}
.auth-details > summary:hover { color: var(--accent); }
.auth-subsection {
  border: 1px solid var(--border-light); border-radius: 4px;
  padding: 0.6rem 0.9rem; margin: 0.5rem 0;
}
.auth-subsection legend { padding: 0 0.4rem; font-weight: 500; }

/* ---- Disclosure tracker ---------------------------------------- */
.disc-stats {
  display: flex; gap: 1.2rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.disc-stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-surface2); padding: 0.6rem 1.2rem; border-radius: 6px;
  border: 1px solid var(--border); min-width: 80px;
}
.disc-stat-num { font-size: 1.4rem; font-weight: 700; }
.disc-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.disc-tabs { display: flex; gap: 0; margin-bottom: 1rem; border-bottom: 2px solid var(--border); }
.disc-tab {
  padding: 0.5rem 1rem; color: var(--text-muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.disc-tab:hover { color: var(--text); }
.disc-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.disc-form label { display: block; margin-bottom: 0.6rem; font-weight: 500; }
.disc-form input[type="text"],
.disc-form input[type="password"],
.disc-form input[type="url"],
.disc-form input[type="date"],
.disc-form input[type="number"],
.disc-form select,
.disc-form textarea {
  display: block; width: 100%; padding: 0.45rem 0.6rem; margin-top: 0.25rem;
  background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: 4px; color: var(--text-code); font-size: 0.9rem;
}
.disc-form .checkbox { flex-direction: row; display: flex; align-items: center; gap: 0.5rem; }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.disc-notes { font-family: inherit; }

/* Timeline */
.timeline { position: relative; margin: 0.5rem 0 1.5rem 1rem; padding-left: 1.5rem; border-left: 2px solid var(--border); }
.timeline-event { position: relative; padding: 0.4rem 0; }
.timeline-dot {
  position: absolute; left: -1.85rem; top: 0.55rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-muted); border: 2px solid var(--bg-body);
}
.timeline-dot.event-reported { background: var(--accent); }
.timeline-dot.event-ack      { background: var(--running); }
.timeline-dot.event-fix      { background: var(--success); }
.timeline-dot.event-bounty   { background: #e6b422; }
.timeline-dot.event-credit   { background: #c060e0; }
.timeline-dot.event-public   { background: var(--link); }
.timeline-dot.event-closed   { background: var(--success); }
.timeline-type { font-weight: 600; text-transform: capitalize; margin-right: 0.3rem; }

.event-form {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem;
}
.event-form select, .event-form input {
  padding: 0.4rem 0.5rem; background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
  color: var(--text); font-size: 0.88rem;
}

/* ---- Filter bar ------------------------------------------------ */
.filter-bar {
  display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1rem; padding: 0.6rem 0;
}
.filter-bar select, .filter-bar input[type="date"] {
  padding: 0.4rem 0.5rem; background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
  color: var(--text); font-size: 0.88rem;
}
.filter-search {
  padding: 0.4rem 0.6rem; background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
  color: var(--text); font-size: 0.88rem; min-width: 200px; flex: 1;
}

/* ---- Tag pills ------------------------------------------------- */
.tag-pill {
  display: inline-block; padding: 0.08rem 0.45rem;
  background: var(--btn-bg); color: var(--link);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.72rem; margin-right: 0.2rem; text-decoration: none;
}
.tag-pill:hover { background: var(--btn-hover); text-decoration: none; }
.tag-row { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.tier-link {
  color: var(--text-heading);
  text-decoration: none;
}
.tier-link:hover {
  color: var(--link);
  text-decoration: underline;
}
.tier-models {
  max-width: 26rem;
  word-break: break-word;
}
.tier-scan-types {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.tag-pill-form {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.tag-pill-form .tag-pill {
  margin-right: 0;
}
.tag-remove-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
}
.tag-remove-btn:hover {
  color: var(--text);
  background: transparent;
}

/* ---- Pagination ------------------------------------------------ */
.pagination {
  display: flex; gap: 1rem; align-items: center;
  justify-content: center; padding: 1rem 0;
}

/* ---- Misc ------------------------------------------------------- */
.breadcrumbs { margin-top: 0; }
.row-actions { margin: 1rem 0; display: flex; gap: 0.6rem; }
.actions a { margin-right: 0.5rem; }

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  body.sidebar-collapsed .sidebar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  body.sidebar-collapsed .brand,
  body.sidebar-collapsed .sidebar-meta,
  body.sidebar-collapsed .sidebar-search,
  body.sidebar-collapsed .sidebar-expand {
    display: initial;
  }
  body.sidebar-collapsed .sidebar-nav,
  body.sidebar-collapsed .sidebar-bottom,
  body.sidebar-collapsed .sidebar-section,
  body.sidebar-collapsed .sidebar-top {
    align-items: initial;
  }
  body.sidebar-collapsed .sidebar-link {
    width: auto;
    min-height: 0;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    justify-content: flex-start;
  }
  body.sidebar-collapsed .sidebar-actions {
    flex-direction: row;
    gap: 0.8rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  body.sidebar-collapsed .sidebar-project-search-toggle,
  .sidebar-icon-link {
    display: none !important;
  }
  .sidebar-popover {
    position: static;
    width: 100%;
    margin-top: 0.35rem;
    box-shadow: none;
  }
  .container.with-sidebar {
    padding: 1.2rem;
  }
  .page-head,
  .project-settings-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .bulk-controls {
    grid-template-columns: 1fr;
  }
  .invite-inline {
    align-items: stretch;
  }
  .section-head,
  .manage-inline-group {
    align-items: flex-start;
  }
  .manage-project-form {
    width: 100%;
    margin-left: 0;
  }
  .report-title-input {
    min-width: 0;
    width: 100%;
  }
  .report-title-wrap {
    flex-wrap: wrap;
  }
}

/* ---- Superadmin impersonation banner --------------------------- */
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: #b45309;              /* amber-700 */
  color: #fff8e1;
  border-bottom: 2px solid #78350f; /* amber-900 */
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.impersonation-banner .material-symbols-outlined {
  font-size: 1.25rem;
}
.impersonation-banner .impersonation-banner-text {
  flex: 1 1 auto;
  min-width: 0;
}
.impersonation-banner .impersonation-banner-text .muted {
  color: #fde68a;
}
.impersonation-banner strong {
  font-weight: 600;
}
.impersonation-banner .impersonation-stop {
  flex: 0 0 auto;
  margin: 0;
}
.impersonation-banner .impersonation-stop .btn {
  background: #78350f;
  color: #fff8e1;
  border-color: #451a03;
}
.impersonation-banner .impersonation-stop .btn:hover {
  background: #92400e;
  color: #fff;
}
