/* ==========================================================================
   OmniBrain Mesh Studio - 2026 划时代多模型融合工作台设计系统
   Aesthetic: Obsidian Dark / Glassmorphism / Cyber Precision / Responsive
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d1117;
  --bg-tertiary: #161b22;
  --bg-card: rgba(22, 27, 34, 0.7);
  --bg-card-hover: rgba(33, 38, 45, 0.85);
  --bg-glass: rgba(13, 17, 23, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #484f58;
  
  --accent-primary: #6366f1;       /* Indigo */
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  --accent-claude: #d97706;        /* Amber */
  --accent-o3: #10b981;            /* Emerald */
  --accent-gpt: #06b6d4;           /* Cyan */
  --accent-gemini: #3b82f6;        /* Blue */
  --accent-deepseek: #8b5cf6;      /* Purple */
  --accent-danger: #ef4444;        /* Red */
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.brand-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

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

/* Mode Switcher Tabs */
.view-mode-tabs {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-tab-btn:hover {
  color: var(--text-main);
}

.mode-tab-btn.active {
  background: var(--bg-tertiary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-weight: 600;
  border: 1px solid var(--border-medium);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 5px 10px;
  border-radius: var(--radius-full);
}

.ping-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

.btn-control-pool {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-control-pool:hover {
  border-color: var(--border-medium);
  background: var(--bg-tertiary);
}

/* ==========================================================================
   Main Layout & Content Area
   ========================================================================== */
.app-container {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 64px);
}

/* Left Sidebar: Session List & Model Matrix */
.sidebar-panel {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 50;
}

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

.btn-new-chat {
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  padding: 16px 16px 8px;
}

.model-selector-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
}

.model-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.model-pick-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.model-pick-item.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
}

.model-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-item-icon {
  font-size: 16px;
}

.model-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.model-item-tag {
  font-size: 10px;
  color: var(--text-muted);
}

.model-item-status {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

/* Preset Scenario Prompts */
.preset-prompt-list {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preset-chip {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.preset-chip:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
}

/* Center Stage Area */
.stage-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Chat Messages Viewport */
.chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* Empty Hero Banner */
.empty-hero-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px 40px;
  max-width: 680px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  color: #a5b4fc;
  font-size: 12px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.hero-feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  transition: all 0.2s;
  cursor: pointer;
}

.hero-feature-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  background: var(--bg-tertiary);
}

.hfc-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.hfc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

/* Message Rows */
.msg-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.msg-row.user {
  align-items: flex-end;
}

.msg-bubble-user {
  background: #1f2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-lg) var(--radius-lg) 2px var(--radius-lg);
  max-width: 80%;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Assistant Message Block */
.msg-bubble-assistant {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.msg-model-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.model-header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.model-title-text {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.model-pool-origin {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.model-telemetry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Accordion for Thinking / Reasoning Chain */
.thinking-accordion {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}

.thinking-header {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
}

.thinking-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
  animation: pulse 1.5s infinite;
}

.thinking-tokens-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.thinking-body {
  padding: 10px 14px;
  font-size: 12px;
  color: #94a3b8;
  font-family: var(--font-mono);
  line-height: 1.6;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.thinking-step-item {
  margin-bottom: 6px;
}

/* Assistant Markdown & Code Styling */
.assistant-content-body {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.7;
}

.assistant-content-body h3, 
.assistant-content-body h4 {
  color: #fff;
  margin: 14px 0 8px;
  font-size: 15px;
}

.assistant-content-body blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 6px 12px;
  margin: 12px 0;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #c7d2fe;
}

.assistant-content-body pre {
  background: #090c10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
  position: relative;
}

.assistant-content-body code {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Handover Actions Toolbar (接力棒) */
.handover-toolbar {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.handover-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.handover-buttons-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-handover {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-handover:hover {
  transform: translateY(-1px);
  border-color: var(--border-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-handover.claude:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: #d97706;
  color: #fbbf24;
}

.btn-handover.o3:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #34d399;
}

.btn-handover.gemini:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #60a5fa;
}

/* Chat Input Bar */
.chat-input-container {
  padding: 14px 24px 20px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 30%);
  position: relative;
}

.input-box-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-box-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), var(--shadow-lg);
}

.prompt-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 48px;
  max-height: 180px;
  line-height: 1.5;
}

.input-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.input-meta-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-dropdown-trigger {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-send-prompt {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-send-prompt:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   Spatial Split View (双脑对比视界)
   ========================================================================== */
.split-view-container {
  display: none;
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 16px 20px;
  gap: 16px;
  overflow: hidden;
}

.split-view-container.active {
  display: flex;
}

.split-pane {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.split-pane-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================================
   MoA Mixture of Agents Arena (三脑裁决陪审团)
   ========================================================================== */
.moa-arena-container {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.moa-arena-container.active {
  display: flex;
}

.moa-header-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.moa-jury-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.jury-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jury-card.claude { border-top: 3px solid var(--accent-claude); }
.jury-card.o3 { border-top: 3px solid var(--accent-o3); }
.jury-card.gpt5 { border-top: 3px solid var(--accent-gpt); }

.jury-score-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  display: inline-block;
  align-self: flex-start;
}

.arbiter-card {
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.08) 0%, var(--bg-secondary) 100%);
  border: 1px solid rgba(234, 88, 12, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ==========================================================================
   Account Pool & Mesh Cockpit Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.cockpit-modal {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

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

.cockpit-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-metric-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-number {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-sub {
  font-size: 10px;
  color: #34d399;
}

.pool-nodes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pool-nodes-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.pool-nodes-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.status-badge-healthy {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
}

/* ==========================================================================
   Artifact Canvas Side Drawer
   ========================================================================== */
.canvas-drawer {
  position: fixed;
  top: 64px;
  right: -580px;
  width: 560px;
  height: calc(100vh - 64px);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-medium);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.6);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.canvas-drawer.open {
  right: 0;
}

.canvas-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.canvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ==========================================================================
   Animations & Responsive Breakpoints
   ========================================================================== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

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

@media (max-width: 900px) {
  .sidebar-panel {
    position: absolute;
    left: -280px;
    height: 100%;
  }
  .sidebar-panel.mobile-open {
    left: 0;
  }
  .hero-features-grid {
    grid-template-columns: 1fr;
  }
  .moa-jury-grid {
    grid-template-columns: 1fr;
  }
  .cockpit-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .view-mode-tabs {
    display: none;
  }
}
