:root {
  --bg-body: #020617;
  --bg-card: #0f172a;
  --bg-panel: #1e293b;
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent: #3b82f6;
  --hero-gradient: linear-gradient(130deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.8));
}

html.theme-light {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-panel: #f8fafc;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --accent: #2563eb;
  --hero-gradient: linear-gradient(130deg, rgba(37, 99, 235, 0.12), rgba(241, 245, 249, 0.95));
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
}
html, body {
  height: 100%;
}
main {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.page-shell {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  min-height: 100vh;
}
.hero {
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--hero-gradient);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  min-height: 0;
}
.hero > div:first-child,
.hero-brand {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(360px, 38vw);
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-logo {
  display: block;
  height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  flex: 0 0 auto;
}
.hero-brand-text {
  min-width: 0;
}
.hero h1 {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-kicker {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  font-size: 0.68rem;
}
.hero-subtitle {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 0.68rem;
  line-height: 1.25;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-api-links {
  margin: 6px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
}
.hero-api-links a {
  color: #93c5fd;
  text-decoration: none;
}
.hero-api-links a:hover {
  text-decoration: underline;
}
.form-hint {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 900px;
}
.form-hint code {
  font-size: 12px;
}
.tags-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  cursor: text;
}
.tags-field:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.tags-field--excluded:focus-within {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3);
}
.tags-field--credentials {
  border-color: rgba(99, 102, 241, 0.65);
  background: rgba(24, 26, 42, 0.65);
}
.tags-field--credentials:focus-within {
  border-color: #818cf8;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35);
}
.block-hint {
  display: block;
  margin-top: 6px;
  margin-bottom: 8px;
}
.subtle-hint {
  color: #8b93a9;
}
.credential-tags-label code {
  font-size: 0.78rem;
}
.tags-chip-list {
  display: contents;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 3px 2px 3px 8px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.28);
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 0.84rem;
  color: #e2e8f0;
}
.tags-field--excluded .tag-chip {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(251, 146, 60, 0.45);
}
.tag-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(340px, 100%);
}
.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.tag-chip-remove:hover {
  background: rgba(251, 113, 133, 0.25);
  color: #fecaca;
}
.tags-field-input {
  flex: 1 1 160px;
  min-width: 140px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 4px 2px;
  outline: none;
}
.tags-field-input::placeholder {
  color: #64748b;
}
.hero-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.hero-side::-webkit-scrollbar {
  height: 4px;
}
.hero-side::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
  border-radius: 4px;
}
.hero-side > .header-chip,
.hero-side > .header-action-btn {
  flex: 0 0 auto;
}
.lang-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted, #9aa4b2);
  white-space: nowrap;
}
.start-top-row,
.start-llm-row {
  align-items: end;
}
.audit-language-hint {
  margin-top: -4px;
  margin-bottom: 12px;
}
.lang-select-wrap select {
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a3344);
  background: var(--surface-2, #141a24);
  color: inherit;
  max-width: 7.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.15);
  color: var(--text-primary);
}
html.theme-light .card {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.card h2 {
  margin-top: 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.workspace-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.workspace-tabs button {
  background: #1f2937;
}
.workspace-tabs button.active {
  background: #0369a1;
}
.workspace-panel.hidden {
  display: none;
}
.u-hidden {
  display: none !important;
}
.workspace-panel {
  display: grid;
  gap: 14px;
}
.terminal-workspace-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.terminal-output-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 640px;
  overflow: hidden;
}
.terminal-output-panel pre {
  max-height: 100%;
}
.grid-1, .grid-2, .grid-3 {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.runs-filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
.runs-filter-field {
  min-width: 0;
}
.runs-filter-action {
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
}
.runs-delete-finished-btn {
  padding: 7px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
}
input, textarea, select, button {
  background: #182235;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 10px;
}
button {
  cursor: pointer;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  font-weight: 600;
}
button:hover {
  background: linear-gradient(180deg, #3b82f6, #1e40af);
}
.btn-secondary {
  background: linear-gradient(180deg, #334155, #1e293b);
}
.btn-secondary.btn-busy,
button.btn-busy {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}
.btn-danger {
  background: linear-gradient(180deg, #b91c1c, #7f1d1d);
}
.inline-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}
.run-details-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.run-details-select {
  max-width: 420px;
}
.run-details-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.run-details-toolbar button {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 7px;
  white-space: nowrap;
}
.run-details-toolbar .compact-check {
  margin: 0;
  padding: 2px 4px;
  font-size: 11px;
  gap: 5px;
}
.run-details-toolbar .compact-check input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  padding: 0;
}
.header-chip {
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 12px;
}
html.theme-light .header-chip {
  background: rgba(255, 255, 255, 0.92);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12px;
  color: #bfdbfe;
}
html.theme-light .status-pill {
  color: #1d4ed8;
}
.header-preferences {
  padding: 7px 9px;
  min-width: 0;
  width: min(100%, 178px);
  max-width: 178px;
}
.header-pref-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.header-pref-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}
.header-pref-name {
  min-width: 50px;
  flex-shrink: 0;
  font-weight: 600;
  color: #94a3b8;
}
html.theme-light .header-pref-name {
  color: #64748b;
}
.header-pref-select {
  flex: 1;
  min-width: 0;
  max-width: 108px;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  color: var(--text-primary);
}
.header-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  font-size: 12px;
  max-width: min(100%, 280px);
}
.header-user-text {
  color: #bfdbfe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
html.theme-light .header-user-text {
  color: #1e40af;
}
.header-user-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, #334155, #1e293b);
  color: #e2e8f0;
  flex-shrink: 0;
  cursor: pointer;
}
.header-user-logout:hover {
  background: linear-gradient(180deg, #475569, #334155);
  color: #f8fafc;
}
.header-user-logout-icon {
  width: 16px;
  height: 16px;
  display: block;
}
.hero-action-btn {
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 34px;
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.hero-side .header-action-btn + .header-action-btn {
  margin-left: 0;
}
.header-refresh {
  padding: 7px 9px;
  min-width: 0;
  width: min(100%, 248px);
  max-width: 248px;
  flex-shrink: 1;
}
.header-refresh-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.header-refresh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}
.header-refresh-head {
  justify-content: space-between;
  gap: 10px;
}
.header-refresh-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.02em;
}
html.theme-light .header-refresh-title {
  color: #2563eb;
}
.header-refresh-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}
.header-refresh-btns {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.header-refresh-btn {
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, #334155, #1e293b);
  color: #e2e8f0;
  cursor: pointer;
}
.header-refresh-btn:hover {
  filter: brightness(1.1);
}
.header-refresh-btn--accent {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  border-color: #1e40af;
  color: #f8fafc;
}
.header-refresh-row--controls {
  justify-content: space-between;
  gap: 10px;
}
.header-refresh-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}
.header-refresh-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #3b82f6;
  flex-shrink: 0;
}
.header-refresh-interval {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}
.header-refresh-interval input {
  width: 40px;
  padding: 3px 4px;
  font-size: 11px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  color: var(--text-primary);
}
.header-refresh-meta {
  padding-top: 5px;
  margin-top: 1px;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
}
html.theme-light .header-refresh-meta {
  border-top-color: rgba(148, 163, 184, 0.45);
}
.header-refresh-status {
  font-size: 10px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  line-height: 1.35;
}
html.theme-light .header-refresh-status {
  color: #64748b;
}
.inline-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.compact-check {
  margin-bottom: 0;
  font-size: 12px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px;
  max-height: 480px;
  overflow: auto;
}
.console {
  white-space: pre;
  overflow: auto;
  font-family: "Courier New", monospace;
  line-height: 1.25;
}
.ansi-console {
  white-space: pre;
  font-family: "Courier New", monospace;
  line-height: 1.25;
  overflow: auto;
  word-break: normal;
  overflow-wrap: normal;
  min-height: calc(100dvh - 280px);
}
.terminal-output-panel .ansi-console {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  color: #e2e8f0;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 600px;
  overflow-y: auto;
}
.ansi-console.terminal-log .term-default { color: #e2e8f0; }
.ansi-console.terminal-log .term-box { color: #64748b; }
.ansi-console.terminal-log .term-meta { color: #94a3b8; }
.ansi-console.terminal-log .term-prompt { color: #67e8f9; font-weight: 600; }
.ansi-console.terminal-log .term-step {
  color: #fde047;
  font-weight: 700;
}
.ansi-console.terminal-log .term-exit.term-ok { color: #4ade80; font-weight: 600; }
.ansi-console.terminal-log .term-exit.term-warn { color: #f87171; font-weight: 600; }
.ansi-console.terminal-log .term-hdr {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ansi-console.terminal-log .term-hdr-exec { color: #4ade80; }
.ansi-console.terminal-log .term-hdr-decision { color: #22d3ee; }
.ansi-console.terminal-log .term-hdr-model { color: #e879f9; }
.ansi-console.terminal-log .term-hdr-session { color: #86efac; }
.ansi-console.terminal-log .term-hdr-step { color: #facc15; }
.ansi-console.terminal-log .term-hdr-warn { color: #fbbf24; }
.ansi-console.terminal-log .term-hdr-err { color: #f87171; }
.ansi-console.terminal-log .term-hdr-stream { color: #a5b4fc; }
.ansi-console.terminal-log .term-hdr-meta { color: #94a3b8; font-weight: 500; }
.ansi-console.terminal-log.shell-highlight .sh-default { color: #f1f5f9; }
.ansi-console.terminal-log.shell-highlight .sh-comment { color: #9ca3af; }
.ansi-console.terminal-log.shell-highlight .sh-flag { color: #7dd3fc; }
.ansi-console.terminal-log.shell-highlight .sh-string { color: #6ee7b7; }
.ansi-console.terminal-log.shell-highlight .sh-ip { color: #fca5a5; }
.ansi-console.terminal-log.shell-highlight .sh-op { color: #c4b5fd; }
.ansi-console.terminal-log.shell-highlight .sh-cmd {
  color: #ffffff;
  font-weight: 700;
}
.ansi-console.terminal-log .ansi-fg-red { color: #f87171; }
.ansi-console.terminal-log .ansi-fg-green { color: #4ade80; }
.ansi-console.terminal-log .ansi-fg-yellow { color: #facc15; }
.ansi-console.terminal-log .ansi-fg-blue { color: #67e8f9; }
.ansi-console.terminal-log .ansi-fg-magenta { color: #e879f9; }
.ansi-console.terminal-log .ansi-fg-cyan { color: #22d3ee; }
.ansi-console.terminal-log .ansi-fg-white { color: #f8fafc; }
.ansi-console.terminal-log .ansi-fg-black { color: #94a3b8; }
.ansi-console.terminal-log .ansi-fg-bright-black { color: #94a3b8; }
.ansi-console.terminal-log .ansi-fg-bright-red { color: #fca5a5; }
.ansi-console.terminal-log .ansi-fg-bright-green { color: #86efac; }
.ansi-console.terminal-log .ansi-fg-bright-yellow { color: #fde047; }
.ansi-console.terminal-log .ansi-fg-bright-blue { color: #7dd3fc; }
.ansi-console.terminal-log .ansi-fg-bright-magenta { color: #f5d0fe; }
.ansi-console.terminal-log .ansi-fg-bright-cyan { color: #67e8f9; }
.ansi-console.terminal-log .ansi-fg-bright-white { color: #ffffff; }
.ansi-console.terminal-log .ansi-bold { font-weight: 700; }
.ansi-bold {
  font-weight: 700;
}
.ansi-fg-red { color: #f87171; }
.ansi-fg-green { color: #4ade80; }
.ansi-fg-yellow { color: #facc15; }
.ansi-fg-blue { color: #60a5fa; }
.ansi-fg-magenta { color: #e879f9; }
.ansi-fg-cyan { color: #22d3ee; }
.ansi-fg-white { color: #f8fafc; }
.ansi-fg-black { color: #0f172a; }
.ansi-fg-bright-black { color: #94a3b8; }
.ansi-fg-bright-red { color: #fca5a5; }
.ansi-fg-bright-green { color: #86efac; }
.ansi-fg-bright-yellow { color: #fde047; }
.ansi-fg-bright-blue { color: #93c5fd; }
.ansi-fg-bright-magenta { color: #f5d0fe; }
.ansi-fg-bright-cyan { color: #67e8f9; }
.ansi-fg-bright-white { color: #ffffff; }
.ansi-hit {
  background: rgba(250, 204, 21, 0.28);
  border-radius: 3px;
}
.vuln-filter-toolbar select {
  min-width: 10rem;
  max-width: 14rem;
}

.vuln-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.credentials-users-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.credentials-users-label {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}
.cred-filter-toolbar select {
  min-width: 11rem;
  max-width: 16rem;
}
.credentials-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #334155;
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}
.credentials-table-wrap .table {
  width: 100%;
  min-width: 720px;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.table-credentials th:nth-child(1),
.table-credentials td:nth-child(1) {
  width: 4.5rem;
  white-space: nowrap;
}
.table-credentials th:nth-child(2),
.table-credentials td:nth-child(2),
.table-credentials th:nth-child(3),
.table-credentials td:nth-child(3) {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-credentials th:nth-child(4),
.table-credentials td:nth-child(4) {
  width: 9rem;
  white-space: nowrap;
}
.table-credentials .credential-secret-cell {
  max-width: 0;
  width: 40%;
  overflow: hidden;
}
.table-credentials .credential-secret-value {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.35;
  scrollbar-width: thin;
}
.table-credentials .credential-secret-value::-webkit-scrollbar {
  height: 4px;
}
.table-credentials .credential-secret-value::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
  border-radius: 4px;
}
.badge-secret-type {
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
}

.stdout-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}
.stdout-toolbar input {
  min-width: 260px;
}
.stdout-toolbar .hint {
  font-size: 12px;
  color: #93c5fd;
}
.render-panel {
  background: linear-gradient(180deg, #0b1220 0%, #020617 100%);
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
#processes,
#runs {
  max-height: min(42dvh, 520px);
  overflow-y: auto;
}
.kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.kv {
  background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 8px;
}
.kv .k {
  color: #94a3b8;
  font-size: 12px;
}
.kv .v {
  font-weight: bold;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #334155;
  margin-right: 4px;
}
.sev-critical { background: #7f1d1d; }
.sev-high { background: #991b1b; }
.sev-medium { background: #9a3412; }
.sev-low { background: #1e3a8a; }
.analyst-ready { background: #14532d; border-color: #22c55e; }
.analyst-queued { background: #422006; border-color: #f59e0b; }
.analyst-running { background: #1e3a8a; border-color: #38bdf8; }
.analyst-refreshing { background: #3b2f14; border-color: #f59e0b; color: #fde68a; }
.analyst-wait-agent { background: #78350f; border-color: #fbbf24; color: #fde68a; }
.analyst-probes-inconclusive { background: #312e81; border-color: #818cf8; color: #e0e7ff; }
.analyst-failed { background: #7f1d1d; border-color: #f87171; }
.analyst-skipped { background: #374151; border-color: #9ca3af; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
}
.table th, .table td {
  border-bottom: 1px solid #334155;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.table th {
  background: #0f172a;
  color: #cbd5e1;
}
.table tr:nth-child(even) td {
  background: rgba(30, 41, 59, 0.25);
}
.table tr:hover td {
  background: rgba(59, 130, 246, 0.12);
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.tabs button {
  background: #1f2937;
}
.tabs button.active {
  background: #0369a1;
}
.proc {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 10px 8px;
  margin-bottom: 12px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.55) 0%, rgba(30, 41, 59, 0.25) 100%);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.06) inset;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
}
.proc > .proc-summary,
.proc > div:first-of-type {
  flex: 1 1 220px;
  min-width: 0;
}
.proc > button {
  flex: 0 0 auto;
  align-self: center;
}
.proc-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #e2e8f0;
  margin-bottom: 8px;
}
.proc-summary--session {
  gap: 6px 8px;
}
.run-select-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.32) 100%);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.06) inset;
}
.run-select-preview .proc-summary {
  margin-bottom: 0;
}
.run-status-bars {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}
.run-status-bar-block {
  min-width: min(100%, 420px);
}
.run-status-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.run-status-bar-track {
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #334155;
}
.run-status-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.25s ease;
}
.public-tunnel-suggested {
  color: #c4b5fd;
}
.run-status-bar-fill--steps {
  background: #a78bfa;
}
.run-status-bar-fill--tasks {
  background: #38bdf8;
}
.admin-internal-token {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
}
.admin-internal-token p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #94a3b8;
}
.proc-kv {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  color: #94a3b8;
}
.proc-kv--block {
  flex-basis: 100%;
  margin-top: 2px;
}
.proc-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-right: 2px;
}
.proc-v-run {
  color: #7dd3fc;
  font-weight: 600;
  font-size: 12px;
  max-width: min(42vw, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.proc-v-trunc {
  max-width: min(36vw, 200px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbd5e1;
  font-size: 12px;
}
.proc-v-num {
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
  font-weight: 600;
}
.proc-mono {
  font-family: ui-monospace, "Consolas", "DejaVu Sans Mono", monospace;
  font-size: 11px;
  color: #bae6fd;
}
.proc-mono--sm {
  font-size: 10px;
  color: #a5f3fc;
  word-break: break-all;
  white-space: pre-wrap;
  max-width: 100%;
}
.proc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, #0c4a6e 0%, #0f172a 100%);
  color: #e0f2fe;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.12);
}
.proc-chip-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
  color: #7dd3fc;
}
.proc-chip--runid {
  border-color: rgba(167, 139, 250, 0.5);
  background: linear-gradient(135deg, #4c1d95 0%, #1e103b 100%);
  color: #f5f3ff;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.15);
}
.proc-chip--runid .proc-chip-label {
  color: #ddd6fe;
}
.proc-chip--sess {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  color: #ecfdf5;
  max-width: 100%;
}
.proc-chip--sess .proc-chip-label {
  color: #6ee7b7;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-pill--mode {
  text-transform: none;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.badge-pill--llm {
  background: linear-gradient(180deg, #5b21b6 0%, #4c1d95 100%);
  color: #f5f3ff;
  border-color: rgba(196, 181, 253, 0.35);
}
.badge-pill--orch {
  background: linear-gradient(180deg, #166534 0%, #14532d 100%);
  color: #dcfce7;
  border-color: rgba(134, 239, 172, 0.35);
}
.badge-pill--mode-def {
  background: #334155;
  color: #e2e8f0;
}
.badge-pill--mode-mini {
  font-size: 10px;
  padding: 2px 8px;
  text-transform: none;
  background: #1e293b;
  color: #cbd5e1;
  border-color: #475569;
}
.badge-pill--run {
  background: linear-gradient(180deg, #0e7490 0%, #155e75 100%);
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.45);
  animation: proc-pulse 2.4s ease-in-out infinite;
}
.badge-pill--done {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  color: #eff6ff;
  border-color: rgba(96, 165, 250, 0.4);
}
.badge-pill--stop {
  background: linear-gradient(180deg, #9f1239 0%, #831843 100%);
  color: #fff1f2;
  border-color: rgba(251, 113, 133, 0.45);
}
.badge-pill--muted {
  background: #1e293b;
  color: #94a3b8;
  border-color: #475569;
}
.badge-pill--rc {
  font-variant-numeric: tabular-nums;
  text-transform: none;
  font-weight: 700;
  min-width: 1.5rem;
  justify-content: center;
}
.badge-pill--rc-pending {
  background: #334155;
  color: #cbd5e1;
  border-style: dashed;
  border-color: #64748b;
}
.badge-pill--rc-ok {
  background: linear-gradient(180deg, #047857 0%, #065f46 100%);
  color: #ecfdf5;
  border-color: rgba(52, 211, 153, 0.5);
}
.badge-pill--rc-err {
  background: linear-gradient(180deg, #b45309 0%, #92400e 100%);
  color: #fffbeb;
  border-color: rgba(251, 191, 36, 0.5);
}
.badge-pill--rc-muted {
  background: #475569;
  color: #e2e8f0;
}
.badge-pill--phase-done {
  background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%);
  color: #eef2ff;
  border-color: rgba(165, 180, 252, 0.4);
}
.badge-pill--phase-active {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  color: #f0f9ff;
  border-color: rgba(56, 189, 248, 0.45);
}
.badge-pill--phase-scheduled {
  border-color: color-mix(in srgb, var(--accent-strong) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text-strong);
}

.badge-pill--phase-boot {
  background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%);
  color: #faf5ff;
  border-color: rgba(196, 181, 253, 0.35);
}
.badge-pill--phase-paused {
  background: #422006;
  color: #fdba74;
  border: 1px solid #9a3412;
}
.badge-pill--phase-waiting {
  background: linear-gradient(180deg, #b45309 0%, #92400e 100%);
  color: #fffbeb;
  border-color: rgba(251, 191, 36, 0.45);
}
.badge-pill--phase-muted {
  background: #292524;
  color: #d6d3d1;
  border-color: #57534e;
}
.proc-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #334155;
}
.proc-stat-n {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  font-size: 13px;
}
.proc-stat-l {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.proc-stat--find .proc-stat-n {
  color: #fca5a5;
}
.proc-stat--cred .proc-stat-n {
  color: #fde047;
}
.proc-stat--task .proc-stat-n {
  color: #93c5fd;
}
.badge-pill--sess-on {
  background: linear-gradient(180deg, #047857 0%, #065f46 100%);
  color: #ecfdf5;
  border-color: rgba(52, 211, 153, 0.45);
}
.badge-pill--sess-wait {
  background: linear-gradient(180deg, #b45309 0%, #92400e 100%);
  color: #fffbeb;
  border-color: rgba(251, 191, 36, 0.45);
}
.badge-pill--sess-muted {
  background: #334155;
  color: #cbd5e1;
}
.badge-pill--ctx-active {
  background: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
  color: #f0fdfa;
  text-transform: none;
  font-size: 10px;
}
.badge-pill--ctx-idle {
  background: #475569;
  color: #e2e8f0;
  text-transform: none;
  font-size: 10px;
}
@keyframes proc-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.35);
  }
  50% {
    box-shadow: 0 0 14px 2px rgba(34, 211, 238, 0.2);
  }
}
.attack-flow-panel {
  display: grid;
  gap: 10px;
}
.attack-flow-toolbar {
  color: #93c5fd;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.attack-flow-toolbar label {
  font-size: 12px;
  color: #cbd5e1;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.attack-flow-toolbar input {
  min-width: 200px;
  padding: 6px 8px;
}
.attack-flow-toolbar .hint {
  color: #93c5fd;
  font-size: 12px;
}
.attack-flow-canvas-wrap {
  border: 1px solid #334155;
  border-radius: 10px;
  background: #030712;
  overflow: auto;
  max-height: 68dvh;
}
.attack-flow-canvas {
  width: auto;
  min-width: 0;
  height: auto;
  display: block;
}
.flow-node {
  stroke: #475569;
  stroke-width: 1.2;
}
.node-host {
  fill: #0f172a;
  stroke: #38bdf8;
}
.node-service {
  fill: #111827;
  stroke: #a78bfa;
}
.node-action {
  fill: #1e293b;
  stroke: #22c55e;
}
.node-action.status-succeeded {
  stroke: #22c55e;
  stroke-width: 1.8;
}
.node-action.status-failed {
  stroke: #ef4444;
}
.node-action.status-blocked {
  stroke: #f59e0b;
}
.flow-node.node-owned {
  stroke: #ef4444;
  stroke-width: 2.2;
  filter: url(#ownedGlow);
}
.flow-owned-badge {
  fill: rgba(153, 27, 27, 0.95);
  stroke: #f87171;
  stroke-width: 1;
}
.flow-owned-badge-text {
  fill: #fee2e2;
  font-size: 10px;
  font-weight: 700;
}
.flow-owned-spark {
  stroke: #f59e0b;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.flow-head-fo {
  overflow: hidden;
}
.flow-head-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 1px;
}
.flow-head-title,
.flow-head-sub,
.flow-head-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-head-title {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
}
.flow-head-sub {
  color: #cbd5e1;
  font-size: 12px;
}
.flow-head-meta {
  color: #94a3b8;
  font-size: 11px;
}
.flow-cmd-fo {
  overflow: hidden;
}
.flow-cmd-box {
  width: 100%;
  height: 100%;
  border: 1px solid #334155;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.72);
  overflow: visible;
  padding: 3px 5px;
}
.flow-cmd-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #cbd5e1;
  font-size: 10px;
  line-height: 1.2;
  max-height: none;
  overflow: visible;
}
.flow-edge {
  fill: none;
  stroke: #64748b;
  stroke-width: 1.4;
  opacity: 0.9;
}
.edge-owned-path {
  stroke: #22c55e;
  stroke-width: 2.2;
  opacity: 1;
}
.edge-lateral {
  stroke: #f97316;
  stroke-dasharray: 4 3;
}
.edge-sequence {
  stroke: #22c55e;
}
.edge-service-action {
  stroke: #a78bfa;
}
.flow-edge-label-anchor {
  fill: #94a3b8;
  font-size: 10px;
  text-anchor: middle;
}
.attack-flow-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #cbd5e1;
}
.flow-owned-global {
  color: #fecaca;
  font-weight: 700;
}
.attack-flow-ownership-reasons {
  border: 1px dashed #7f1d1d;
  background: rgba(127, 29, 29, 0.16);
  color: #fecaca;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  display: grid;
  gap: 4px;
}
.session-health-banner {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--warn-border, #b45309);
  background: var(--warn-bg, rgba(180, 83, 9, 0.12));
  color: var(--text, #e8e6e3);
  font-size: 0.9rem;
  line-height: 1.45;
}

.session-health-banner.hidden {
  display: none;
}

.session-transfer-result {
  margin-top: 8px;
  max-height: 120px;
  overflow: auto;
  font-size: 0.85rem;
}

.session-console {
  min-height: 320px;
  max-height: 520px;
}
.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}
.toast {
  min-width: 280px;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  border: 1px solid #22c55e;
  color: #d1fae5;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.5);
  padding: 10px 12px;
  pointer-events: auto;
  animation: toast-in 140ms ease-out;
}
.toast-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.toast-body {
  font-size: 13px;
  color: #bbf7d0;
}
@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (max-width: 980px) {
  .dashboard-grid,
  .grid-2,
  .grid-3,
  .runs-filters-row {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }
  .hero > div:first-child,
  .hero-brand {
    max-width: 100%;
  }
  .hero-subtitle {
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .hero-side {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .terminal-workspace-card {
    min-height: calc(100vh - 200px);
  }
  .toast-stack {
    right: 10px;
    left: 10px;
    bottom: 10px;
  }
  .toast {
    min-width: 0;
    max-width: 100%;
  }
}

/* Vulnerability detail modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-body);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}
html.theme-light .modal-overlay {
  background: #e2e8f0;
}
.modal-overlay--centered {
  align-items: center;
  padding: 24px 16px;
}
.modal-command-card {
  width: min(560px, 100%);
  max-height: min(72dvh, 480px);
  margin-top: 0;
}
.modal-command-body .modal-command-meta {
  margin-bottom: 10px;
}
.modal-command-empty {
  margin: 0 0 12px;
}
.modal-command-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  max-height: min(48dvh, 340px);
  overflow: auto;
}
.shell-highlight .sh-default { color: #f8fafc; }
.shell-highlight .sh-comment { color: #9ca3af; }
.shell-highlight .sh-flag { color: #93c5fd; }
.shell-highlight .sh-string { color: #a7f3d0; }
.shell-highlight .sh-ip { color: #fca5a5; }
.shell-highlight .sh-op { color: #c4b5fd; }
.shell-highlight .sh-cmd {
  color: #ffffff;
  font-weight: 700;
}
.modal-card {
  width: min(860px, 100%);
  max-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  color: var(--text-primary);
}
html.theme-light .modal-card {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.modal-card--vuln-detail {
  width: min(920px, 96vw);
  max-width: 96vw;
}
.modal-card--retest {
  width: min(880px, 96vw);
  max-width: 96vw;
}
.modal-retest-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.modal-retest-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  max-height: min(52dvh, 520px);
  overflow-y: auto;
}
.modal-retest-kv {
  margin-bottom: 4px;
}
.modal-retest-finding {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}
.modal-retest-desc {
  margin: 0 0 4px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.modal-retest-poc-notes {
  margin: 0 0 8px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.modal-retest-poc-steps .poc-step {
  margin-bottom: 10px;
}
.modal-retest-poc-pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  font-size: 0.82rem;
}
.modal-retest-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.modal-retest-field .form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-retest-field .form-input,
.modal-retest-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 168px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 12px 14px;
}
.modal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #334155;
}
.modal-card-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #e2e8f0;
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.btn-close-modal:hover {
  color: #f1f5f9;
}
.modal-card-body {
  overflow-y: auto;
  padding: 14px 0;
  flex: 1;
  min-height: 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
}
.modal-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #334155;
}
.btn-analyst {
  background: linear-gradient(180deg, #4f46e5, #4338ca);
  color: #f8fafc;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
.btn-analyst:hover {
  filter: brightness(1.06);
}
.modal-kv {
  margin-bottom: 12px;
}
.detail-heading {
  margin: 16px 0 8px;
  font-size: 1.05rem;
  color: #e2e8f0;
}
.detail-section-title {
  margin: 14px 0 6px;
  font-size: 0.95rem;
  color: #93c5fd;
}
.detail-bullet-list {
  margin: 0 0 10px 16px;
  padding: 0;
  color: #cbd5e1;
}
.poc-step {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
}
.poc-step-title {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 600;
}
.console--compact {
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
}
.small-label {
  font-size: 12px;
  margin-top: 6px;
}
.modal-warn {
  color: #fecaca;
}

.compare-grid {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 8px 0 4px;
}
.compare-table th,
.compare-table td {
  border-bottom: 1px solid #334155;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  color: #94a3b8;
  font-weight: 600;
}
.compare-counts-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
  font-size: 0.9rem;
}
.modal-card--compare {
  width: min(1120px, 96vw);
  max-height: calc(100dvh - 48px);
}
.compare-modal-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.compare-diff-mount {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.compare-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: min(58dvh, 560px);
}
.compare-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.compare-tab {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.compare-tab:hover {
  background: #334155;
  color: #f8fafc;
}
.compare-tab.active {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: #3b82f6;
}
.compare-panels {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.compare-panel {
  display: none;
  max-height: min(52dvh, 500px);
  overflow: auto;
  padding-right: 4px;
}
.compare-panel.active {
  display: block;
}
.compare-section {
  margin-bottom: 18px;
}
.compare-subtitle {
  margin: 14px 0 6px;
  font-size: 0.82rem;
  color: #93c5fd;
  font-weight: 600;
}
.compare-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.compare-summary-card {
  border: 1px solid #334155;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  padding: 12px;
}
.compare-summary-title {
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 6px;
}
.compare-summary-id {
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  color: #94a3b8;
  word-break: break-all;
  margin: 0 0 8px;
}
.compare-metrics {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 0.85rem;
}
.compare-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.compare-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid #475569;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  color: #e2e8f0;
}
.compare-row-changed td {
  background: rgba(250, 204, 21, 0.08);
}
@media (max-width: 760px) {
  .compare-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Vulnerability table & row actions ---- */
.table-vulns th.th-sortable {
  cursor: pointer;
  user-select: none;
}
.table-vulns th.th-sortable:hover {
  color: var(--accent, #38bdf8);
}
.table-vulns .vuln-id-cell code {
  font-size: 0.82rem;
  opacity: 0.9;
}
.table-vulns .vuln-title-cell {
  max-width: 28rem;
  word-break: break-word;
}
.table-vulns .vuln-actions-col,
.table-vulns .vuln-actions-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.vuln-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  max-width: 11.5rem;
}
.vuln-row-actions-primary,
.vuln-row-actions-secondary {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
}
.vuln-row-actions-secondary {
  padding-left: 5px;
  margin-left: 2px;
  border-left: 1px solid #334155;
}
.btn-vuln-view {
  min-width: 2.1rem;
  text-align: center;
}
.btn-retest-xs {
  border-color: #0f766e;
  color: #99f6e4;
  background: rgba(13, 148, 136, 0.18);
  font-weight: 600;
}
.btn-retest-xs:hover:not(:disabled) {
  background: rgba(13, 148, 136, 0.32);
  color: #ccfbf1;
}
.btn-analyst-xs {
  border-color: #4338ca;
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.18);
  font-weight: 600;
}
.btn-analyst-xs:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.32);
  color: #e0e7ff;
}
.btn-analyst-xs.btn-analyst-busy,
.btn-analyst-xs:disabled {
  opacity: 0.65;
  cursor: wait;
}
.btn-vuln-bulk-analyst {
  padding: 3px 10px;
  font-size: 0.8rem;
  border-color: #4338ca;
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.12);
}
.btn-vuln-bulk-analyst:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.22);
  color: #e0e7ff;
}
.btn-vuln-bulk-analyst:disabled {
  opacity: 0.65;
  cursor: wait;
}
.btn-xs {
  padding: 2px 8px;
  font-size: 0.73rem;
  border-radius: 5px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1.4;
}
.btn-xs:hover { background: #334155; color: #e2e8f0; }
.btn-fp { border-color: #854d0e; color: #fbbf24; }
.btn-fp:hover { background: rgba(251,191,36,0.12); }
.btn-fp-active { border-color: #166534; background: rgba(34,197,94,0.1); color: #86efac; }
.btn-fp-active:hover { background: rgba(34,197,94,0.2); }
.btn-del-active { border-color: #991b1b; background: rgba(239,68,68,0.12); color: #fca5a5; }
.btn-del-active:hover { background: rgba(239,68,68,0.22); }
.row-deleted .vuln-actions-cell,
.row-deleted .vuln-row-actions,
.row-deleted .vuln-row-actions * { opacity: 1; text-decoration: none; }
.btn-danger-xs { border-color: #7f1d1d; color: #f87171; }
.btn-danger-xs:hover { background: rgba(248,113,113,0.12); }
.row-fp td { opacity: 0.5; }
.row-fp:hover td { opacity: 0.8; }
.row-dup td { opacity: 0.55; }
.row-dup:hover td { opacity: 0.85; }
.row-deleted td { opacity: 0.45; text-decoration: line-through; text-decoration-color: var(--muted); }
.row-deleted:hover td { opacity: 0.75; }
.badge.analyst-heuristic {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid #854d0e;
}
.badge.analyst-dup {
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
  border: 1px solid #475569;
}
.badge.verify-badge { font-size: 0.72rem; white-space: nowrap; }
.badge.retest-badge { font-size: 0.72rem; white-space: nowrap; margin-left: 0.25rem; }
.retest-pending { background: #422006; border-color: #f59e0b; color: #fde68a; }
.retest-running { background: #1e3a8a; border-color: #38bdf8; color: #e0f2fe; }
.btn-retest-xs.btn-retest-busy,
.btn-retest-xs:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.badge.verify-confirmed {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid #166534;
}
.badge.verify-potential {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid #854d0e;
}
.badge.verify-inconclusive {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}
.badge.verify-fp {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid #475569;
}
.badge.verify-pending {
  background: rgba(100, 116, 139, 0.1);
  color: #94a3b8;
  border: 1px solid #334155;
}
.btn-dup {
  border-color: #475569;
  color: #94a3b8;
}
.btn-dup:hover { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.btn-dup-active {
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
}

/* ---- Per-run attacker agent panel ---- */
.run-agent-panel {
  margin-top: 18px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
}
.run-agent-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.run-agent-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}
.run-agent-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.run-agent-badge--loading  { background:#1e293b; color:#64748b; }
.run-agent-badge--online   { background:rgba(34,197,94,0.15); color:#86efac; border:1px solid #16a34a; }
.run-agent-badge--offline  { background:rgba(100,116,139,0.1); color:#94a3b8; border:1px solid #334155; }

/* ---- Unified platform health bubble (API / agents / Ollama / ngrok) ---- */
.platform-health-pill {
  align-items: flex-start;
  padding: 7px 10px;
  min-width: 0;
  width: min(100%, 248px);
  max-width: 248px;
  flex-shrink: 1;
  cursor: default;
}
.platform-health-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}
.platform-health-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.35;
}
.platform-health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.platform-health-name {
  color: #94a3b8;
  font-weight: 600;
  min-width: 46px;
  flex-shrink: 0;
}
.platform-health-detail {
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-health-row--ok .platform-health-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}
.platform-health-row--warn .platform-health-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}
.platform-health-row--bad .platform-health-dot {
  background: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}
.platform-health-row--idle .platform-health-dot {
  background: #64748b;
}
.platform-health--ok {
  border-color: #16a34a;
}
.platform-health--warn {
  border-color: #ca8a04;
}
.platform-health--bad {
  border-color: #b91c1c;
}
.platform-health--idle {
  border-color: #334155;
}

/* ---- Attacker Agent bubble (legacy; kept for run-level badges) ---- */
.agent-pill {
  cursor: pointer;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}
.agent-pill:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: #3b82f6;
}
.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.agent-offline .agent-dot {
  background: #64748b;
  box-shadow: 0 0 0 2px rgba(100,116,139,0.25);
}
.agent-online .agent-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.35);
  animation: agent-pulse 1.8s ease-in-out infinite;
}
.agent-online {
  border-color: #16a34a;
  color: #86efac;
}

/* ---- Ollama server bubble ---- */
.ollama-pill {
  gap: 6px;
  cursor: default;
  user-select: none;
}
.ollama-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: #64748b;
}
.ollama-unknown .ollama-dot {
  background: #94a3b8;
}
.ollama-online .ollama-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
  animation: agent-pulse 1.8s ease-in-out infinite;
}
.ollama-online {
  border-color: #0284c7;
  color: #7dd3fc;
}
.ollama-offline .ollama-dot {
  background: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}
.ollama-offline {
  border-color: #b91c1c;
  color: #fca5a5;
}

@keyframes agent-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34,197,94,0.35); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0.0); }
}

/* ---- Agent modal ---- */
.agent-modal-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  width: min(620px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #1e293b;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #e2e8f0;
}
.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
}
.modal-close:hover { background: #1e293b; color: #e2e8f0; }
.modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agent-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-section h3 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.agent-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}
.agent-cmd-preview {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "JetBrains Mono", "Fira Mono", monospace;
  font-size: 0.78rem;
  color: #7dd3fc;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}
.agent-token-input {
  flex: 1;
  font-family: monospace;
  font-size: 0.82rem;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 10px;
  color: #e2e8f0;
}
.agent-modal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.agent-modal-online {
  background: rgba(34,197,94,0.1);
  border: 1px solid #16a34a;
  color: #86efac;
}
.agent-modal-offline {
  background: rgba(100,116,139,0.1);
  border: 1px solid #334155;
  color: #94a3b8;
}
.agent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.agent-table th {
  text-align: left;
  color: #64748b;
  font-weight: 500;
  padding: 4px 8px 4px 0;
  width: 35%;
  vertical-align: top;
}
.agent-table td {
  color: #e2e8f0;
  padding: 4px 0;
  word-break: break-word;
}

.execution-reflection-panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
}
.execution-reflection-meta {
  margin: 0 0 10px;
}
.execution-reflection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.execution-reflection-grid h5 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}
.execution-reflection-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.execution-reflection-code {
  font-size: 0.78rem;
  color: #cbd5e1;
  word-break: break-all;
}
.badge-exec--done {
  background: #14532d;
  color: #bbf7d0;
}
.badge-exec--fail {
  background: #7f1d1d;
  color: #fecaca;
}
.badge-exec--running {
  background: #1e3a8a;
  color: #bfdbfe;
}
.exec-cmd-cell {
  font-size: 0.75rem;
  word-break: break-all;
}

.hidden {
  display: none !important;
}

body.login-locked main,
body.login-locked .hero {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 20px;
}
html.theme-light .auth-overlay {
  background: #e2e8f0;
}

html.theme-light .hero-logo,
html.theme-light .auth-logo {
  background: #0f172a;
  border-radius: 6px;
  padding: 4px 10px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  text-align: center;
}
.auth-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.auth-product-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
}
html.theme-light .auth-product-name {
  color: #0f172a;
}

.auth-card {
  width: min(420px, 100%);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.auth-card-wide {
  width: min(720px, 100%);
}

.auth-card label {
  display: block;
  margin: 10px 0;
}

.auth-card input,
.auth-card select {
  width: 100%;
  margin-top: 4px;
}

.auth-hint {
  color: #94a3b8;
  font-size: 0.9rem;
}

.auth-error {
  color: #f87171;
  min-height: 1.2em;
}

.btn-compact {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.users-admin-list {
  max-height: 240px;
  overflow: auto;
  margin-bottom: 12px;
}

.session-timeline {
  max-height: 220px;
  overflow-y: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg-panel);
}

.session-timeline .tl-row {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.session-timeline .tl-time {
  color: var(--text-muted);
  margin-right: 8px;
}

.session-timeline .tl-output {
  margin: 4px 0 0;
  padding: 6px 8px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-elevated, rgba(0, 0, 0, 0.15));
  border-radius: 6px;
  font-size: 0.78rem;
  max-height: 140px;
  overflow-y: auto;
}

.attack-surface-panel .coverage-bar {
  height: 10px;
  border-radius: 6px;
  background: var(--border-color);
  overflow: hidden;
  margin: 8px 0 12px;
}

.attack-surface-panel .coverage-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.attack-surface-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  max-height: 280px;
  overflow-y: auto;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

pre.oob-cmd {
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg-panel);
  border-radius: 4px;
  max-width: 420px;
}

.scope-import-block {
  margin: 0.75rem 0 1rem;
}

.scope-import-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 0.35rem;
}

.scope-import-preview {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  white-space: pre-wrap;
}

.secondary-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
