/* ==========================================================================
   SORA LUNA 穹之月 — Website Security Analysis Workbench
   Theme: Obsidian Dark / Cyber Security Operations
   ========================================================================== */

:root {
  /* Core Palette - Cyber Obsidian */
  --bg: #070d18;
  --bg-deep: #040810;
  --bg-soft: #0b1523;
  --bg-elevated: #0f1d30;
  --panel: rgba(13, 24, 40, 0.88);
  --panel-strong: #0f2035;
  --panel-hover: rgba(20, 36, 58, 0.95);
  
  /* Borders & Grid Lines */
  --border: rgba(94, 153, 222, 0.16);
  --border-bright: rgba(94, 180, 255, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.06);
  
  /* Text & Inks */
  --text-main: #f0f4f8;
  --text-muted: #8fa2b8;
  --text-subtle: #56687e;
  --text-inverse: #070d18;

  /* Cyber Neon Semantic Accents */
  --cyan: #00e5ff;
  --cyan-rgb: 0, 229, 255;
  --cyan-glow: rgba(0, 229, 255, 0.25);
  
  --emerald: #00e676;
  --emerald-rgb: 0, 230, 118;
  --emerald-glow: rgba(0, 230, 118, 0.25);
  
  --amber: #ffb300;
  --amber-rgb: 255, 179, 0;
  --amber-glow: rgba(255, 179, 0, 0.25);
  
  --rose: #ff3366;
  --rose-rgb: 255, 51, 102;
  --rose-glow: rgba(255, 51, 102, 0.28);
  
  --purple: #b388ff;
  --purple-rgb: 179, 136, 255;
  --purple-glow: rgba(179, 136, 255, 0.25);

  /* Shadows & Elevations */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 20px var(--cyan-glow);

  /* Dimensions */
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
body.light {
  --bg: #f4f7fa;
  --bg-deep: #e9eef3;
  --bg-soft: #ffffff;
  --bg-elevated: #f0f4f8;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --panel-hover: #f8fafc;
  
  --border: rgba(22, 49, 77, 0.12);
  --border-bright: rgba(0, 140, 255, 0.32);
  --border-subtle: rgba(0, 0, 0, 0.05);
  
  --text-main: #132130;
  --text-muted: #536475;
  --text-subtle: #7a8b9c;
  --text-inverse: #ffffff;

  --cyan: #0077cc;
  --cyan-glow: rgba(0, 119, 204, 0.15);
  --emerald: #009944;
  --emerald-glow: rgba(0, 153, 68, 0.15);
  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.15);
  --rose: #e11d48;
  --rose-glow: rgba(225, 29, 72, 0.18);
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 49, 77, 0.09);
  --shadow-lg: 0 20px 48px rgba(22, 49, 77, 0.12);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-bright);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body.light {
  color-scheme: light;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting & Noise */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 500px;
  background: radial-gradient(circle 800px at 50% -100px, rgba(0, 229, 255, 0.08), transparent 70%),
              radial-gradient(circle 600px at 90% 200px, rgba(179, 136, 255, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body.light .hero-room {
  background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%);
  border-color: rgba(0, 119, 204, 0.25);
  box-shadow: var(--shadow-md);
}

body.light .target-badge-pill {
  background: rgba(0, 119, 204, 0.05);
  border-color: var(--border);
}

body.light .sidebar-target-chip {
  background: #ffffff;
  border-color: var(--border);
}

body.light .sidebar-note {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.25);
}

body.light .payload-preview {
  background: rgba(22, 49, 77, 0.06);
  color: var(--text-main);
}

body.light .ambient-glow {
  background: radial-gradient(circle 800px at 50% -100px, rgba(0, 119, 204, 0.05), transparent 70%);
}

.noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

body.light .noise {
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
}

/* Typography Helpers */
h1, h2, h3, h4, strong {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

code, pre, .mono {
  font-family: 'DM Mono', monospace;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  color: inherit;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ==========================================================================
   APP SHELL & LAYOUT
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  padding: 24px 16px;
  transition: transform var(--transition-normal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--cyan-glow);
  overflow: hidden;
}

.brand-radar-ring {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.brand-radar-beam {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 70%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: 50%;
  animation: radarRotate 3s linear infinite;
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light .brand-text strong {
  background: linear-gradient(90deg, #132130, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
}

.rail-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
  margin-bottom: 10px;
  padding-left: 8px;
}

/* Nav Stack */
.nav-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: left;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  background: var(--panel-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.12), rgba(0, 229, 255, 0.02));
  color: var(--cyan);
  border: 1px solid var(--border-bright);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--cyan);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--cyan);
}

.nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav-meta b {
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-meta small {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.nav-item.active .nav-meta small {
  color: rgba(0, 229, 255, 0.7);
}

body.light .nav-item.active .nav-meta small {
  color: var(--cyan);
}

.nav-count {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.nav-count-accent {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid rgba(179, 136, 255, 0.3);
}

/* Sidebar Target Chip */
.sidebar-target-chip {
  margin-top: auto;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  flex-shrink: 0;
}

.chip-text small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
}

.chip-text strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

/* Safe Test Mode Badge */
.sidebar-note {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 179, 0, 0.06);
  border: 1px solid rgba(255, 179, 0, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.75rem;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--amber);
}

.sidebar-note b {
  display: block;
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.sidebar-note p {
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.version-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.version-tag strong {
  color: var(--cyan);
  margin-left: 6px;
}

.theme-toggle-sidebar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background var(--transition-fast);
}

.theme-toggle-sidebar:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cyan);
}

/* ==========================================================================
   MAIN CONTENT & TOPBAR
   ========================================================================== */

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.topbar {
  height: var(--topbar-h);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.4rem;
  padding: 6px;
  margin-right: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
}

.breadcrumb .eyebrow {
  color: var(--text-subtle);
  letter-spacing: 0.08em;
}

.breadcrumb .slash {
  color: var(--border-bright);
}

.breadcrumb #roomLabel {
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.topbar-center {
  display: flex;
  align-items: center;
}

.target-badge-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
}

.target-label {
  color: var(--text-subtle);
}

.target-value {
  color: var(--text-main);
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--emerald);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
}

.status-pill.busy {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--cyan);
}

.status-pill.busy .status-dot {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-bright);
  color: var(--cyan);
}

/* Global Scan Notice Banner */
.scan-notice {
  margin: 16px 28px 0;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: none;
  animation: fadeIn 0.2s ease;
}

.scan-notice.active {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scan-notice.info {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan);
}

.scan-notice.warning {
  background: rgba(255, 179, 0, 0.08);
  border: 1px solid rgba(255, 179, 0, 0.3);
  color: var(--amber);
}

.scan-notice.error {
  background: rgba(255, 51, 102, 0.08);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: var(--rose);
}

.scan-notice.success {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--emerald);
}

/* Tab Panels Switching */
.tab-panel {
  display: none;
  padding: 28px;
  flex: 1;
  animation: fadeIn 0.25s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Generic Room Heading */
.room-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.room-heading h1 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.room-heading p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 680px;
}

.room-stamp {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-subtle);
  text-align: right;
  border: 1px dashed var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

/* Generic Panel Styling */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.panel-index {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  display: block;
  margin-bottom: 4px;
}

.panel-heading h2 {
  font-size: 1.15rem;
}

.panel-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.panel-status.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.panel-status.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

/* ==========================================================================
   ROOM 00: 總覽儀表板 (MISSION CONTROL)
   ========================================================================== */

.hero-room {
  background: linear-gradient(135deg, rgba(13, 24, 40, 0.9), rgba(15, 32, 53, 0.95));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.hero-room::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 16px;
}

.pulse-ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: pulseDot 1.5s infinite;
}

.hero-copy h1 {
  font-size: 2.3rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cyan), #80d8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  display: block;
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-item {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--cyan), #00b0ff);
  color: var(--text-inverse);
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--cyan-glow);
  transition: all var(--transition-fast);
}

.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.4);
}

.primary-cta .arrow-icon {
  transition: transform var(--transition-fast);
}

.primary-cta:hover .arrow-icon {
  transform: translateX(4px);
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.secondary-cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-bright);
  color: var(--cyan);
}

/* Orbit Graphic Visualizer */
.hero-orbit {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 229, 255, 0.2);
}

.orbit-ring-1 {
  width: 140px;
  height: 140px;
  animation: ringSpin 20s linear infinite;
}

.orbit-ring-2 {
  width: 210px;
  height: 210px;
  border-style: solid;
  border-color: rgba(94, 153, 222, 0.15);
}

.orbit-ring-3 {
  width: 280px;
  height: 280px;
  border-style: dashed;
  animation: ringSpin 35s linear infinite reverse;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 75%, rgba(0, 229, 255, 0.15) 100%);
  animation: radarRotate 4s linear infinite;
}

.orbit-core {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--cyan-glow);
  z-index: 2;
}

.core-symbol {
  font-size: 1.4rem;
}

.orbit-core strong {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.orbit-core small {
  font-size: 0.62rem;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
}

.orbit-chip {
  position: absolute;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-pill);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  z-index: 3;
}

.orbit-chip span {
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.chip-1 {
  top: 15px;
  left: 0;
}
.chip-1 span { background: rgba(0, 230, 118, 0.2); color: var(--emerald); }

.chip-2 {
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
}
.chip-2 span { background: rgba(0, 229, 255, 0.2); color: var(--cyan); }

.chip-3 {
  bottom: 15px;
  left: 20px;
}
.chip-3 span { background: rgba(179, 136, 255, 0.2); color: var(--purple); }

/* Overview Dashboard Grid */
.overview-dashboard-grid {
  display: block;
  margin-bottom: 28px;
}

.overview-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.overview-card h2 {
  font-size: 1.15rem;
  margin-top: 2px;
}

.grade-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.grade-pill.grade-a {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.grade-pill.grade-b {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.grade-pill.grade-c {
  background: rgba(255, 179, 0, 0.15);
  color: var(--amber);
  border: 1px solid rgba(255, 179, 0, 0.35);
}

.grade-pill.grade-exposed {
  background: rgba(255, 51, 102, 0.15);
  color: var(--rose);
  border: 1px solid rgba(255, 51, 102, 0.35);
}

/* Posture Gauge Wrap */
.posture-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.gauge-circle {
  width: 110px;
  height: 110px;
  position: relative;
  flex-shrink: 0;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.gauge-bar {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.5s ease;
}

.gauge-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-number strong {
  font-size: 1.7rem;
  line-height: 1;
  font-family: 'Space Grotesk', sans-serif;
}

.gauge-number small {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
  margin-top: 4px;
}

.posture-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  font-size: 0.82rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breakdown-row span:nth-child(2) {
  color: var(--text-muted);
  flex: 1;
  margin-left: 8px;
}

.breakdown-row strong {
  font-family: 'DM Mono', monospace;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-blocked { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.dot-confirmed { background: var(--rose); box-shadow: 0 0 6px var(--rose); }
.dot-signal { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot-passed { background: var(--text-subtle); }

.card-action-bar {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.text-button {
  font-size: 0.82rem;
  color: var(--cyan);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.text-button:hover {
  text-decoration: underline;
  color: #80d8ff;
}

/* State Card */
.state-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.state-pill-large {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.state-timestamp {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
}

.state-card h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.state-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 18px;
}

.state-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.state-meta-grid div span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-bottom: 2px;
}

.state-meta-grid div strong {
  display: block;
  font-size: 0.88rem;
  font-family: 'DM Mono', monospace;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Presets Card */
.presets-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.preset-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 14px;
  flex: 1;
}

.preset-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--transition-fast);
}

.preset-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.preset-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.preset-info strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.preset-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.35;
}

/* Pipeline Flow Visualizer */
.pipeline-panel {
  margin-bottom: 20px;
}

.pipeline-status-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
}

.pipeline-steps-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  gap: 8px;
  overflow-x: auto;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  flex: 1 1 0;
  min-width: 125px;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.step-content p {
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.3;
  margin: 0;
}

.pipeline-arrow {
  color: var(--border-bright);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   ROOM 01: 掃描配置艙 (SCAN CHAMBER)
   ========================================================================== */

.scan-workbench {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.scan-panel {
  display: flex;
  flex-direction: column;
}

/* Stepper Tabs */
.scan-room-tabs {
  display: flex;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.scan-room-tab {
  flex: 1 0 auto;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.scan-room-tab:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.scan-room-tab.active {
  background: rgba(0, 229, 255, 0.04);
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.stage-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.82rem;
}

.scan-room-tab.active .stage-num {
  background: var(--cyan);
  color: var(--text-inverse);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.stage-titles b {
  display: block;
  font-size: 0.92rem;
}

.stage-titles small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.scan-room-tab.active .stage-titles small {
  color: rgba(0, 229, 255, 0.8);
}

body.light .scan-room-tab.active .stage-titles small {
  color: var(--cyan);
}

/* Scan Stages Content */
.scan-stage {
  padding: 28px;
  flex: 1;
}

.stage-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.stage-number {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.stage-heading h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.stage-heading p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.stage-heading code {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.stage-tag {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  border: 1px solid var(--border);
}

/* Stage 01: Target Input Card */
.target-input-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.url-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.url-protocol-glyph {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.7;
}

.url-input-wrapper input {
  width: 100%;
  padding: 14px 44px 14px 42px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.url-input-wrapper input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.clear-input-btn {
  position: absolute;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.clear-input-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.sample-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.sample-targets-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.sample-pill {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.sample-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
  color: var(--text-main);
}

/* Safe Consent Box */
.safe-consent-box {
  background: rgba(0, 230, 118, 0.04);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0, 230, 118, 0.4);
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-fast);
}

.consent-label input:checked + .custom-checkbox {
  background: var(--emerald);
  border-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.consent-label input:checked + .custom-checkbox::after {
  content: '✓';
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 0.85rem;
}

.consent-text strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.consent-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Stage 02: Attack Library Toolbar & Grid */
.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.quick-filter-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.4);
}

.filter-btn-muted:hover {
  color: var(--rose);
}

.category-search-box {
  position: relative;
  min-width: 220px;
}

.category-search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}

.category-search-box input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
}

.category-search-box input:focus {
  border-color: var(--cyan);
}

/* 28 Categories Checkboxes Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.categories-grid::-webkit-scrollbar {
  width: 6px;
}

.categories-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.cat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  user-select: none;
}

.cat-card:hover {
  background: var(--panel-hover);
  border-color: var(--border-bright);
}

.cat-card.selected {
  background: rgba(0, 229, 255, 0.05);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.08);
}

.cat-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-custom-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-bright);
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  transition: all var(--transition-fast);
}

.cat-card.selected .cat-custom-check {
  background: var(--cyan);
  border-color: var(--cyan);
}

.cat-card.selected .cat-custom-check::after {
  content: '✓';
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 0.72rem;
}

.cat-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.cat-name-row strong {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-subtle);
  flex-shrink: 0;
}

.cat-tag.tag-owasp { background: rgba(0, 229, 255, 0.15); color: var(--cyan); }
.cat-tag.tag-critical { background: rgba(255, 51, 102, 0.15); color: var(--rose); }
.cat-tag.tag-bypass { background: rgba(255, 179, 0, 0.15); color: var(--amber); }
.cat-tag.tag-api { background: rgba(179, 136, 255, 0.15); color: var(--purple); }

.cat-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.3;
}

/* Stage 03: Strategy & Evasion */
.strategy-section {
  margin-bottom: 24px;
}

.strategy-section-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 12px;
}

.method-chips-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.method-chip {
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.method-chip input {
  display: none;
}

.method-chip:hover {
  border-color: var(--border-bright);
  color: var(--text-main);
}

.method-chip.selected {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.4);
}

/* Cyber Switches Grid */
.switches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.switch-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.switch-card:hover {
  background: var(--panel-hover);
  border-color: var(--border-bright);
}

.switch-card input {
  display: none;
}

.switch-slider {
  width: 36px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background var(--transition-fast);
}

.switch-slider::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--transition-fast);
}

.switch-card input:checked + .switch-slider {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.switch-card.switch-card-accent input:checked + .switch-slider {
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple-glow);
}

.switch-card input:checked + .switch-slider::after {
  transform: translateX(16px);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.switch-label-wrap strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.switch-label-wrap small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.35;
}

.padding-size-row {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.padding-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.radio-chip {
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-chip input {
  display: none;
}

.radio-chip:has(input:checked) {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: var(--cyan);
}

/* Custom Headers */
.headers-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.text-btn-small {
  font-size: 0.75rem;
  color: var(--cyan);
  cursor: pointer;
}

.text-btn-small:hover {
  text-decoration: underline;
}

.code-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
}

.code-textarea:focus {
  border-color: var(--cyan);
}

/* Scan Wizard Footer */
.scan-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
  gap: 16px;
}

.wizard-nav-btns {
  display: flex;
  gap: 10px;
}

.outline-button {
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.outline-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
  color: var(--cyan);
}

.outline-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.outline-button.small {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.outline-button.w-full {
  width: 100%;
  justify-content: center;
}

.wizard-submit-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.selection-summary-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.selection-summary-text b {
  color: var(--cyan);
  font-family: 'DM Mono', monospace;
}

.primary-cta-glow {
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--cyan), #00b0ff);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px var(--cyan-glow);
  transition: all var(--transition-fast);
}

.primary-cta-glow:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.5);
}

.primary-cta-glow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.primary-cta-glow.small {
  padding: 6px 14px;
  font-size: 0.78rem;
}

/* Side Rail */
.scan-side-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scan-side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.scan-side-card-accent {
  border-color: var(--border-bright);
  background: linear-gradient(135deg, var(--panel), rgba(0, 229, 255, 0.04));
}

.scan-side-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  word-break: break-all;
}

.scan-side-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.side-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.side-stat-row strong {
  color: var(--cyan);
  font-family: 'DM Mono', monospace;
  margin: 0;
}

/* ==========================================================================
   ROOM 02: WAF 偵測艙 (SIGNAL ANALYSIS)
   ========================================================================== */

.waf-room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.signal-panel {
  display: flex;
  flex-direction: column;
}

/* Radar Display Card */
.waf-card {
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border);
}

.radar-display {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid rgba(0, 229, 255, 0.4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
  flex-shrink: 0;
}

.radar-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at center, transparent 30%, rgba(0, 229, 255, 0.15) 31%, transparent 32%),
    radial-gradient(circle at center, transparent 60%, rgba(0, 229, 255, 0.15) 61%, transparent 62%),
    linear-gradient(to right, transparent 49%, rgba(0, 229, 255, 0.2) 50%, transparent 51%),
    linear-gradient(to bottom, transparent 49%, rgba(0, 229, 255, 0.2) 50%, transparent 51%);
}

.radar-scanner {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 75%, rgba(0, 229, 255, 0.4) 100%);
  border-radius: 50%;
  animation: radarRotate 2.5s linear infinite;
}

.radar-blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  opacity: 0;
  animation: blipGlow 2.5s infinite;
}

.blip-1 { top: 35px; right: 40px; animation-delay: 0.8s; }
.blip-2 { bottom: 30px; left: 35px; animation-delay: 1.8s; }

@keyframes blipGlow {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(0.5); }
}

.radar-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  z-index: 2;
}

.waf-info-block {
  flex: 1;
}

.waf-vendor-pill {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.waf-info-block b {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.waf-info-block p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Signal List */
.signal-list {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.signal-row span {
  color: var(--text-muted);
}

.signal-row strong {
  font-family: 'DM Mono', monospace;
  color: var(--text-main);
}

.confidence-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 180px;
}

.confidence-fill {
  height: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  border-radius: var(--radius-pill);
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: width 0.8s ease;
}

.signatures-breakdown {
  padding: 0 28px 20px;
}

.sig-title {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.sig-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sig-list li {
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
}

.waf-actions-bar {
  padding: 20px 28px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  margin-top: auto;
}

/* WAF Directory Matrix */
.protocol-card {
  padding: 24px;
}

.count-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
}

.protocol-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 16px 0 20px;
}

.protocol-desc code {
  color: var(--cyan);
}

.waf-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.waf-chip {
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.waf-chip:hover {
  background: var(--panel-hover);
  border-color: var(--border-bright);
}

.waf-chip.active-detected {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.waf-chip span {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 4px;
}

.waf-chip b {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 1px;
}

.waf-chip small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-subtle);
}

.protocol-steps {
  display: flex;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.protocol-steps div {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.protocol-steps b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--cyan);
}

/* ==========================================================================
   ROOM 03: 檢測報告 (EVIDENCE STREAM)
   ========================================================================== */

.results-panel {
  padding: 0;
}

/* Summary Cards Banner */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--border);
}

.metric {
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  position: relative;
}

.metric:last-child {
  border-right: none;
}

.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.metric-score::before { background: var(--cyan); }
.metric-blocked::before { background: var(--emerald); }
.metric-confirmed::before { background: var(--rose); }
.metric-signal::before { background: var(--amber); }
.metric-passed::before { background: #64b5f6; }
.metric-review::before { background: var(--amber); }

.metric-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 4px;
}

.metric small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
}

.metric-score strong { color: var(--cyan); }
.metric-blocked strong { color: var(--emerald); }
.metric-confirmed strong { color: var(--rose); }
.metric-signal strong { color: var(--amber); }
.metric-passed strong { color: #90caf9; }
.metric-review strong { color: var(--amber); }

/* Evidence Toolbar */
.http-status-guide {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 22, 40, 0.72);
  color: var(--text-muted);
  font-size: 0.76rem;
}
.http-status-guide-title { color: var(--text-main); font-weight: 700; }
.http-status-key { display: inline-flex; align-items: center; gap: 4px; }
.http-status-key b { font-family: 'DM Mono', monospace; }
.http-status-key.status-2xx { color: #69f0ae; }
.http-status-key.status-3xx { color: #ffb300; }
.http-status-key.status-4xx { color: #ff8a80; }
.http-status-key.status-5xx { color: #ff5252; }
.http-status-guide-note { color: var(--text-subtle); }

.evidence-toolbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.status-filter-group {
  display: flex;
  gap: 6px;
}

.status-pill-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.status-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.status-pill-btn.active {
  background: var(--panel-hover);
  border-color: var(--cyan);
  color: var(--cyan);
}

.status-pill-confirmed.active {
  background: rgba(255, 82, 82, 0.15);
  border-color: var(--rose);
  color: var(--rose);
}

.status-pill-signal.active {
  background: rgba(255, 179, 0, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

.status-pill-blocked.active {
  background: rgba(0, 230, 118, 0.15);
  border-color: var(--emerald);
  color: var(--emerald);
}

.status-pill-passed.active {
  background: rgba(100, 181, 246, 0.15);
  border-color: #64b5f6;
  color: #90caf9;
}

.status-pill-review.active {
  background: rgba(255, 179, 0, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

.evidence-search-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.evidence-select {
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
}

.search-input-wrap {
  position: relative;
  min-width: 220px;
}

.search-glyph {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}

.search-input-wrap input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
}

.search-input-wrap input:focus {
  border-color: var(--cyan);
}

.export-btn-group {
  display: flex;
  gap: 8px;
}

/* Empty State */
.empty-state {
  padding: 64px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-glyph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 440px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Table Wrap */
.table-wrap {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.evidence-table th {
  background: var(--bg-soft);
  color: var(--text-subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.evidence-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.evidence-table tr:hover td {
  background: var(--panel-hover);
}

.verdict-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.verdict-tag.confirmed {
  background: rgba(255, 82, 82, 0.15);
  color: var(--rose);
  border: 1px solid rgba(255, 82, 82, 0.4);
}

.verdict-tag.signal {
  background: rgba(255, 179, 0, 0.15);
  color: var(--amber);
  border: 1px solid rgba(255, 179, 0, 0.4);
}

.verdict-tag.blocked {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.verdict-tag.passed {
  background: rgba(100, 181, 246, 0.14);
  color: #90caf9;
  border: 1px solid rgba(100, 181, 246, 0.35);
}

.verdict-tag.review {
  background: rgba(255, 179, 0, 0.15);
  color: var(--amber);
  border: 1px solid rgba(255, 179, 0, 0.35);
}

.method-tag {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  color: var(--text-main);
}

.code-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
}

.code-200 { color: var(--text-muted); font-weight: 700; }
.code-403, .code-406 { color: var(--emerald); font-weight: 700; }
.code-404 { color: var(--text-subtle); }
.code-500 { color: var(--amber); }

.latency-text {
  font-family: 'DM Mono', monospace;
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.payload-preview {
  font-family: 'DM Mono', monospace;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspect-btn {
  padding: 4px 10px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.inspect-btn:hover {
  background: var(--cyan);
  color: var(--text-inverse);
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* ==========================================================================
   ROOM 04: 虛擬補丁防禦艙 (VIRTUAL PATCHES)
   ========================================================================== */

.patch-room-container {
  display: flex;
  flex-direction: column;
}

.patch-editor-panel {
  padding: 0;
}

.patch-vendor-tabs {
  display: flex;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding: 6px 12px 0;
  gap: 4px;
}

.vendor-tab {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.vendor-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.vendor-tab.active {
  background: var(--panel-strong);
  color: var(--cyan);
  border-color: var(--border);
  border-bottom: 2px solid var(--cyan);
}

.patch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  flex-wrap: wrap;
  gap: 12px;
}

.patch-format-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.patch-format-label {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.format-pill {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.format-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.format-pill.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.4);
}

.patch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.patch-rule-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(179, 136, 255, 0.12);
  color: var(--purple);
  border: 1px solid rgba(179, 136, 255, 0.3);
}

/* Code Container */
.patch-code-container {
  padding: 0;
  background: #080d16;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.code-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
}

.code-lang-tag {
  color: var(--cyan);
}

.code-file-name {
  color: var(--text-subtle);
}

.quick-copy-code-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  transition: all var(--transition-fast);
}

.quick-copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.patch-code-block {
  padding: 20px 24px;
  margin: 0;
  max-height: 480px;
  overflow-y: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  background: #080d16;
  color: #d8e5f5;
  white-space: pre-wrap;
  word-break: break-all;
}

.patch-guide-box {
  display: flex;
  gap: 14px;
  padding: 18px 24px;
  background: rgba(179, 136, 255, 0.05);
  border-top: 1px solid rgba(179, 136, 255, 0.2);
}

.guide-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.guide-content strong {
  display: block;
  font-size: 0.88rem;
  color: var(--purple);
  margin-bottom: 4px;
}

.guide-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   ROOM 05: 專家操作指引 (FIELD NOTES)
   ========================================================================== */

.guidance-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.guidance-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.guidance-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-step-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--cyan-glow);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.card-category-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.guidance-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.guidance-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 18px;
}

.guidance-card code {
  color: var(--cyan);
}

.card-action {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tip-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan);
}

/* App Footer */
.app-footer {
  margin-top: auto;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-left strong {
  color: var(--text-main);
  letter-spacing: 0.06em;
}

/* ==========================================================================
   EVIDENCE ANALYSIS DRAWER & MODAL
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop[hidden] {
  display: none;
  opacity: 0;
}

.evidence-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 90vw;
  background: var(--bg-soft);
  border-left: 1px solid var(--border-bright);
  z-index: 201;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.evidence-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.drawer-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  display: block;
  margin-bottom: 4px;
}

.drawer-header h2 {
  font-size: 1.25rem;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.drawer-close-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-bright);
  color: var(--cyan);
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

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

.drawer-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.drawer-verdict-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 51, 102, 0.15);
  color: var(--rose);
  border: 1px solid rgba(255, 51, 102, 0.35);
}

.drawer-verdict-badge.confirmed {
  background: rgba(54, 217, 209, 0.15);
  color: #36d9d1;
  border-color: rgba(54, 217, 209, 0.4);
}

.drawer-verdict-badge.signal {
  background: rgba(255, 179, 0, 0.15);
  color: var(--amber);
  border-color: rgba(255, 179, 0, 0.4);
}

.drawer-verdict-badge.blocked {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald);
  border-color: rgba(0, 230, 118, 0.35);
}

.drawer-verdict-badge.allowed,
.drawer-verdict-badge.review {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-color: var(--border);
}

.drawer-meta-info {
  text-align: right;
}

.drawer-meta-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.drawer-meta-info strong {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
}

.drawer-meta-info small {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.copy-btn-mini {
  font-size: 0.72rem;
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.08);
}

.copy-btn-mini:hover {
  background: var(--cyan);
  color: var(--text-inverse);
}

.drawer-code, .drawer-code-url {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.drawer-curl-section {
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
}

.primary-copy-btn {
  padding: 4px 10px;
  background: var(--cyan);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.drawer-curl-code {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
  white-space: pre-wrap;
  word-break: break-all;
}

.remediation-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.drawer-footer-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg-soft);
  padding: 14px 0 20px 0;
  box-shadow: 0 -12px 24px var(--bg-soft);
  z-index: 10;
  margin-top: auto;
}

/* ==========================================================================
   FLOATING TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 12px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all var(--transition-normal);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  transform: translateX(100%);
  opacity: 0;
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast.success {
  border-left: 4px solid var(--emerald);
}
.toast.success .toast-icon { color: var(--emerald); }

.toast.error {
  border-left: 4px solid var(--rose);
}
.toast.error .toast-icon { color: var(--rose); }

.toast.info {
  border-left: 4px solid var(--cyan);
}
.toast.info .toast-icon { color: var(--cyan); }

.toast.warning {
  border-left: 4px solid var(--amber);
}
.toast.warning .toast-icon { color: var(--amber); }

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1080px) {
  .overview-dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-room {
    grid-template-columns: 1fr;
  }
  
  .hero-orbit {
    display: none;
  }
  
  .scan-workbench {
    grid-template-columns: 1fr;
  }
  
  .waf-room-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 950px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .topbar-center {
    display: none;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .breadcrumb .eyebrow,
  .breadcrumb .slash {
    display: none;
  }

  .breadcrumb #roomLabel {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 16px;
  }
  
  .tab-panel {
    padding: 16px;
  }
  
  .summary-cards {
    grid-template-columns: 1fr 1fr;
  }
  
  .waf-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .evidence-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .status-filter-group {
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  .evidence-search-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input-wrap {
    min-width: 100%;
  }
  
  .scan-wizard-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .wizard-submit-wrap {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Sidebar Scrim Backdrop */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 951px) {
  .sidebar-backdrop {
    display: none !important;
  }
}


/* Pipeline Responsive Flow */
@media (max-width: 880px) {
  .pipeline-steps-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
  }
  .pipeline-step {
    min-width: 100%;
    width: 100%;
  }
  .pipeline-arrow {
    display: none;
  }
}

/* Light Mode Contrast Enhancements */
body.light .primary-cta-glow {
  color: #ffffff;
  background: linear-gradient(135deg, #0077cc, #0091ea);
  box-shadow: 0 4px 14px rgba(0, 119, 204, 0.28);
}

body.light .primary-copy-btn,
body.light .copy-btn-mini:hover {
  color: #ffffff;
  background: #0077cc;
}

body.light .patch-code-container {
  background: #080d16;
  border-color: rgba(22, 49, 77, 0.2);
}

body.light .patch-code-block {
  background: #080d16;
  color: #d8e5f5;
}

body.light .code-header-bar {
  background: #0d1524;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}



/* Quick-scan information architecture: keep the common path compact and hide depth until requested. */
.strategy-section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.strategy-section-hint {
  color: var(--text-subtle);
  font-size: 0.72rem;
}

.strategy-quick-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.strategy-quick-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.quick-card-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--cyan);
  background: var(--cyan-glow);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
}

.strategy-quick-card strong,
.strategy-quick-card small {
  display: block;
}

.strategy-quick-card strong {
  color: var(--text-main);
  font-size: 0.86rem;
}

.strategy-quick-card small {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.compact-methods {
  grid-column: 2;
  margin-top: 6px;
}

.switch-card-compact {
  min-height: 0;
  align-items: center;
}

.advanced-scan-details {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

.advanced-scan-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.advanced-scan-details > summary::-webkit-details-marker {
  display: none;
}

.advanced-scan-details > summary::after {
  content: '＋';
  color: var(--cyan);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
}

.advanced-scan-details[open] > summary::after {
  content: '−';
}

.advanced-scan-details > summary small {
  flex: 1;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 400;
}

.advanced-scan-body {
  padding: 2px 16px 8px;
  border-top: 1px solid var(--border);
}

.advanced-scan-body .strategy-section {
  padding-top: 16px;
}

.advanced-scan-body .strategy-section + .strategy-section {
  border-top: 1px solid var(--border);
}

.scan-side-card-compact {
  padding: 16px;
}

@media (max-width: 1180px) {
  .strategy-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .strategy-quick-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .strategy-quick-grid {
    grid-template-columns: 1fr;
  }

  .strategy-quick-card {
    grid-column: auto;
  }

  .advanced-scan-details > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .advanced-scan-details > summary small {
    flex-basis: 100%;
    margin-left: 42px;
  }
}

/* VPN / Proxy Endpoint Assurance room */
.proxy-audit-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; }
.proxy-input-panel, .proxy-results-panel { padding: 22px; }
.proxy-safety-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 18px; border: 1px solid rgba(68, 224, 190, .22); border-radius: var(--radius-md); background: rgba(68, 224, 190, .06); color: var(--text-muted); font-size: .78rem; line-height: 1.5; }
.proxy-safety-note strong { color: var(--cyan); white-space: nowrap; }
.proxy-endpoint-input { width: 100%; box-sizing: border-box; resize: vertical; min-height: 170px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); color: var(--text-main); font: .78rem/1.55 'DM Mono', monospace; outline: none; }
.proxy-endpoint-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }
.proxy-options-row { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(0, 1.15fr); align-items: end; gap: 14px; margin-top: 16px; }
.compact-form-group { margin: 0; }
.proxy-check-card { display: flex; gap: 9px; align-items: flex-start; min-height: 50px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft); cursor: pointer; }
.proxy-check-card b, .proxy-check-card small { display: block; }
.proxy-check-card b { color: var(--text-main); font-size: .76rem; }
.proxy-check-card small { margin-top: 3px; color: var(--text-subtle); font-size: .68rem; }
.proxy-authorization-check { display: flex; align-items: center; gap: 9px; margin: 18px 0; color: var(--text-muted); font-size: .76rem; cursor: pointer; }
.proxy-risk-score { color: var(--text-subtle); font: 700 1rem 'DM Mono', monospace; }
.proxy-risk-score.risk-low { color: var(--cyan); }
.proxy-risk-score.risk-medium { color: #f7bd68; }
.proxy-risk-score.risk-high { color: #ff748d; }
.proxy-empty-state { display: grid; place-items: center; min-height: 180px; padding: 18px; color: var(--text-subtle); font-size: .8rem; line-height: 1.6; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.proxy-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.proxy-summary-grid > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); }
.proxy-summary-grid small, .proxy-summary-grid strong { display: block; }
.proxy-summary-grid small { color: var(--text-subtle); font-size: .66rem; }
.proxy-summary-grid strong { margin-top: 4px; color: var(--text-main); font-size: .74rem; overflow-wrap: anywhere; }
.proxy-mono { font-family: 'DM Mono', monospace; }
.proxy-findings-list { display: grid; gap: 9px; max-height: 620px; overflow: auto; }
.proxy-finding { padding: 13px 14px; border: 1px solid var(--border); border-left: 3px solid var(--text-subtle); border-radius: var(--radius-sm); background: var(--bg-soft); }
.proxy-finding.proxy-high, .proxy-finding.proxy-critical { border-left-color: #ff748d; }
.proxy-finding.proxy-medium { border-left-color: #f7bd68; }
.proxy-finding.proxy-low { border-left-color: #9bc8ff; }
.proxy-finding.proxy-info { border-left-color: var(--cyan); }
.proxy-finding-head { display: flex; justify-content: space-between; gap: 12px; }
.proxy-finding-head strong { color: var(--text-main); font-size: .78rem; }
.proxy-finding-head span { color: var(--text-subtle); white-space: nowrap; font: .66rem 'DM Mono', monospace; }
.proxy-finding p { margin: 8px 0 7px; color: var(--text-muted); font-size: .74rem; line-height: 1.5; }
.proxy-finding small { color: var(--text-subtle); font-size: .7rem; line-height: 1.45; }
@media (max-width: 980px) { .proxy-audit-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .proxy-options-row, .proxy-summary-grid { grid-template-columns: 1fr; } .proxy-safety-note { flex-direction: column; } .proxy-finding-head { flex-direction: column; gap: 4px; } }

/* Guided scan flow: keep the fast path visible and specialist settings discoverable. */
.target-url-hint {
  display: block;
  margin: 10px 2px 0;
  color: var(--text-subtle);
  font-size: .75rem;
  line-height: 1.45;
}

.target-url-hint[data-state="valid"] { color: var(--green, #00e676); }
.target-url-hint[data-state="invalid"] { color: var(--amber, #ffc857); }
.url-input-wrapper input[aria-invalid="true"] {
  border-color: var(--amber, #ffc857);
  box-shadow: 0 0 0 3px rgba(255, 200, 87, .1);
}

.scan-flow-status {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.scan-flow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  color: var(--text-muted);
}

.scan-flow-number {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-subtle);
  font: 700 .68rem 'DM Mono', monospace;
}

.scan-flow-item b,
.scan-flow-item small { display: block; }
.scan-flow-item b { color: var(--text-main); font-size: .76rem; }
.scan-flow-item small { margin-top: 2px; color: var(--text-subtle); font-size: .68rem; }
.scan-flow-item.complete .scan-flow-number {
  border-color: var(--green, #00e676);
  background: rgba(0, 230, 118, .12);
  color: var(--green, #00e676);
}
.scan-flow-item.complete small { color: var(--green, #00e676); }

.scan-wizard-footer .wizard-submit-wrap {
  margin-left: auto;
  justify-content: flex-end;
}
.scan-wizard-footer #scanPrev { min-width: 108px; }
.scan-wizard-footer #scanBtn { min-width: 220px; justify-content: center; }

@media (max-width: 640px) {
  .scan-wizard-footer .wizard-submit-wrap { width: 100%; margin-left: 0; }
  .scan-wizard-footer #scanPrev,
  .scan-wizard-footer #scanBtn { width: 100%; justify-content: center; }
  .scan-flow-status { grid-template-columns: 1fr; }
}

/* Unified test workbench */
.test-mode-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 18px; padding:8px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--bg-soft); }
.test-mode-tab { display:flex; align-items:center; gap:11px; min-width:0; padding:12px 14px; border:1px solid transparent; border-radius:var(--radius-md); color:var(--text-muted); text-align:left; transition:all var(--transition-fast); }
.test-mode-tab:hover { background:rgba(255,255,255,.04); color:var(--text-main); }
.test-mode-tab.active { border-color:rgba(0,229,255,.38); background:rgba(0,229,255,.08); color:var(--cyan); box-shadow:0 0 18px rgba(0,229,255,.08); }
.test-mode-index { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; flex:0 0 28px; border:1px solid var(--border-bright); border-radius:8px; font:700 .68rem 'DM Mono',monospace; }
.test-mode-tab.active .test-mode-index { background:var(--cyan); color:var(--text-inverse); border-color:var(--cyan); }
.test-mode-tab b,.test-mode-tab small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.test-mode-tab b { font-size:.82rem; }
.test-mode-tab small { margin-top:3px; color:var(--text-subtle); font-size:.66rem; }
.test-mode-tab.active small { color:rgba(0,229,255,.78); }
.test-mode-panel { display:none; }
.test-mode-panel.active { display:block; }
.test-mode-heading { display:flex; align-items:flex-start; margin:4px 0 16px; }
.test-mode-heading h2 { margin:4px 0; font-size:1.25rem; }
.test-mode-heading p { margin:0; color:var(--text-muted); font-size:.82rem; line-height:1.5; }
.mode-target-context { display:flex; align-items:center; gap:10px; margin:0 0 16px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-soft); font-size:.74rem; }
.mode-target-context span { color:var(--text-subtle); }
.mode-target-context strong { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-main); font-family:'DM Mono',monospace; }
@media (max-width:760px) { .test-mode-switch { grid-template-columns:1fr; } .mode-target-context { align-items:flex-start; flex-wrap:wrap; } .mode-target-context strong { flex-basis:calc(100% - 110px); } }

/* Attack surface recon chamber */
.recon-grid { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); gap:16px; }
.recon-input-panel, .recon-results-panel { padding:22px; }
.recon-checks { display:grid; gap:10px; margin:18px 0; }
.recon-summary { color:var(--text-muted); line-height:1.55; margin-bottom:14px; }
.recon-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.recon-summary-grid > div { display:grid; gap:4px; padding:12px; border:1px solid var(--border); border-radius:var(--radius-md); background:rgba(0,0,0,.12); }
.recon-summary-grid small, .catalog-entry span { color:var(--text-subtle); font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; }
.recon-summary-grid strong { color:var(--text-main); overflow-wrap:anywhere; }
.recon-limitations { color:var(--text-subtle); font-size:.78rem; line-height:1.5; }
.recon-catalog-box { margin-top:18px; border-top:1px solid var(--border); padding-top:18px; }
.catalog-search { width:100%; margin:10px 0 12px; }
.catalog-entry-list { display:grid; gap:8px; max-height:340px; overflow:auto; }
.catalog-entry { display:grid; gap:5px; padding:11px 12px; border:1px solid var(--border); border-radius:var(--radius-md); background:rgba(0,0,0,.1); }
.catalog-entry > div { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.catalog-entry strong { color:var(--text-main); font-size:.86rem; }
.catalog-entry p { color:var(--text-muted); font-size:.78rem; line-height:1.45; margin:0; }
.catalog-entry a { color:var(--cyan); font-size:.75rem; text-decoration:none; }
.catalog-entry a:hover { text-decoration:underline; }
@media (max-width:900px) { .recon-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .recon-summary-grid { grid-template-columns:1fr; } .catalog-entry > div { flex-direction:column; gap:4px; } }

/* AI evidence analysis */
.ai-cta { border-color: var(--border-bright); color: var(--text-main); background: var(--bg-soft); box-shadow: none; }
.ai-cta:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 229, 255, 0.08); box-shadow: 0 0 14px var(--cyan-glow); }
.ai-analysis-panel { margin:18px 0; padding:20px; border:1px solid rgba(179,136,255,.35); border-radius:var(--radius-lg); background:linear-gradient(135deg, rgba(28,23,56,.8), rgba(10,22,40,.86)); box-shadow:0 0 28px rgba(179,136,255,.11); }
.ai-analysis-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.ai-analysis-header h2 { margin:4px 0 6px; }
.ai-analysis-header p { color:var(--text-muted); margin:0; max-width:760px; line-height:1.5; }
.ai-remote-consent { display:flex; gap:10px; align-items:flex-start; margin:16px 0; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-md); background:rgba(0,0,0,.12); }
.ai-remote-consent input { margin-top:3px; }
.ai-remote-consent span { display:grid; gap:4px; }
.ai-remote-consent small { color:var(--text-subtle); line-height:1.4; }
.ai-analysis-summary { margin:12px 0 16px; }
.ai-analysis-summary-head { display:grid; gap:6px; padding:14px; border-left:3px solid var(--purple); border-radius:var(--radius-md); background:rgba(179,136,255,.1); }
.ai-analysis-summary-head strong { color:#eadcff; font-size:1.02rem; }
.ai-analysis-summary-head span { color:var(--text-main); line-height:1.55; }
.ai-analysis-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.ai-analysis-columns h3 { margin:0 0 8px; font-size:.92rem; color:var(--text-main); }
.ai-analysis-list { display:grid; gap:8px; }
.ai-analysis-item { padding:11px 12px; border:1px solid var(--border); border-radius:var(--radius-md); background:rgba(0,0,0,.12); }
.ai-analysis-item > div { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.ai-analysis-item strong { color:var(--text-main); font-size:.84rem; }
.ai-analysis-item span { color:var(--purple); font-size:.72rem; white-space:nowrap; }
.ai-analysis-item p, .ai-analysis-notes p { margin:6px 0 0; color:var(--text-muted); font-size:.8rem; line-height:1.5; }
.ai-analysis-notes { margin-top:14px; color:var(--text-muted); }
.ai-analysis-notes summary { cursor:pointer; color:var(--purple); }
.ai-empty { color:var(--text-subtle); padding:12px; border:1px dashed var(--border); border-radius:var(--radius-md); }
@media (max-width:760px) { .ai-analysis-header, .ai-analysis-item > div { flex-direction:column; } .ai-analysis-columns { grid-template-columns:1fr; } .ai-analysis-item span { white-space:normal; } }
.ai-verification-block { margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
.ai-verification-block h3 { margin:0 0 6px; font-size:.9rem; }
.ai-verification-hint { margin:0 0 10px; color:var(--text-muted); font-size:.78rem; line-height:1.5; }
.drawer-verification-section { border-top:1px solid var(--border); padding-top:16px; }
#drawerVerificationResult strong { color:var(--cyan); }
#drawerVerificationResult small { color:var(--text-subtle); }



.scan-egress-row { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: end; }
.scan-egress-field { display: grid; gap: 7px; color: var(--text-muted); font-size: .78rem; }
.scan-egress-field select { width: 100%; }
.scan-egress-note { color: var(--text-subtle); font-size: .76rem; line-height: 1.5; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(0,0,0,.12); }
@media (max-width: 720px) { .scan-egress-row { grid-template-columns: 1fr; } }

.sidebar-admin-link { padding: 10px 0 2px; border-top: 1px solid var(--border); }

/* ==========================================================================
   LIVE SCAN EXECUTION MONITOR MODAL & HUD
   ========================================================================== */

.scan-live-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.scan-live-modal[hidden] {
  display: none !important;
}

.scan-live-dialog {
  background: var(--panel-strong);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px var(--cyan-glow);
  width: 100%;
  max-width: 720px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.scan-live-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.scan-live-branding {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.live-dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  margin-top: 6px;
  animation: liveDotBlink 1.2s infinite ease-in-out;
}

@keyframes liveDotBlink {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); box-shadow: 0 0 14px var(--cyan); }
}

.scan-live-head h3 {
  margin: 0;
  font: 700 1.15rem/1.3 'Space Grotesk', sans-serif;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.scan-live-head p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.scan-live-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(var(--cyan-rgb), 0.12);
  border: 1px solid rgba(var(--cyan-rgb), 0.35);
  color: var(--cyan);
  white-space: nowrap;
}

.scan-live-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.scan-live-stat {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scan-live-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scan-live-stat strong {
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-live-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.scan-live-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  box-shadow: 0 0 10px var(--cyan-glow);
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

.scan-live-terminal {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  height: 240px;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.scan-live-terminal .terminal-line {
  margin-bottom: 3px;
  word-break: break-all;
}

.scan-live-terminal .terminal-line.info { color: var(--cyan); }
.scan-live-terminal .terminal-line.net { color: #80d8ff; }
.scan-live-terminal .terminal-line.probe { color: #ffd54f; }
.scan-live-terminal .terminal-line.req { color: var(--text-main); }
.scan-live-terminal .terminal-line.blocked { color: #ff5252; }
.scan-live-terminal .terminal-line.passed { color: #69f0ae; }
.scan-live-terminal .terminal-line.success { color: var(--emerald); font-weight: 600; }
.scan-live-terminal .terminal-line.error { color: var(--rose); font-weight: 600; }

.scan-live-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.scan-live-footer-note {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.scan-live-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scan-live-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.scan-live-close-btn:hover {
  color: var(--rose);
  background: rgba(255, 82, 82, 0.12);
}

.scan-live-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consent-terms { margin-top: 7px; color: var(--text-subtle); font-size: .76rem; }
.terms-link { border: 0; padding: 0; color: var(--cyan); background: transparent; text-decoration: underline; cursor: pointer; font: inherit; }
.terms-link:hover { color: var(--text-main); }
.terms-modal { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3, 7, 16, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.terms-modal[hidden] { display: none !important; }
.terms-dialog { width: min(680px, 100%); max-height: min(720px, 90vh); overflow-y: auto; padding: 24px; border: 1px solid var(--border-bright); border-radius: var(--radius-lg); background: var(--panel-strong); box-shadow: 0 16px 48px rgba(0,0,0,.75), 0 0 24px var(--cyan-glow); }
.terms-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 14px; }
.terms-header h2 { margin: 4px 0 0; font-size: 1.18rem; }
.modal-close-btn { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; color: var(--text-muted); background: rgba(255,255,255,.04); font-size: 1.25rem; cursor: pointer; }
.modal-close-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.terms-body { padding: 18px 0 8px; color: var(--text-muted); line-height: 1.7; font-size: .88rem; }
.terms-body p { margin: 0 0 12px; }
.terms-body ul { margin: 10px 0 16px; padding-left: 22px; }
.terms-body li { margin: 7px 0; }
.terms-note { padding: 10px 12px; border-left: 3px solid var(--cyan); background: rgba(0,229,255,.06); color: var(--text-main); }
.terms-footer { display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
body.modal-open { overflow: hidden; }

.scan-live-progress-bar.indeterminate { animation: scanWaiting 1.5s ease-in-out infinite; }
@keyframes scanWaiting { 0%,100% { opacity: .3; } 50% { opacity: .9; } }
.scan-completion-note { padding: 12px 24px; color: var(--amber); border-bottom: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .scan-live-progress-bar.indeterminate { animation: none; opacity: .6; } }

.results-run-status { margin: 0 36px 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-muted); background: rgba(10,22,40,.7); font-size: .78rem; }

.technical-evidence-section summary { cursor: pointer; list-style: none; }
.technical-evidence-section summary::-webkit-details-marker { display:none; }
.technical-evidence-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:12px 0; }
.technical-evidence-grid div { padding:9px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:rgba(0,0,0,.12); min-width:0; }
.technical-evidence-grid span, .technical-evidence-grid code { display:block; }
.technical-evidence-grid span { color:var(--text-subtle); font-size:.68rem; margin-bottom:4px; }
.technical-evidence-grid code { color:var(--cyan); font-size:.72rem; overflow-wrap:anywhere; }
@media (max-width:560px) { .technical-evidence-grid { grid-template-columns:1fr; } }

.scan-timeout-policy { margin:16px 0; padding:14px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-soft); }
.scan-timeout-policy small { display:block; margin-top:8px; color:var(--text-muted); line-height:1.5; }
#scanLiveElapsedText { display:block; margin-top:5px; color:var(--text-muted); font-size:.7rem; }
