/* ═══════════════════════════════════════════════════════════
   Design System Tokens
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colors: Dark, high-end */
  --bg0: #0a0b0f;              /* Near-black with blue hint */
  --bg1: #13141a;              /* Elevated surface */
  --bg2: #1a1c24;              /* Card background */
  --stroke: #2a2d3a;           /* Hairline borders */

  --text0: #f5f5f7;            /* Primary text */
  --text1: #a0a3b5;            /* Secondary text */
  --text2: #6b6e7e;            /* Tertiary text */

  --accent: #4dd4e8;           /* Icy cyan accent */
  --accent-dim: rgba(77, 212, 232, 0.15);

  --success: #34d399;
  --warning: #fbbf24;
  --critical: #f87171;

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, monospace;

  /* Spacing (8px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Elevation */
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lifted: 0 4px 12px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════════ */

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

body {
  font-family: var(--font-system);
  background: var(--bg0);
  color: var(--text0);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  display: flex;
  height: 100vh;
}

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

/* ═══════════════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════════════ */

.sidebar {
  width: 240px;
  background: var(--bg1);
  border-right: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  transition: width 0.3s var(--ease-out);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  padding: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--stroke);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--accent);
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text1);
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  background: var(--bg2);
  color: var(--text0);
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--text1);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  position: relative;
}

.nav-item:hover {
  background: var(--bg2);
  color: var(--text0);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  pointer-events: none;
}

.sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--stroke);
}

.data-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  color: var(--text2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  color: var(--text0);
  font-weight: 500;
}

.status-latency {
  margin-left: auto;
  color: var(--success);
}

/* ═══════════════════════════════════════════════════════════
   Main Container
   ═══════════════════════════════════════════════════════════ */

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   Command Bar
   ═══════════════════════════════════════════════════════════ */

.command-bar {
  height: 60px;
  background: var(--bg1);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  gap: var(--sp-4);
  position: sticky;
  top: 0;
  z-index: 90;
}

.command-bar-left,
.command-bar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.time-range-picker {
  display: flex;
  gap: var(--sp-1);
  background: var(--bg0);
  padding: var(--sp-1);
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
}

.time-btn {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text1);
  transition: all 0.2s;
}

.time-btn:hover {
  background: var(--bg2);
  color: var(--text0);
}

.time-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.filter-chips {
  display: flex;
  gap: var(--sp-2);
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  font-size: 11px;
  color: var(--text0);
}

.chip-close {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: color 0.2s;
}

.chip-close:hover {
  color: var(--text0);
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg0);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  min-width: 240px;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-box svg {
  color: var(--text2);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text0);
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--text2);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text1);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--bg2);
  color: var(--text0);
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text1);
  transition: all 0.2s;
}

.icon-btn-sm:hover {
  background: var(--bg2);
  color: var(--text0);
}

/* ═══════════════════════════════════════════════════════════
   Canvas (Page Container)
   ═══════════════════════════════════════════════════════════ */

.canvas {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.page {
  display: none;
  animation: fadeIn 0.3s var(--ease-out);
}

.page.active {
  display: block;
}

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

.page-header {
  margin-bottom: var(--sp-6);
}

.page-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ═══════════════════════════════════════════════════════════
   Metrics Grid
   ═══════════════════════════════════════════════════════════ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.metric-card {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: all 0.2s var(--ease-out);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted);
  border-color: var(--accent);
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
  margin-bottom: var(--sp-2);
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.metric-value.accent {
  color: var(--accent);
}

.metric-value.success {
  color: var(--success);
}

.metric-value.warning {
  color: var(--warning);
}

.metric-change {
  font-size: 11px;
  color: var(--text2);
}

.metric-change.positive {
  color: var(--success);
}

/* ═══════════════════════════════════════════════════════════
   Charts Grid
   ═══════════════════════════════════════════════════════════ */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.chart-card {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s var(--ease-out);
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted);
}

.chart-card.span-2 {
  grid-column: span 2;
}

.chart-header {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-header h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-explain {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-explain:hover {
  background: var(--accent);
  color: var(--bg0);
  transform: translateY(-1px);
}

.chart-body {
  padding: var(--sp-5);
  position: relative;
  min-height: 200px;
}

.chart-body canvas {
  max-height: 240px;
}

/* Reason List */
.reason-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.reason-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg1);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.reason-item:hover {
  background: var(--bg0);
  transform: translateX(2px);
}

.reason-bar {
  flex: 1;
  height: 4px;
  background: var(--bg0);
  border-radius: 2px;
  overflow: hidden;
}

.reason-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s var(--ease-out);
}

.reason-label {
  font-size: 12px;
  color: var(--text0);
  min-width: 120px;
}

.reason-count {
  font-size: 11px;
  color: var(--text2);
  min-width: 40px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   Texture Grid
   ═══════════════════════════════════════════════════════════ */

.texture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.texture-card {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.texture-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted);
  border-color: var(--accent);
}

.texture-header {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.texture-header h4 {
  font-size: 12px;
  font-weight: 600;
}

.texture-change {
  font-size: 11px;
  font-weight: 600;
  padding: 2px var(--sp-2);
  border-radius: 4px;
}

.texture-change.positive {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.texture-change.neutral {
  background: var(--bg1);
  color: var(--text2);
}

.texture-change.warning {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.texture-change.critical {
  background: rgba(248, 113, 113, 0.15);
  color: var(--critical);
}

.texture-body {
  padding: var(--sp-4);
  height: 120px;
}

.texture-body canvas {
  max-height: 100%;
}

/* ═══════════════════════════════════════════════════════════
   Live Feed
   ═══════════════════════════════════════════════════════════ */

.live-feed-card {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feed-header {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.feed-controls {
  display: flex;
  gap: var(--sp-2);
}

.feed-body {
  max-height: 400px;
  overflow-y: auto;
}

.feed-item {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: all 0.2s;
  cursor: pointer;
  animation: slideIn 0.3s var(--ease-out);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feed-item:hover {
  background: var(--bg1);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-risk-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
}

.feed-risk-badge.high {
  background: rgba(248, 113, 113, 0.15);
  color: var(--critical);
}

.feed-content {
  flex: 1;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 11px;
  color: var(--text2);
  margin-bottom: var(--sp-1);
}

.feed-ip {
  font-family: var(--font-mono);
  color: var(--text1);
}

.feed-reasons {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.feed-reason-pill {
  padding: 2px var(--sp-2);
  background: var(--bg0);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  font-size: 10px;
  color: var(--text1);
}

.feed-time {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   Investigation Drawer
   ═══════════════════════════════════════════════════════════ */

.drawer {
  width: 480px;
  background: var(--bg1);
  border-left: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--spring);
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 200;
}

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

.drawer.pinned {
  position: relative;
  transform: translateX(0);
}

.drawer-header {
  padding: var(--sp-5);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 14px;
  font-weight: 600;
}

.drawer-icon {
  font-size: 16px;
}

.drawer-actions {
  display: flex;
  gap: var(--sp-2);
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--stroke);
  padding: 0 var(--sp-5);
}

.drawer-tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: 12px;
  font-weight: 500;
  color: var(--text1);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.drawer-tab:hover {
  color: var(--text0);
}

.drawer-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.drawer-content {
  display: none;
}

.drawer-content.active {
  display: block;
}

/* Risk Dial */
.risk-dial {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--sp-6);
  position: relative;
}

.dial-svg {
  width: 100%;
  height: 100%;
}

.dial-progress {
  transition: stroke-dashoffset 0.8s var(--ease-out);
}

.dial-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.dial-score {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}

.dial-label {
  font-size: 11px;
  color: var(--text2);
  margin-top: var(--sp-2);
}

/* Confidence Ribbon */
.confidence-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
}

.ribbon-label {
  font-size: 11px;
  color: var(--text2);
}

.ribbon-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text0);
}

/* Reason Pills */
.reason-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.reason-pill {
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  font-size: 11px;
  color: var(--text0);
}

/* Quick Links */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.quick-link-btn {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text0);
  text-align: left;
  transition: all 0.2s;
}

.quick-link-btn:hover {
  background: var(--bg0);
  border-color: var(--accent);
  transform: translateX(2px);
}

/* Evidence Stack */
.evidence-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.evidence-card {
  padding: var(--sp-4);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.evidence-card:hover {
  background: var(--bg0);
  transform: translateX(2px);
}

.evidence-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text0);
  margin-bottom: var(--sp-2);
}

.evidence-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--sp-1);
}

.evidence-desc {
  font-size: 11px;
  color: var(--text2);
}

/* Raw JSON */
.raw-json {
  background: var(--bg0);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  overflow-x: auto;
}

.raw-json pre {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text0);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text2);
  text-align: center;
}

.empty-state svg {
  margin-bottom: var(--sp-4);
  opacity: 0.3;
}

.empty-state p {
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--bg2) 0%, var(--bg1) 50%, var(--bg2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg1);
}

::-webkit-scrollbar-thumb {
  background: var(--stroke);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text2);
}

/* ═══════════════════════════════════════════════════════════
   Additional Pages Styles
   ═══════════════════════════════════════════════════════════ */

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-6);
}

.page-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text0);
  margin: 0;
}

.page-subtitle {
  color: var(--text2);
  font-size: 14px;
  margin: var(--sp-2) 0 0 0;
}

.page-actions {
  display: flex;
  gap: var(--sp-3);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-icon {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  border: 1px solid var(--stroke);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg0);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #5ddde9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg2);
  color: var(--text0);
}

.btn-secondary:hover {
  background: var(--bg1);
  border-color: var(--accent);
}

.btn-icon {
  padding: var(--sp-2);
  background: transparent;
  border: none;
  color: var(--text1);
}

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

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}

.filter-select,
.filter-input {
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg1);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  color: var(--text0);
  font-size: 13px;
}

.filter-select {
  min-width: 150px;
}

.filter-input {
  min-width: 200px;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Data Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: var(--bg1);
  border-bottom: 1px solid var(--stroke);
}

.data-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-weight: 600;
  color: var(--text1);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--stroke);
  color: var(--text0);
}

.data-table tbody tr {
  transition: background 0.15s ease;
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--bg1);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px;
  padding: 2px 6px;
  background: var(--bg1);
  border-radius: 4px;
  color: var(--accent);
}

.loading-cell {
  text-align: center;
  padding: var(--sp-6) !important;
  color: var(--text2);
}

.truncate {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.pagination-btn {
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  color: var(--text0);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg1);
  border-color: var(--accent);
}

.pagination-btn.active {
  background: var(--accent);
  color: var(--bg0);
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Status Badges */
.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: rgb(16, 185, 129);
}

.status-badge.inactive {
  background: rgba(156, 163, 175, 0.15);
  color: rgb(156, 163, 175);
}

.status-badge.pending {
  background: rgba(251, 191, 36, 0.15);
  color: rgb(251, 191, 36);
}

.bot-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.bot-badge.yes {
  background: rgba(239, 68, 68, 0.15);
  color: rgb(239, 68, 68);
}

.bot-badge.no {
  background: rgba(16, 185, 129, 0.15);
  color: rgb(16, 185, 129);
}

/* Alert Banners */
.alert-banner {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-5);
}

.alert-banner.info {
  background: rgba(77, 212, 232, 0.1);
  border: 1px solid rgba(77, 212, 232, 0.2);
  color: var(--accent);
}

.alert-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Signals Grid */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.signal-card {
  background: var(--bg2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.signal-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text0);
  margin: 0;
}

.signal-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.signal-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: rgb(16, 185, 129);
}

.signal-status.pending {
  background: rgba(251, 191, 36, 0.15);
  color: rgb(251, 191, 36);
}

.signal-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.signal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3);
  background: var(--bg1);
  border-radius: var(--radius-md);
}

.signal-name {
  font-size: 13px;
  color: var(--text0);
}

.signal-coverage {
  font-size: 12px;
  color: var(--text2);
}

/* Roadmap */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.roadmap-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
}

.roadmap-item.complete {
  border-color: rgba(16, 185, 129, 0.3);
}

.roadmap-marker {
  font-size: 24px;
  flex-shrink: 0;
}

.roadmap-content h5 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text0);
  margin: 0 0 var(--sp-2) 0;
}

.roadmap-content p {
  font-size: 13px;
  color: var(--text2);
  margin: 0;
}

/* Warning text */
.warning-text {
  color: rgb(251, 191, 36);
  font-weight: 600;
}
