
/* ═══════════════════════════════════════════════════════════
   AXIA Neural Workspace — Live Computer / Manus-style UI
   Phase 1/11: 3カラムSplit Workspace Layout
   ═══════════════════════════════════════════════════════════ */

/* Live Computer Panel */
.live-computer-panel {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.3s ease;
}

/* LC Header */
.lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.lc-status { display: flex; align-items: center; gap: 8px; }
.lc-title { font-size: 13px; font-weight: 700; color: #e2e8f0; letter-spacing: 0.5px; }
.lc-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: lc-pulse-anim 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.lc-pulse.idle { background: #64748b; animation: none; }
.lc-pulse.error { background: #ef4444; animation: lc-pulse-anim 0.8s ease-in-out infinite; }
@keyframes lc-pulse-anim { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.lc-close-btn {
  background: none; border: none; color: #94a3b8; font-size: 16px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.lc-close-btn:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }

/* Current Work Card */
.lc-current-work {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lc-work-icon { font-size: 20px; flex-shrink: 0; }
.lc-work-text { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-work-sub { font-size: 11px; color: var(--text-muted); }

/* Human Confidence Layer */
.lc-confidence {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #0f172a;
}
.lc-conf-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.lc-conf-item:last-child { border-right: none; }
.lc-conf-label { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.lc-conf-val { font-size: 12px; font-weight: 700; color: #22c55e; margin-top: 2px; }

/* LC Tabs */
.lc-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.lc-tabs::-webkit-scrollbar { display: none; }
.lc-tab {
  flex-shrink: 0;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.lc-tab:hover { color: var(--text); }
.lc-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* LC Tab Content */
.lc-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Realtime Cursor Simulation */
.lc-cursor-sim {
  background: #0d1117;
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #58a6ff;
  min-height: 60px;
  border: 1px solid #21262d;
  flex-shrink: 0;
}
.lc-cursor-line {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lc-cursor-line::after {
  content: '▋';
  animation: lc-blink 1s step-end infinite;
  color: #58a6ff;
}
@keyframes lc-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Preview Area */
.lc-preview-area {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
  min-height: 200px;
}
.lc-preview-status {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Smart Timeline */
.lc-smart-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lc-timeline-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  position: relative;
}
.lc-timeline-item::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 28px;
  bottom: -8px;
  width: 2px;
  background: var(--border);
}
.lc-timeline-item:last-child::before { display: none; }
.lc-tl-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  z-index: 1;
}
.lc-tl-dot.running { border-color: var(--accent); background: rgba(99,102,241,0.15); animation: lc-pulse-anim 1.5s ease-in-out infinite; }
.lc-tl-dot.done { border-color: #22c55e; background: rgba(34,197,94,0.15); }
.lc-tl-dot.error { border-color: #ef4444; background: rgba(239,68,68,0.15); }
.lc-tl-body { flex: 1; min-width: 0; }
.lc-tl-label { font-size: 12px; font-weight: 600; color: var(--text); }
.lc-tl-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lc-tl-time { font-size: 10px; color: var(--text-dim); }

/* File Activity Panel */
.lc-file-activity { display: flex; flex-direction: column; gap: 4px; }
.lc-file-empty { font-size: 12px; color: var(--text-muted); padding: 12px; text-align: center; }
.lc-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface2);
  font-size: 12px;
  animation: lc-slide-in 0.3s ease;
}
@keyframes lc-slide-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.lc-file-op {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.lc-file-op.read { background: rgba(59,130,246,0.15); color: #60a5fa; }
.lc-file-op.write { background: rgba(34,197,94,0.15); color: #4ade80; }
.lc-file-op.create { background: rgba(168,85,247,0.15); color: #c084fc; }
.lc-file-op.delete { background: rgba(239,68,68,0.15); color: #f87171; }
.lc-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.lc-file-size { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

/* Visual Diff UI */
.lc-diff-area { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lc-diff-header { padding: 6px 10px; background: var(--surface2); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--border); }
.lc-diff-content { font-family: var(--font-mono); font-size: 11px; max-height: 200px; overflow-y: auto; }
.lc-diff-line { padding: 2px 10px; white-space: pre-wrap; word-break: break-all; }
.lc-diff-line.added { background: rgba(34,197,94,0.1); color: #4ade80; }
.lc-diff-line.removed { background: rgba(239,68,68,0.1); color: #f87171; text-decoration: line-through; }
.lc-diff-line.context { color: var(--text-muted); }

/* Thought Stream */
.lc-thought-stream { display: flex; flex-direction: column; gap: 8px; }
.lc-thought-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  animation: lc-fade-in 0.4s ease;
}
@keyframes lc-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.lc-thought-item.thinking { background: rgba(99,102,241,0.08); border-left: 3px solid var(--accent); color: var(--text); }
.lc-thought-item.decision { background: rgba(34,197,94,0.08); border-left: 3px solid #22c55e; color: var(--text); }
.lc-thought-item.warning { background: rgba(245,158,11,0.08); border-left: 3px solid #f59e0b; color: var(--text); }
.lc-thought-item.error { background: rgba(239,68,68,0.08); border-left: 3px solid #ef4444; color: var(--text); }
.lc-thought-icon { font-size: 14px; margin-right: 6px; }
.lc-thought-text { display: inline; }
.lc-thought-time { font-size: 10px; color: var(--text-dim); margin-top: 4px; display: block; }

/* Debug Activity */
.lc-debug-activity { display: flex; flex-direction: column; gap: 6px; }
.lc-debug-empty { font-size: 12px; color: #22c55e; padding: 12px; text-align: center; }
.lc-debug-item {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  animation: lc-slide-in 0.3s ease;
}
.lc-debug-item.error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.lc-debug-item.fix { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #86efac; }
.lc-debug-item.retry { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #fcd34d; }
.lc-debug-label { font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 3px; }
.lc-debug-msg { font-size: 11px; line-height: 1.4; word-break: break-all; }

/* Artifact Dock */
.lc-artifact-dock {
  border-top: 1px solid var(--border);
  padding: 8px;
  flex-shrink: 0;
  background: var(--surface2);
}
.lc-dock-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.lc-dock-items { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-dock-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.lc-dock-item:hover { border-color: var(--accent); color: var(--accent); }
.lc-dock-item-icon { font-size: 13px; }

/* Agent Presence Indicator */
.lc-agent-presence {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99,102,241,0.06);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
}
.lc-agent-avatar { font-size: 16px; }
.lc-agent-name { font-weight: 600; color: var(--text); }
.lc-agent-action { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mini Computer View (floating bottom-right) */
.lc-mini-computer {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1100;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: none;
}
.lc-mini-computer:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.lc-mini-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.lc-mini-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: lc-pulse-anim 1.5s ease-in-out infinite; }
.lc-mini-title { font-size: 11px; font-weight: 700; color: #e2e8f0; flex: 1; }
.lc-mini-stop { background: none; border: none; color: #94a3b8; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.lc-mini-body { padding: 8px 12px; font-size: 11px; color: var(--text-muted); }
.lc-mini-step { font-weight: 600; color: var(--text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-mini-progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.lc-mini-progress-fill { height: 100%; background: var(--accent); transition: width 0.5s ease; }

/* Chat-layout: 4カラム対応（thread-sidebar / center-chat / live-computer / workspace） */
@media (min-width: 1280px) {
  .chat-layout.lc-open .center-chat { flex: 1; min-width: 0; }
  .live-computer-panel { display: flex; }
}

/* モバイル: Live Computer は下からスライドアップ */
@media (max-width: 767px) {
  .live-computer-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 60vh;
    border-left: none;
    border-top: 1px solid var(--border);
    z-index: 1200;
    border-radius: 16px 16px 0 0;
  }
}

/* Workspace open + LC open: 幅調整 */
.workspace-open .live-computer-panel { display: none; }
