/* ─── SecurityCipher Threat Explorer Stylesheet ─── */
:root {
	--bg-root: #060911;
	--bg-panel: #090e1a;
	--bg-card: #0d1527;
	--bg-card-hover: #152238;
	--border-subtle: rgba(255, 255, 255, 0.08);
	--border-bright: rgba(0, 240, 255, 0.4);
	--accent-cyan: #00f0ff;
	--accent-purple: #a855f7;
	--accent-emerald: #10b981;
	--accent-rose: #f43f5e;
	--accent-amber: #fbbf24;
	--text-primary: #f8fafc;
	--text-secondary: #94a3b8;
	--text-dim: #64748b;
	--font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body.sc-threat-explorer-page {
	background: var(--bg-root) !important;
	color: var(--text-primary);
	font-family: var(--font-sans);
	overflow: hidden;
	height: 100vh;
	width: 100vw;
}

/* ─── App Shell ─── */
.threat-explorer-app {
	display: flex;
	flex-direction: column;
	height: 100vh;
	width: 100vw;
	background: var(--bg-root);
	position: relative;
	overflow: hidden;
}

/* ─── Topbar ─── */
.threat-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 0 16px;
	background: #080c16;
	border-bottom: 1px solid var(--border-subtle);
	z-index: 100;
	gap: 16px;
	flex-shrink: 0;
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.brand-back-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--border-subtle);
	color: var(--text-secondary);
	padding: 6px 12px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.2s;
}

.brand-back-btn:hover {
	color: var(--accent-cyan);
	border-color: var(--border-bright);
	background: rgba(0, 240, 255, 0.08);
}

.brand-cube-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--accent-cyan);
	border-radius: 6px;
	background: rgba(0, 240, 255, 0.08);
	box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.brand-title-wrap {
	display: flex;
	flex-direction: column;
}

.brand-title {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
	text-transform: uppercase;
}

.brand-kicker {
	font-size: 10px;
	color: var(--accent-cyan);
	letter-spacing: 0.08em;
	font-weight: 700;
	font-family: var(--font-mono);
}

.topbar-center {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	max-width: 600px;
}

.search-box {
	display: flex;
	align-items: center;
	position: relative;
	width: 100%;
}

.search-icon {
	position: absolute;
	left: 10px;
	color: var(--text-dim);
	pointer-events: none;
}

.search-input {
	width: 100%;
	background: rgba(13, 21, 39, 0.85);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	padding: 7px 50px 7px 32px;
	font-size: 13px;
	color: #fff;
	outline: none;
	transition: all 0.2s;
}

.search-input:focus {
	border-color: var(--accent-cyan);
	box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.kbd-shortcut {
	position: absolute;
	right: 10px;
	font-size: 11px;
	font-family: var(--font-mono);
	background: rgba(255, 255, 255, 0.08);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--text-dim);
}

.topbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn-icon {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--border-subtle);
	color: var(--text-secondary);
	padding: 7px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.15s;
}

.btn-icon:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Main Content Layout ─── */
.threat-workspace {
	display: flex;
	flex: 1;
	overflow: hidden;
	position: relative;
}

/* ─── Left Sidebar (Scenario List) ─── */
.threat-sidebar {
	width: 300px;
	background: #080c16;
	border-right: 1px solid var(--border-subtle);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	transition: width 0.25s ease;
}

.threat-sidebar.is-collapsed {
	width: 0;
	border-right: none;
	overflow: hidden;
}

.sidebar-header {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border-subtle);
}

/* 5-Column Segmented Tab Bar */
.category-pills {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 3px;
	margin-bottom: 8px;
	background: rgba(0, 0, 0, 0.35);
	padding: 3px;
	border-radius: 6px;
	border: 1px solid var(--border-subtle);
}

.cat-pill {
	background: transparent;
	border: none;
	color: var(--text-dim);
	padding: 6px 2px;
	text-align: center;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font-mono);
	transition: all 0.15s;
	white-space: nowrap;
}

.cat-pill:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.05);
}

.cat-pill.active {
	background: rgba(0, 240, 255, 0.15);
	color: var(--accent-cyan);
	box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.scenario-count-bar {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	font-family: var(--font-mono);
	color: var(--text-dim);
	letter-spacing: 0.05em;
	padding: 0 2px;
}

.scenario-list-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.scenario-card {
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	padding: 12px;
	cursor: pointer;
	transition: all 0.15s;
}

.scenario-card:hover {
	background: var(--bg-card-hover);
	border-color: rgba(255, 255, 255, 0.18);
}

.scenario-card.is-selected {
	background: rgba(0, 240, 255, 0.04);
	border-color: var(--accent-cyan);
	box-shadow: 0 0 14px rgba(0, 240, 255, 0.15);
}

.sc-badge-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.badge {
	font-size: 9px;
	font-family: var(--font-mono);
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 3px;
	text-transform: uppercase;
}

.badge.sev-critical {
	background: rgba(244, 63, 94, 0.2);
	color: #f43f5e;
	border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge.sev-high {
	background: rgba(251, 191, 36, 0.2);
	color: #fbbf24;
	border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge.sev-medium {
	background: rgba(56, 189, 248, 0.2);
	color: #38bdf8;
	border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge.sev-info {
	background: rgba(148, 163, 184, 0.2);
	color: #94a3b8;
	border: 1px solid rgba(148, 163, 184, 0.4);
}

.category-tag {
	font-size: 10px;
	font-family: var(--font-mono);
	color: var(--text-dim);
}

.scenario-title {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 4px;
	color: #fff;
}

.scenario-desc {
	font-size: 11px;
	color: var(--text-secondary);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.scenario-steps-container {
	margin-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	padding-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.scenario-step-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 8px;
	border-radius: 4px;
	font-size: 11px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid transparent;
	transition: all 0.1s;
}

.scenario-step-row:hover {
	background: rgba(255, 255, 255, 0.06);
}

.scenario-step-row.is-active {
	background: rgba(0, 240, 255, 0.1);
	border-color: rgba(0, 240, 255, 0.35);
}

.step-num {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-family: var(--font-mono);
	font-weight: bold;
}

.scenario-step-row.is-active .step-num {
	background: var(--accent-cyan);
	color: #060911;
}

.step-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
}

.step-title {
	color: var(--text-secondary);
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 180px;
}

.step-proto {
	font-size: 9px;
	font-family: var(--font-mono);
	color: var(--text-dim);
}

/* ─── Center Studio (Diagram + Table) ─── */
.threat-studio {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bg-root);
}

/* Diagram Controls Bar */
.diagram-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 48px;
	padding: 0 16px;
	background: #080c16;
	border-bottom: 1px solid var(--border-subtle);
	flex-shrink: 0;
}

.view-mode-tabs {
	display: flex;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--border-subtle);
	border-radius: 6px;
	padding: 2px;
	gap: 2px;
}

.view-tab {
	background: transparent;
	border: none;
	color: var(--text-dim);
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font-mono);
	transition: all 0.15s;
}

.view-tab.active {
	background: var(--accent-cyan);
	color: #060911;
	box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.step-indicator {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
}

.step-badge {
	font-size: 10px;
	font-family: var(--font-mono);
	font-weight: bold;
	background: rgba(0, 240, 255, 0.1);
	border: 1px solid rgba(0, 240, 255, 0.25);
	padding: 3px 8px;
	border-radius: 4px;
	color: var(--accent-cyan);
}

.step-name {
	font-weight: 700;
	color: #fff;
}

.status-pill {
	font-size: 9px;
	font-family: var(--font-mono);
	font-weight: 800;
	padding: 3px 7px;
	border-radius: 3px;
	text-transform: uppercase;
}

.status-pill.status-critical, .status-pill.status-high {
	background: rgba(244, 63, 94, 0.2);
	color: #f43f5e;
	border: 1px solid rgba(244, 63, 94, 0.4);
}

.status-pill.status-medium, .status-pill.status-info {
	background: rgba(0, 240, 255, 0.15);
	color: #00f0ff;
	border: 1px solid rgba(0, 240, 255, 0.3);
}

/* Diagram Canvas */
.diagram-canvas {
	flex: 1;
	min-height: 280px;
	position: relative;
	background: radial-gradient(circle at 50% 40%, rgba(0, 240, 255, 0.04) 0%, transparent 75%), #060a13;
	overflow: hidden;
}

.diagram-canvas svg {
	width: 100%;
	height: 100%;
}

.iso-node-group {
	cursor: pointer;
}

.iso-node-group .iso-device-art {
	transform-box: fill-box;
	transform-origin: center bottom;
	transition: filter 0.3s ease;
}

.iso-node-group .iso-ground-disc {
	transition: stroke 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
}

.iso-node-group:hover .iso-ground-disc {
	stroke: #00f0ff !important;
	stroke-width: 2px !important;
	filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.7)) !important;
}

.iso-node-group:hover .iso-node-title {
	fill: #00f0ff;
}

.iso-node-group.is-active .iso-node-title {
	fill: #ffffff;
	font-weight: 800;
}

/* ─── Floating Node HUD Tooltip ─── */
.node-hud-tooltip {
	position: absolute;
	pointer-events: none;
	z-index: 50;
	background: rgba(8, 14, 26, 0.94);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(0, 240, 255, 0.45);
	border-radius: 8px;
	padding: 10px 14px;
	min-width: 220px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 240, 255, 0.25);
	transform: translate(-50%, -100%);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.node-hud-tooltip.is-visible {
	opacity: 1;
	visibility: visible;
}

.hud-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.hud-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	display: inline-block;
}

.hud-role {
	font-size: 9.5px;
	font-weight: 800;
	font-family: var(--font-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hud-id {
	margin-left: auto;
	font-size: 9px;
	color: #64748b;
	font-family: var(--font-mono);
}

.hud-title {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 8px;
	line-height: 1.25;
}

.hud-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding-top: 6px;
}

.hud-metric {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 10px;
}

.hud-label {
	color: #64748b;
	font-family: var(--font-mono);
}

.hud-val {
	color: #38bdf8;
	font-family: var(--font-mono);
	font-weight: 600;
}

/* ─── Wireshark Execution Trace Panel ─── */
.trace-panel {
	height: 250px;
	background: #080c16;
	border-top: 1px solid var(--border-subtle);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.trace-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 16px;
	background: #070b13;
	border-bottom: 1px solid var(--border-subtle);
	font-size: 11px;
}

.trace-title {
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--text-dim);
	font-family: var(--font-mono);
}

.playback-controls {
	display: flex;
	align-items: center;
	gap: 6px;
}

.btn-ctrl {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--border-subtle);
	color: var(--text-secondary);
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font-mono);
	transition: all 0.15s;
}

.btn-ctrl:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.btn-ctrl:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.btn-ctrl.btn-primary {
	background: #0284c7;
	border-color: #38bdf8;
	color: #fff;
	box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-ctrl.btn-primary.is-playing {
	background: #e11d48;
	border-color: #fb7185;
}

.trace-table-scroll {
	flex: 1;
	overflow-y: auto;
	overflow-x: auto;
}

.trace-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 11px;
	font-family: var(--font-mono);
	table-layout: fixed;
}

.trace-table th {
	position: sticky;
	top: 0;
	background: linear-gradient(180deg, #0e172a 0%, #080c16 100%);
	padding: 8px 10px;
	text-align: left;
	font-weight: 800;
	color: #7dd3fc;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(0, 240, 255, 0.25);
	font-size: 9.5px;
	letter-spacing: 0.08em;
	z-index: 10;
	white-space: nowrap;
	text-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.trace-table td {
	padding: 8px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.035);
	color: var(--text-secondary);
	vertical-align: middle;
	background: transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.col-no { width: 34px; text-align: center; }
.col-phase { width: 140px; font-weight: 600; color: #fff; }
.col-src { width: 75px; }
.col-dst { width: 78px; }
.col-proto { width: 85px; }
.col-summary { width: auto; }
.col-status { width: 85px; text-align: center; }
.col-inspect { width: 75px; text-align: center; }

/* ─── Rows & Selection Physics ─── */
.trace-row {
	cursor: pointer;
	position: relative;
	transition: all 0.15s ease;
}

.trace-row:nth-child(even) td {
	background: rgba(255, 255, 255, 0.012);
}

.trace-row:hover td {
	background: rgba(0, 240, 255, 0.045) !important;
	color: #f8fafc;
}

.trace-row.is-selected td {
	background: rgba(0, 240, 255, 0.09) !important;
	color: #fff;
	border-bottom-color: rgba(0, 240, 255, 0.3);
}

.trace-row.is-selected td:first-child {
	border-left: 3px solid var(--accent-cyan);
}

/* ─── Step Number Badge ─── */
.badge-index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #94a3b8;
	font-weight: 800;
	font-size: 10px;
	letter-spacing: -0.02em;
	transition: all 0.2s ease;
}

.badge-index.is-active-step {
	background: #00f0ff;
	color: #040812;
	border-color: #00f0ff;
	box-shadow: 0 0 14px rgba(0, 240, 255, 0.65);
}

.badge-index.is-past-step {
	background: rgba(16, 185, 129, 0.15);
	color: #34d399;
	border-color: rgba(16, 185, 129, 0.35);
}

/* ─── Phase Cell ─── */
.phase-container {
	display: flex;
	align-items: center;
	gap: 8px;
}

.phase-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #64748b;
	flex-shrink: 0;
}

.phase-live-dot.pulse {
	background: #00f0ff;
	box-shadow: 0 0 10px #00f0ff;
	animation: dot-pulse 1.4s infinite;
}

.phase-live-dot.done {
	background: #10b981;
}

@keyframes dot-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.4); opacity: 0.6; }
}

.phase-text {
	font-weight: 700;
	color: #f1f5f9;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 110px;
}

/* ─── Source & Target Entity Pills ─── */
.entity-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	border-radius: 5px;
	font-family: var(--font-mono);
	font-size: 10.5px;
	white-space: nowrap;
	font-weight: 600;
}

.entity-pill.entity-src {
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.25);
	color: #38bdf8;
}

.entity-pill.entity-src .entity-indicator {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #38bdf8;
	box-shadow: 0 0 6px #38bdf8;
}

.entity-pill.entity-dst {
	background: rgba(244, 63, 94, 0.1);
	border: 1px solid rgba(244, 63, 94, 0.25);
	color: #fb7185;
}

.entity-pill.entity-dst .entity-arrow {
	font-size: 10px;
	color: #f43f5e;
}

/* ─── Protocol Badges ─── */
.proto-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 5px;
	font-size: 10px;
	font-weight: 800;
	font-family: var(--font-mono);
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.proto-badge.proto-http {
	background: rgba(0, 240, 255, 0.12);
	border: 1px solid rgba(0, 240, 255, 0.35);
	color: #00f0ff;
	box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.proto-badge.proto-ai {
	background: rgba(168, 85, 247, 0.14);
	border: 1px solid rgba(168, 85, 247, 0.4);
	color: #c084fc;
	box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

.proto-badge.proto-crit {
	background: rgba(244, 63, 94, 0.15);
	border: 1px solid rgba(244, 63, 94, 0.4);
	color: #f43f5e;
	box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.proto-badge.proto-sec {
	background: rgba(251, 191, 36, 0.12);
	border: 1px solid rgba(251, 191, 36, 0.35);
	color: #fbbf24;
	box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

/* ─── Payload Summary & Highlights ─── */
.summary-content {
	line-height: 1.45;
	color: #cbd5e1;
	font-size: 11px;
}

.summary-chip {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	padding: 1px 5px;
	border-radius: 3px;
	color: #38bdf8;
	font-family: var(--font-mono);
	font-size: 10px;
}

/* ─── Status Chip with Glowing Dot ─── */
.status-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px;
	border-radius: 5px;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.status-chip .status-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
}

.status-chip.status-critical, .status-chip.status-high {
	background: rgba(244, 63, 94, 0.14);
	color: #f43f5e;
	border: 1px solid rgba(244, 63, 94, 0.35);
	box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

.status-chip.status-critical .status-dot, .status-chip.status-high .status-dot {
	background: #f43f5e;
	box-shadow: 0 0 6px #f43f5e;
}

.status-chip.status-medium, .status-chip.status-info {
	background: rgba(16, 185, 129, 0.14);
	color: #10b981;
	border: 1px solid rgba(16, 185, 129, 0.35);
	box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.status-chip.status-medium .status-dot, .status-chip.status-info .status-dot {
	background: #10b981;
	box-shadow: 0 0 6px #10b981;
}

/* ─── Inspect Button ─── */
.btn-inspect-step {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(14, 165, 233, 0.05));
	border: 1px solid rgba(0, 240, 255, 0.35);
	color: var(--accent-cyan);
	padding: 4px 10px;
	border-radius: 5px;
	font-size: 10px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	white-space: nowrap;
}

.btn-inspect-step:hover {
	background: #00f0ff;
	color: #040812;
	border-color: #00f0ff;
	box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
	transform: translateY(-1px);
}

/* ─── Right Panel (Threat Overview & Dossier) ─── */
.threat-overview-panel {
	width: 300px;
	background: #080c16;
	border-left: 1px solid var(--border-subtle);
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex-shrink: 0;
}

.dossier-card {
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	padding: 12px;
}

.dossier-card h4 {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.07em;
	color: var(--accent-cyan);
	margin-bottom: 8px;
	font-family: var(--font-mono);
	text-transform: uppercase;
}

.dossier-card p {
	font-size: 12px;
	color: var(--text-secondary);
	line-height: 1.5;
}

.meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.meta-item {
	background: rgba(0, 0, 0, 0.35);
	padding: 7px 9px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-label {
	font-size: 9px;
	color: var(--text-dim);
	font-family: var(--font-mono);
	text-transform: uppercase;
}

.meta-val {
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	margin-top: 3px;
	font-family: var(--font-mono);
}

.telemetry-code {
	font-size: 11px;
	font-family: var(--font-mono);
	background: #05070d;
	padding: 10px;
	border-radius: 6px;
	color: #38bdf8;
	overflow-x: auto;
	border: 1px solid rgba(255, 255, 255, 0.05);
	line-height: 1.45;
}

/* ─── Deep Payload Inspector Modal ─── */
.inspector-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}

.inspector-modal.is-open {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}

.inspector-dialog {
	width: 100%;
	max-width: 880px;
	max-height: 85vh;
	background: #090e1a;
	border: 1px solid var(--border-bright);
	box-shadow: 0 0 35px rgba(0, 240, 255, 0.28);
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.inspector-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: #0c1322;
	border-bottom: 1px solid var(--border-subtle);
}

.inspector-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 800;
	color: #fff;
}

.inspector-close {
	background: transparent;
	border: none;
	color: var(--text-dim);
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
}

.inspector-close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.inspector-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.inspector-section h4 {
	font-size: 11px;
	font-weight: 800;
	font-family: var(--font-mono);
	color: var(--accent-cyan);
	margin-bottom: 6px;
	letter-spacing: 0.05em;
}

.code-block {
	font-size: 11.5px;
	font-family: var(--font-mono);
	background: #05070d;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 6px;
	padding: 12px;
	color: #e2e8f0;
	overflow-x: auto;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-all;
}

.code-block.hl-prompt { border-left: 3px solid #38bdf8; }
.code-block.hl-thought { border-left: 3px solid #a855f7; color: #d8b4fe; }
.code-block.hl-tool { border-left: 3px solid #f43f5e; color: #fca5a5; }
.code-block.hl-defense { border-left: 3px solid #10b981; color: #6ee7b7; }

.eval-box {
	font-size: 12px;
	font-weight: 700;
	font-family: var(--font-mono);
	padding: 10px 14px;
	border-radius: 6px;
}

.eval-box.eval-fail {
	background: rgba(244, 63, 94, 0.12);
	border: 1px solid rgba(244, 63, 94, 0.35);
	color: #f43f5e;
}

.eval-box.eval-pass {
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.35);
	color: #10b981;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 1200px) {
	.threat-overview-panel {
		display: none;
	}
}

@media (max-width: 860px) {
	.threat-sidebar {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		z-index: 90;
		box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
	}
	.threat-sidebar.is-collapsed {
		display: none;
	}
	.topbar-center {
		display: none;
	}
}
