:root {
  --bg: #0b0d10;
  --bg-elevated: #0f1319;
  --panel: #12161c;
  --border: #222a35;
  --border-soft: #1a212a;
  --text: #e6edf3;
  --muted: #8b98a9;
  --dim: #5d6b7d;
  --accent: #3fb950;
  --accent-soft: rgba(63, 185, 80, 0.12);
  --danger: #ff5c5c;
  --warn: #ffc857;
  --info: #4dabf7;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* Atribut hidden harus menang atas display di class (mis. .job-view { display:flex }). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(63, 185, 80, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; }

.glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  border: 1px solid rgba(63, 185, 80, 0.25);
}

.brand h1 { font-size: 15px; margin: 0; letter-spacing: 0.2px; }
.brand .sub { margin: 0; font-size: 11px; color: var(--dim); letter-spacing: 0.4px; text-transform: uppercase; }

.health { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.chip.ok .dot { background: var(--accent); box-shadow: 0 0 8px rgba(63, 185, 80, 0.6); }
.chip.error .dot { background: var(--danger); }
.chip.warn .dot { background: var(--warn); }
.chip.ok { color: var(--text); }

/* ---------- layout ---------- */

main {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 22px 40px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
}

.sidebar > .panel {
  flex-shrink: 0;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-head h2 { font-size: 12px; margin: 0; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }

/* ---------- form ---------- */

form { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input[type="text"], input[type="password"], input[type="number"], input:not([type]), select, textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { resize: vertical; min-height: 62px; font-family: var(--mono); font-size: 12px; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(63, 185, 80, 0.55);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.1);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.auth {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 12px;
  color: var(--muted);
}

.auth input { margin-top: 2px; accent-color: var(--accent); }

button.primary {
  background: var(--accent);
  color: #08120b;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}

button.primary:hover { filter: brightness(1.08); }
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: 0.55; cursor: not-allowed; }

.link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mini-actions { display: inline-flex; gap: 10px; }

.hint { margin: 0; font-size: 11px; color: var(--dim); line-height: 1.45; }
.hint code { color: var(--muted); font-family: var(--mono); }

/* ---------- job list ---------- */

.jobs { list-style: none; margin: 0; padding: 6px; max-height: 380px; overflow: auto; }

.job-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.job-item:hover { background: var(--bg-elevated); }
.job-item.active { background: var(--bg-elevated); border-color: var(--border); }

.job-item .sev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.job-item .sev-dot.critical { background: var(--danger); }
.job-item .sev-dot.high { background: var(--warn); }
.job-item .sev-dot.medium { background: #ffd93d; }
.job-item .sev-dot.low { background: var(--info); }

.job-item .body { min-width: 0; flex: 1; }
.job-item .name {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-item .meta { font-size: 10.5px; color: var(--dim); display: flex; gap: 7px; margin-top: 1px; }

.empty-list { padding: 16px 12px; color: var(--dim); font-size: 12px; text-align: center; }

/* ---------- stage ---------- */

.stage { min-height: 60vh; }

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

.job-view { display: flex; flex-direction: column; gap: 14px; }

.job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.job-head h2 { margin: 0; font-size: 16px; font-family: var(--mono); word-break: break-all; }
.job-head .muted { margin: 3px 0 0; font-size: 11.5px; color: var(--dim); }

.job-actions { display: flex; align-items: center; gap: 8px; }

.status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.status.running {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.6);
  background: rgba(63, 185, 80, 0.18);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.25);
}
.status.completed { color: var(--accent); border-color: rgba(63, 185, 80, 0.35); }
.status.failed, .status.timeout, .status.interrupted { color: var(--danger); border-color: rgba(255, 92, 92, 0.35); }
.status.cancelled { color: var(--warn); border-color: rgba(255, 200, 87, 0.3); }
.status.queued { color: var(--info); }

.job-status-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
}
.job-status-tag.running {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.55);
  background: rgba(63, 185, 80, 0.15);
  font-weight: 700;
  box-shadow: 0 0 6px rgba(63, 185, 80, 0.2);
}
.job-status-tag.completed {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.3);
}
.job-status-tag.failed, .job-status-tag.timeout, .job-status-tag.interrupted {
  color: var(--danger);
  border-color: rgba(255, 92, 92, 0.3);
}
.job-status-tag.cancelled {
  color: var(--warn);
  border-color: rgba(255, 200, 87, 0.3);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ghost:hover { border-color: var(--dim); color: var(--text); }

.counts { display: flex; gap: 8px; flex-wrap: wrap; }

.count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.count b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.count.critical b { color: var(--danger); }
.count.high b { color: var(--warn); }
.count.medium b { color: #ffd93d; }
.count.low b { color: var(--info); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); }

.tab {
  background: none;
  border: none;
  padding: 9px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.tab-body { min-height: 320px; }

/* ---------- findings ---------- */

.findings { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }

.finding {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 13px 15px;
}

.finding-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.finding-title { font-weight: 600; font-size: 13.5px; margin: 0; flex: 1; min-width: 200px; }

.sev {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid currentColor;
  opacity: 0.95;
}
.sev.critical { color: var(--danger); background: rgba(255, 92, 92, 0.08); }
.sev.high { color: var(--warn); background: rgba(255, 200, 87, 0.08); }
.sev.medium { color: #ffd93d; background: rgba(255, 217, 61, 0.08); }
.sev.low { color: var(--info); background: rgba(77, 171, 247, 0.08); }
.sev.info { color: var(--muted); background: rgba(139, 152, 169, 0.08); }

.cvss {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

.finding-desc { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; white-space: pre-wrap; }
.finding-path { margin: 7px 0 0; font-family: var(--mono); font-size: 11px; color: var(--dim); word-break: break-all; }

details { margin-top: 9px; }
details > summary {
  cursor: pointer;
  font-size: 11.5px;
  color: var(--accent);
  list-style: none;
  user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; }
details[open] > summary::before { content: "− "; }

.detail-block { margin-top: 8px; }
.detail-block h4 {
  margin: 0 0 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--dim);
}
.detail-block p { margin: 0; font-size: 12px; color: var(--muted); white-space: pre-wrap; }

pre.code {
  margin: 0;
  background: #07090c;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #c8d3e0;
  overflow: auto;
  max-height: 320px;
  white-space: pre;
}

/* ---------- log ---------- */

.log {
  margin: 0;
  background: #07090c;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: #b9c6d4;
  min-height: 340px;
  max-height: 62vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log .err { color: #ff9d9d; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(13, 27, 46, 0.95);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #d2e9ff;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  z-index: 1000;
  animation: slide-in 0.18s ease;
  backdrop-filter: blur(8px);
}

.toast.success {
  background: rgba(16, 37, 24, 0.95);
  border-color: rgba(63, 185, 80, 0.45);
  color: #aff5b4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(63, 185, 80, 0.15);
}

.toast.error {
  background: rgba(42, 18, 21, 0.95);
  border-color: rgba(248, 81, 73, 0.45);
  color: #ffd7d7;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(248, 81, 73, 0.15);
}

.toast.info {
  background: rgba(13, 27, 46, 0.95);
  border-color: rgba(88, 166, 255, 0.4);
  color: #d2e9ff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(88, 166, 255, 0.12);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  main { grid-template-columns: 1fr; padding: 14px; }
  .sidebar { position: static; }
  .jobs { max-height: 240px; }
}

/* ---------- visual evidence ---------- */

.tab-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  margin-left: 5px;
  font-weight: 600;
}

.tab-badge.badge-danger {
  background: rgba(248, 81, 73, 0.18);
  color: #ff6b6b;
  border-color: rgba(248, 81, 73, 0.45);
}

.evidence-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.evidence-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 10px;
}

.evidence-title {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-evidence {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-evidence:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.evidence-viewport {
  padding: 16px;
  background: #06080b;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.browser-mockup {
  width: 100%;
  max-width: 960px;
  background: #12171f;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0b0f14;
  border-bottom: 1px solid var(--border-soft);
}

.browser-dots { display: flex; gap: 5px; }
.browser-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.browser-url {
  flex: 1;
  background: #161c24;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-img-wrap {
  width: 100%;
  position: relative;
  background: #0d1117;
  display: flex;
  justify-content: center;
}

.evidence-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 540px;
}

.evidence-watermark {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(11, 15, 20, 0.85);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  color: var(--accent);
  font-family: var(--mono);
}

/* Combobox Autocomplete */
.combobox-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.combobox-wrap input {
  padding-right: 28px;
  width: 100%;
}
.combobox-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 4px;
}
.combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #121820;
  border: 1px solid var(--accent);
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.combobox-item {
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  display: block;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combobox-item:last-child { border-bottom: none; }
.combobox-item:hover, .combobox-item.active {
  background: rgba(63, 185, 80, 0.15);
  color: #fff;
}
.combobox-item strong {
  color: var(--accent);
  font-weight: 700;
}
.combobox-empty {
  padding: 10px;
  font-size: 12px;
  color: var(--dim);
  text-align: center;
}

/* Allowlist Box & Tags */
.scope-box {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.scope-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scope-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.scope-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  color: #cbd5e1;
}

/* Modal Overlay & Scope Editor */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.scope-textarea {
  width: 100%;
  background: #090c10;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px;
  font-family: var(--mono);
  font-size: 12px;
  resize: vertical;
  line-height: 1.5;
  outline: none;
}
.scope-textarea:focus {
  border-color: var(--accent);
}
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--panel-soft);
}
.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.9; }

.ghost-danger {
  color: var(--danger) !important;
  border-color: rgba(255, 92, 92, 0.35) !important;
}
.ghost-danger:hover {
  background: rgba(255, 92, 92, 0.12) !important;
  border-color: var(--danger) !important;
}

.modal-delete-dialog {
  border-color: rgba(255, 92, 92, 0.4) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 92, 92, 0.15) !important;
}
.modal-header-danger {
  background: rgba(255, 92, 92, 0.05);
}
.modal-header-danger h3 {
  color: #ff8080 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-target-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.delete-target-card .target-url {
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  font-family: var(--mono);
  word-break: break-all;
}
.delete-target-card .target-id {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

.wipe-list {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.wipe-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.wipe-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}
.wipe-item span.icon { font-size: 13px; }
.wipe-item code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.danger-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.45;
}

.btn-danger-confirm {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 92, 92, 0.35);
  transition: opacity 0.15s ease, background 0.15s ease;
}
.btn-danger-confirm:hover {
  background: #e04848;
}

.tab-badge.live {
  background: rgba(63, 185, 80, 0.2);
  color: #3fb950;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Findings Action Bar & PDF Export */
.findings-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.findings-action-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.findings-count-pill {
  background: rgba(248, 81, 73, 0.18);
  color: #ff7b72;
  border: 1px solid rgba(248, 81, 73, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
}
.btn-pdf-export {
  background: linear-gradient(135deg, #238636, #2ea043);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn-pdf-export:hover {
  background: linear-gradient(135deg, #2ea043, #3fb950);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 160, 67, 0.3);
}
.btn-export-pdf-link {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}
.btn-export-pdf-link:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: #38bdf8 !important;
}

/* Enriched Finding Cards */
.finding-enriched {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.finding-enriched:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.finding-enriched.sev-critical { border-left: 4px solid var(--sev-critical); }
.finding-enriched.sev-high { border-left: 4px solid var(--sev-high); }
.finding-enriched.sev-medium { border-left: 4px solid var(--sev-medium); }
.finding-enriched.sev-low { border-left: 4px solid var(--sev-low); }
.finding-enriched.sev-info { border-left: 4px solid var(--sev-info); }

.finding-header-wrap {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.finding-title-group {
  flex: 1;
}
.finding-title-text {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.finding-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.endpoint-tag {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
}
.finding-body-wrap {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.finding-narrative {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #c9d1d9;
}
.detail-card-section {
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.impact-section {
  background: rgba(210, 153, 34, 0.08);
  border: 1px solid rgba(210, 153, 34, 0.25);
  color: #e3b341;
}
.impact-section p { margin: 0; color: #f0e6c8; }
.remediation-section {
  background: rgba(46, 160, 67, 0.08);
  border: 1px solid rgba(46, 160, 67, 0.25);
  color: #3fb950;
}
.remediation-section p, .remediation-section ul { margin: 0; color: #c3e6cd; }
.analysis-section {
  background: #090c10;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 12px;
}
.analysis-code {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #a5d6ff;
  max-height: 380px;
  overflow-y: auto;
}

/* Evidence Table Styles */
.evidence-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
}
.evidence-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}
.evidence-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.evidence-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.evidence-table tr:last-child td {
  border-bottom: none;
}
.evidence-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.evidence-thumb-container {
  width: 84px;
  height: 52px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  background: #000;
  transition: all 0.15s ease;
}
.evidence-thumb-container:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  transform: scale(1.02);
}
.evidence-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-zoom-icon {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.evidence-thumb-container:hover .thumb-zoom-icon {
  opacity: 1;
}

.cat-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cat-badge-target { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.cat-badge-auth { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.cat-badge-admin { background: rgba(248, 81, 73, 0.15); color: #ff7b72; }
.cat-badge-clocking { background: rgba(234, 179, 8, 0.15); color: #eab308; }

/* Lightbox Modal */
.evidence-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox-modal {
  background: #0f141c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  max-width: 1100px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}
.lightbox-header {
  padding: 12px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lightbox-title-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.zoom-control-group {
  display: inline-flex;
  align-items: center;
  background: #090e18;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}
.zoom-control-group button {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.zoom-control-group button:hover {
  background: var(--panel-soft);
  color: var(--accent);
}
.zoom-level-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding: 0 8px;
  min-width: 44px;
  text-align: center;
}
.pan-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent);
  padding: 3px 9px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
}
.lightbox-body {
  position: relative;
  padding: 0;
  background: #06080b;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 65vh;
  min-height: 420px;
  user-select: none;
  cursor: zoom-in;
}
.lightbox-body.is-zoomed {
  cursor: grab;
}
.lightbox-body.grabbing {
  cursor: grabbing !important;
}
.lightbox-pan-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.lightbox-pan-canvas.dragging {
  transition: none !important;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 60vh;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  pointer-events: none;
  display: block;
}
.lightbox-drag-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 20, 32, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}
.lightbox-footer {
  padding: 12px 20px;
  background: #141b24;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.lightbox-footer-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  line-height: 1.4;
  word-break: break-all;
}
.lightbox-footer-row strong {
  color: #e2e8f0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .evidence-lightbox {
    padding: 8px !important;
  }
  .lightbox-modal {
    width: 100% !important;
    max-height: 96vh !important;
    border-radius: 8px;
  }
  .lightbox-header {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .lightbox-title-text {
    font-size: 12px !important;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lightbox-toolbar {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }
  .pan-active-pill {
    display: none !important;
  }
  .lightbox-body {
    height: 52vh !important;
    min-height: 320px !important;
  }
  .lightbox-img {
    max-width: 95vw !important;
    max-height: 48vh !important;
  }
  .lightbox-drag-hint {
    font-size: 9.5px !important;
    width: 92% !important;
    justify-content: center !important;
    padding: 4px 8px !important;
  }
  .lightbox-footer {
    padding: 8px 10px !important;
    font-size: 10.5px !important;
  }
}

/* =========================================================
   SOLABS ATTACK CONFIG MODAL & PROGRESSIVE VECTOR MATRIX
   ========================================================= */
  .btn-configure-trigger {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #1f6feb 0%, #238636 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.25);
    transition: all 0.2s ease;
  }
  .btn-configure-trigger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(31, 111, 235, 0.35);
  }

  .solabs-config-dialog {
    max-width: 920px;
    width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    border: 1px solid #30363d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(56, 139, 253, 0.15);
    border-radius: 12px;
    overflow: hidden;
  }

  .solabs-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .solabs-badge {
    background: rgba(56, 139, 253, 0.15);
    border: 1px solid rgba(56, 139, 253, 0.4);
    color: #58a6ff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .target-strip {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 8px 20px;
    font-size: 12px;
    color: #8b949e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .target-strip strong.target-url {
    color: #58a6ff;
    font-family: var(--mono);
  }

  .solabs-config-body {
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .config-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .section-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #c9d1d9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Tier Selector Cards */
  .tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .tier-card {
    background: #161b22;
    border: 2px solid #30363d;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
  }
  .tier-card:hover {
    border-color: #8b949e;
    background: #1c2128;
  }
  .tier-card.active {
    background: #161b22;
  }
  .tier-card.tier-quick.active {
    border-color: #2ea043;
    box-shadow: 0 0 0 1px #2ea043, inset 0 0 12px rgba(46, 160, 67, 0.15);
  }
  .tier-card.tier-std.active {
    border-color: #388bfd;
    box-shadow: 0 0 0 1px #388bfd, inset 0 0 12px rgba(56, 139, 253, 0.15);
  }
  .tier-card.tier-deep.active {
    border-color: #f85149;
    box-shadow: 0 0 0 1px #f85149, inset 0 0 12px rgba(248, 81, 73, 0.15);
  }

  .tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .tier-name {
    font-weight: 700;
    font-size: 13.5px;
    color: #f0f6fc;
  }
  .tier-time {
    font-size: 11px;
    color: #8b949e;
    font-family: var(--mono);
  }
  .tier-desc {
    font-size: 11px;
    color: #8b949e;
    line-height: 1.35;
    min-height: 30px;
  }
  .tier-count {
    font-size: 11.5px;
    font-weight: 700;
  }

  /* Vectors Box */
  .vectors-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 14px;
  }
  .vectors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .vectors-tools {
    display: flex;
    gap: 6px;
  }
  .btn-pill {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
  }
  .btn-pill:hover {
    background: #30363d;
    color: #fff;
  }

  .category-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8b949e;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }

  .vectors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .vec-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
  }
  .vec-item:hover {
    border-color: #388bfd;
    background: #121820;
  }
  .vec-item.checked {
    border-color: rgba(56, 139, 253, 0.4);
    background: rgba(56, 139, 253, 0.05);
  }
  .vec-item input.vec-checkbox {
    margin-top: 3px;
    accent-color: #388bfd;
    cursor: pointer;
  }
  .vec-body {
    flex: 1;
    min-width: 0;
  }
  .vec-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .vec-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #f0f6fc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .vec-desc {
    font-size: 10.5px;
    color: #8b949e;
    line-height: 1.3;
    margin-top: 2px;
  }

  /* Badge Severities */
  .vec-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
  }
  .badge-info { background: rgba(56, 139, 253, 0.15); color: #58a6ff; border: 1px solid rgba(56, 139, 253, 0.3); }
  .badge-low { background: rgba(46, 160, 67, 0.15); color: #3fb950; border: 1px solid rgba(46, 160, 67, 0.3); }
  .badge-med { background: rgba(210, 153, 34, 0.15); color: #d29922; border: 1px solid rgba(210, 153, 34, 0.3); }
  .badge-high { background: rgba(219, 109, 40, 0.15); color: #f0883e; border: 1px solid rgba(219, 109, 40, 0.3); }
  .badge-crit { background: rgba(248, 81, 73, 0.15); color: #f85149; border: 1px solid rgba(248, 81, 73, 0.3); }

  /* Parameters inside modal */
  .modal-config-params {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 14px;
  }

  .budget-unlimited-active {
    background: rgba(63, 185, 80, 0.08) !important;
    border-color: rgba(63, 185, 80, 0.4) !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
    cursor: not-allowed;
    user-select: none;
  }

  /* Footer Solabs */
  .solabs-config-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #161b22;
    border-top: 1px solid #30363d;
    gap: 12px;
  }
  .footer-stat {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .stat-pill {
    background: #21262d;
    border: 1px solid #388bfd;
    color: #58a6ff;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
  }
  .stat-text {
    font-size: 11.5px;
    color: #8b949e;
  }
  .footer-actions {
    display: flex;
    gap: 8px;
  }

  @media (max-width: 768px) {
    .tier-grid {
      grid-template-columns: 1fr;
    }
    .vectors-grid {
      grid-template-columns: 1fr;
    }
    .solabs-config-footer {
      flex-direction: column;
      align-items: stretch;
    }
    .footer-actions {
      flex-direction: column;
    }
    }

    /* ============================================================
     BYOK & LLM Configuration Modal Styles
     ============================================================ */
    .btn-byok-topbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.25);
    color: #58a6ff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    }
    .btn-byok-topbar:hover {
    background: rgba(88, 166, 255, 0.16);
    border-color: rgba(88, 166, 255, 0.5);
    transform: translateY(-1px);
    }

    .byok-modal-card {
      max-width: 680px !important;
      width: 100%;
    }

    .byok-modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 75vh;
    overflow-y: auto;
    }

    .byok-presets-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    }

    .byok-preset {
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    }
    .byok-preset:hover {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.05);
    }
    .byok-preset.active {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
    box-shadow: 0 0 0 1px #58a6ff;
    }
    .byok-preset .preset-icon {
    font-size: 18px;
    margin-bottom: 4px;
    }
    .byok-preset .preset-name {
    font-size: 12px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 2px;
    }
    .byok-preset .preset-desc {
    font-size: 10px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    }

    .byok-status-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: #c9d1d9;
    }
    .byok-status-banner.custom {
    border-color: rgba(88, 166, 255, 0.4);
    background: rgba(88, 166, 255, 0.06);
    }
    .banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3fb950;
    flex-shrink: 0;
    }
    .banner-dot.custom {
    background: #58a6ff;
    box-shadow: 0 0 6px #58a6ff;
    }

    .byok-form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    }

    .byok-form-grid .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    }

    .byok-form-grid label {
    font-size: 12px;
    font-weight: 600;
    color: #e6edf3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    }
    .byok-form-grid label .req {
    color: #f85149;
    }
    .byok-form-grid .hint {
    font-size: 11px;
    color: #8b949e;
    line-height: 1.4;
    }
    .byok-form-grid .hint-inline {
    font-size: 11px;
    font-weight: normal;
    color: #8b949e;
    }

    .input-with-action {
    position: relative;
    display: flex;
    align-items: center;
    }
    .input-with-action input {
    width: 100%;
    padding-right: 36px;
    }
    .btn-toggle-vis {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    border-radius: 4px;
    }
    .btn-toggle-vis:hover {
    color: #e6edf3;
    }

    .byok-test-box {
    background: rgba(13, 17, 23, 0.85);
    border: 1px dashed #30363d;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    }
    .test-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .btn-byok-test {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(88, 166, 255, 0.12);
      border: 1px solid rgba(88, 166, 255, 0.35);
      color: #58a6ff;
      border-radius: 6px;
      padding: 7px 13px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .btn-byok-test:hover {
      background: rgba(88, 166, 255, 0.22);
      border-color: #58a6ff;
      color: #ffffff;
      box-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
    }
    .btn-byok-test:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      box-shadow: none;
    }
    .test-result-summary {
    font-size: 11.5px;
    color: #8b949e;
    font-family: var(--mono);
    }
    .test-result-summary.success {
    color: #3fb950;
    font-weight: 600;
    }
    .test-result-summary.error {
    color: #f85149;
    font-weight: 600;
    }

    .test-models-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
    }
    .preview-title {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    }
    .preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 90px;
    overflow-y: auto;
    }
    .preview-chip {
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.3);
    color: #58a6ff;
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
    }
    .preview-chip:hover {
    background: rgba(56, 139, 253, 0.25);
    border-color: #58a6ff;
    }

    .byok-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #30363d;
    background: #161b22;
    }
    .byok-modal-footer .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    }

    @media (max-width: 640px) {
    .byok-presets-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .byok-presets-grid .byok-preset:last-child {
      grid-column: span 2;
    }
    .test-header {
      flex-direction: column;
      align-items: stretch;
    }
    .byok-modal-footer {
      flex-direction: column;
      align-items: stretch;
    }
    .byok-modal-footer .footer-right {
      flex-direction: column-reverse;
    }
    .byok-modal-footer .footer-right button {
      width: 100%;
    }
    }

}


