/* ═══════════════════════════════════════════════════════
   面向道路病害的双门控协同感知检测系统 — 样式表
   科技风 · 暗色主题
═══════════════════════════════════════════════════════ */

/* ── CSS 变量 ─────────────────────────────────── */
:root {
  --bg-base:     #030b18;
  --bg-panel:    #071326;
  --bg-card:     #0b1e35;
  --bg-card2:    #0f2645;
  --border:      #1a3a5c;
  --border-glow: #0ea5e9;
  --cyan:        #00d4ff;
  --cyan-dim:    #0ea5e9;
  --blue:        #3b82f6;
  --green:       #22c55e;
  --orange:      #f97316;
  --purple:      #a855f7;
  --red:         #ef4444;
  --yellow:      #eab308;
  --text-primary:   #e2f0ff;
  --text-secondary: #7ba9cc;
  --text-muted:     #3d6080;
  --radius:  8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --glow: 0 0 20px rgba(0,212,255,.15);
}

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 粒子背景 ─────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
}

/* ── Header ───────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(7, 19, 38, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 30px rgba(0,212,255,.08);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.logo-box {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 18px rgba(0,212,255,.4);
}

.title-en {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--cyan-dim);
  text-transform: uppercase;
}
.title-zh {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, #e2f0ff 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 20px; }

.status-indicator {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  font-size: 12px;
  color: var(--green);
}

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.dot-green { color: var(--green); animation: pulse-green 2s infinite; }
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.header-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.header-meta span { display: flex; align-items: center; gap: 5px; }
.header-meta i { color: var(--cyan-dim); }

.clock {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 2px;
}

/* ── Nav Tabs ─────────────────────────────────── */
.nav-tabs {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 16px 32px 0;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.tab-btn {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  transition: color .25s;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-btn i { font-size: 15px; }

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--cyan);
  background: rgba(0,212,255,.06);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  border-radius: 2px;
}

/* ── Main Content ─────────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
  min-height: calc(100vh - 180px);
}

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

/* ── Panel Header ────────────────────────────── */
.panel-header {
  margin-bottom: 24px;
  padding-left: 14px;
  border-left: 3px solid var(--cyan);
}
.panel-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.panel-header h2 i { color: var(--cyan); }
.panel-header p  { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ── Upload Zone ─────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: rgba(11,30,53,.5);
  margin-bottom: 28px;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--cyan-dim);
  background: rgba(14,165,233,.06);
  box-shadow: var(--glow);
}

.upload-icon {
  font-size: 40px;
  color: var(--cyan-dim);
  margin-bottom: 12px;
  display: block;
}
.upload-title {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.upload-sub { font-size: 12px; color: var(--text-muted); }
.link-text {
  color: var(--cyan);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Dual View ───────────────────────────────── */
.dual-view {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0;
  margin-bottom: 28px;
  align-items: start;
}

.view-divider {
  display: flex; align-items: center; justify-content: center;
  padding-top: 60px;
  color: var(--cyan-dim);
  font-size: 18px;
}

.view-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .3s;
}
.view-card:hover { box-shadow: var(--glow), var(--shadow); }

.view-card.full-width {
  grid-column: 1 / -1;
}

.view-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.view-card-header i { color: var(--cyan-dim); }

.view-card-body {
  position: relative;
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  background: rgba(3,11,24,.4);
}

.view-card-body img {
  max-width: 100%; max-height: 420px;
  border-radius: 4px;
  display: block;
  object-fit: contain;
}

.video-body { padding: 0; background: #000; }
.video-body video {
  width: 100%; max-height: 480px;
  display: block;
}

/* ── Badges ──────────────────────────────────── */
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
  margin-left: auto;
}
.badge-blue  { background: rgba(59,130,246,.2); color: var(--blue);  border: 1px solid rgba(59,130,246,.4); }
.badge-green { background: rgba(34,197,94,.2);  color: var(--green); border: 1px solid rgba(34,197,94,.4); }

/* ── Loading ─────────────────────────────────── */
.loading-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(3,11,24,.8);
  z-index: 10;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats Grid ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.stats-panel.span-2 { grid-column: 1 / -1; }

.stats-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stats-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan-dim);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item { text-align: center; }
.stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chart-wrap {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
}
.chart-wrap canvas { max-height: 180px; }

/* ── Detections Table ────────────────────────── */
.detections-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.detections-table-wrap::-webkit-scrollbar { width: 4px; }
.detections-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.detections-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.detections-table th {
  background: var(--bg-card2);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 12px;
  text-align: left;
  position: sticky; top: 0;
  border-bottom: 1px solid var(--border);
}
.detections-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(26,58,92,.4);
  color: var(--text-primary);
}
.detections-table tr:hover td { background: rgba(14,165,233,.04); }
.detections-table tr:last-child td { border-bottom: none; }

/* ── Progress Bar ────────────────────────────── */
.progress-wrap, .batch-progress-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.progress-header {
  display: flex; justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.progress-bar-bg {
  height: 6px;
  background: var(--bg-base);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  border-radius: 3px;
  transition: width .3s;
  box-shadow: 0 0 8px rgba(0,212,255,.5);
}

.batch-stats-row {
  display: flex; gap: 32px;
  margin-top: 16px;
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  cursor: pointer;
  transition: opacity .2s, box-shadow .2s;
  box-shadow: 0 0 16px rgba(14,165,233,.3);
}
.btn-primary:hover { opacity: .88; box-shadow: 0 0 24px rgba(14,165,233,.5); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: rgba(239,68,68,.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  cursor: pointer;
  transition: all .2s;
}
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-danger:disabled { opacity: .4; cursor: not-allowed; }

.btn-small {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  margin-left: auto;
}
.btn-cyan {
  background: rgba(0,212,255,.1);
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,.3);
  transition: all .2s;
}
.btn-cyan:hover { background: rgba(0,212,255,.2); }

.btn-sm { padding: 7px 16px; font-size: 13px; }

.btn-download {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  padding: 12px;
}

/* ── Camera View ─────────────────────────────── */
.camera-controls {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.cam-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}

.camera-view-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.camera-frame {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow);
}

.cam-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  color: var(--text-muted);
}
.cam-placeholder i { font-size: 48px; }
.cam-placeholder p  { font-size: 14px; }

#cam-feed {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Camera overlay UI */
.cam-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
}
.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,.6), transparent);
  animation: scan 3s linear infinite;
}
@keyframes scan {
  0%   { top: 0%; opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: .7;
}
.corner.tl { top: 12px; left: 12px;  border-width: 2px 0 0 2px; }
.corner.tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 12px; left: 12px;  border-width: 0 0 2px 2px; }
.corner.br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

/* Camera Sidebar */
.cam-sidebar { display: flex; flex-direction: column; gap: 14px; }

.cam-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.cam-info-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.cam-info-item {
  display: flex; justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(26,58,92,.3);
}
.cam-info-item:last-child { border-bottom: none; }
.cam-info-label { color: var(--text-muted); }
.cam-info-val   { color: var(--cyan); font-family: 'Orbitron', sans-serif; font-size: 11px; }

.defect-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.cam-guide {
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  counter-reset: guide;
}
.cam-guide li {
  counter-increment: guide;
  padding-left: 22px;
  position: relative;
  font-size: 12px;
  color: var(--text-secondary);
}
.cam-guide li::before {
  content: counter(guide);
  position: absolute;
  left: 0;
  width: 16px; height: 16px;
  background: var(--cyan-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-base);
  line-height: 16px;
  text-align: center;
}

/* ── Batch File List ──────────────────────────── */
.file-list-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.file-list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.file-preview-grid::-webkit-scrollbar { width: 4px; }
.file-preview-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.file-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb-icon { color: var(--text-muted); font-size: 22px; }

/* ── Video Result ─────────────────────────────── */
.video-result-wrap { margin-bottom: 24px; }

/* ── Toast ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: rgba(34,197,94,.5); color: var(--green); }
.toast.error   { border-color: rgba(239,68,68,.5); color: var(--red);   }

/* ── Footer ──────────────────────────────────── */
.footer {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 32px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.footer-beian {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.footer-beian-number {
  color: var(--text-secondary);
  letter-spacing: .3px;
}

.footer-beian-link {
  color: var(--cyan-dim);
  text-decoration: none;
  transition: color .2s ease;
}

.footer-beian-link:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Confidence Badge ────────────────────────── */
.conf-bar {
  display: inline-block;
  width: 60px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 6px;
  overflow: hidden;
}
.conf-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--green));
  border-radius: 2px;
}

/* ══════════════════════════════════════════════
   ★ KPI 卡片行
══════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow .3s, border-color .3s;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.kpi-card:hover { box-shadow: var(--glow); }

.kpi-blue::before   { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.kpi-cyan::before   { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.kpi-green::before  { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.kpi-purple::before { background: linear-gradient(90deg, transparent, var(--purple), transparent); }
.kpi-orange::before { background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.kpi-red::before    { background: linear-gradient(90deg, transparent, var(--red), transparent); }

.kpi-icon {
  font-size: 18px;
  margin-bottom: 8px;
  opacity: .7;
}
.kpi-blue .kpi-icon   { color: var(--blue);   }
.kpi-cyan .kpi-icon   { color: var(--cyan);   }
.kpi-green .kpi-icon  { color: var(--green);  }
.kpi-purple .kpi-icon { color: var(--purple); }
.kpi-orange .kpi-icon { color: var(--orange); }
.kpi-red .kpi-icon    { color: var(--red);    }

.kpi-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.kpi-blue .kpi-val   { color: var(--blue);   }
.kpi-cyan .kpi-val   { color: var(--cyan);   }
.kpi-green .kpi-val  { color: var(--green);  }
.kpi-purple .kpi-val { color: var(--purple); }
.kpi-orange .kpi-val { color: var(--orange); }
.kpi-red .kpi-val    { color: var(--red);    }

.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   ★ 3列统计网格
══════════════════════════════════════════════ */
.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.stats-grid-3 .span-2 { grid-column: span 2; }

/* ══════════════════════════════════════════════
   ★ 参数表
══════════════════════════════════════════════ */
.param-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(26,58,92,.3);
  font-size: 12px;
}
.param-row:last-child { border-bottom: none; }
.param-k { color: var(--text-muted); }
.param-v { color: var(--text-primary); font-family: 'Orbitron', sans-serif; font-size: 11px; }
.param-v.accent { color: var(--cyan); }

.header-sub {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ══════════════════════════════════════════════
   ★ 严重程度徽章和详情
══════════════════════════════════════════════ */
.sev-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.sev-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sev-low  { background: rgba(34,197,94,.15);  color: var(--green);  border: 1px solid rgba(34,197,94,.3); }
.sev-med  { background: rgba(234,179,8,.15);  color: var(--yellow); border: 1px solid rgba(234,179,8,.3); }
.sev-high { background: rgba(249,115,22,.15); color: var(--orange); border: 1px solid rgba(249,115,22,.3);}
.sev-crit { background: rgba(239,68,68,.15);  color: var(--red);    border: 1px solid rgba(239,68,68,.3); }

.sev-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.sev-item {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.sev-item-label { color: var(--text-secondary); }
.sev-bar-bg { height: 6px; background: var(--bg-base); border-radius: 3px; overflow: hidden; }
.sev-bar-fill { height: 100%; border-radius: 3px; transition: width .5s; }
.sev-item-count { color: var(--text-primary); font-family: 'Orbitron', sans-serif; font-size: 11px; text-align: right; }

/* 风险等级颜色 */
.risk-none { color: var(--text-muted); }
.risk-low  { color: var(--green);  }
.risk-med  { color: var(--yellow); }
.risk-high { color: var(--orange); }
.risk-crit { color: var(--red); animation: blink-risk 1.5s infinite; }
@keyframes blink-risk { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ══════════════════════════════════════════════
   ★ 检测明细表升级
══════════════════════════════════════════════ */
.detections-table th:nth-child(n+6),
.detections-table td:nth-child(n+6) {
  font-family: monospace;
  font-size: 11px;
}

/* ══════════════════════════════════════════════
   ★ 视频帧播放器
══════════════════════════════════════════════ */
.vid-live-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--cyan-dim);
  display: flex; align-items: center; gap: 6px;
}

.vid-frame-body {
  padding: 0;
  background: #000;
  min-height: 300px;
  position: relative;
}
.vid-frame-body img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}
.vid-frame-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}
.vid-frame-placeholder i { font-size: 40px; }

/* 播放控制栏 */
.vid-ctrl-bar {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
  flex: 1;
}
.vid-ctrl-btn {
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.3);
  color: var(--cyan);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background .2s;
  flex-shrink: 0;
}
.vid-ctrl-btn:hover { background: rgba(0,212,255,.25); }

.vid-frame-info {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.vid-fps-info {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.vid-seek-bar {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vid-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,212,255,.6);
}
.vid-seek-bar::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--cyan) 0%, var(--border) 0%);
  height: 4px; border-radius: 2px;
}

/* ── Responsive 补充 ──────────────────────── */
@media (max-width: 900px) {
  .header { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .title-zh { font-size: 13px; }
  .header-meta { display: none; }
  .main-content { padding: 16px; }
  .dual-view { grid-template-columns: 1fr; }
  .view-divider { padding: 0; transform: rotate(90deg); margin: 0 auto; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .camera-view-wrap { grid-template-columns: 1fr; }
  .nav-tabs { gap: 0; padding: 8px 8px 0; }
  .tab-btn { padding: 10px 14px; font-size: 12px; }
  .footer { padding: 14px 16px 18px; }
  .footer-meta { flex-direction: column; gap: 2px; }
  .footer-beian-link { font-size: 10px; }
}
