/**
 * AXIA — unified_workspace.css
 * Unified Workspace UI Refactor
 * Phase 2〜13: 3カラムグリッド・Unified Workspace・Status Card・7タブ・Resizable・Mobile
 */

/* ═══════════════════════════════════════════════════════════
   Phase 2〜3: 3カラムグリッド & 二重右パネル廃止
   ═══════════════════════════════════════════════════════════ */

/* 旧 Live Computer / Workspace パネルを非表示（統合後） */
#liveComputerPanel,
#workspacePanel {
  display: none !important;
}

/* 3カラムグリッドレイアウト */
.chat-layout {
  display: grid !important;
  grid-template-columns: 260px minmax(520px, 1fr) minmax(380px, 32vw);
  grid-template-rows: 1fr;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* 左: スレッドサイドバー */
.chat-layout .thread-sidebar {
  grid-column: 1;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow-y: auto;
}

/* 中央: チャット */
.chat-layout .center-chat {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 右: Unified Workspace */
.unified-workspace-panel {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  max-width: 50vw;
  background: var(--surface, #1a1a2e);
  border-left: 1px solid var(--border, #2a2a3e);
  overflow: hidden;
  position: relative;
  transition: width 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════
   Phase 4: Unified Workspace Header
   ═══════════════════════════════════════════════════════════ */

.uw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
  background: var(--surface, #1a1a2e);
}

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

.uw-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted, #666);
  flex-shrink: 0;
  transition: background 0.3s;
}

.uw-status-dot.running {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
  animation: uw-pulse 1.5s ease-in-out infinite;
}

.uw-status-dot.error {
  background: #ef4444;
}

.uw-status-dot.done {
  background: #3b82f6;
}

@keyframes uw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.uw-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.uw-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.uw-btn {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.15s;
  line-height: 1;
}

.uw-btn:hover {
  background: var(--surface2, #252540);
  color: var(--text, #e0e0e0);
}

/* ═══════════════════════════════════════════════════════════
   Phase 5: Status Card
   ═══════════════════════════════════════════════════════════ */

.uw-status-card {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
  background: var(--surface, #1a1a2e);
}

.uw-status-card.hidden {
  display: none;
}

.uw-current-action {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.uw-action-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.2;
}

.uw-action-text {
  font-size: 13px;
  color: var(--text, #e0e0e0);
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}

.uw-action-sub {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.uw-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.uw-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border, #2a2a3e);
  border-radius: 2px;
  overflow: hidden;
}

.uw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #6366f1), #8b5cf6);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

.uw-progress-pct {
  font-size: 11px;
  color: var(--text-muted, #888);
  min-width: 32px;
  text-align: right;
}

.uw-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.uw-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted, #888);
}

.uw-meta-label {
  color: var(--text-muted, #888);
}

.uw-meta-val {
  color: var(--text, #e0e0e0);
  font-weight: 500;
}

.uw-status-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.uw-stop-btn {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.uw-stop-btn:hover {
  background: rgba(239,68,68,0.25);
}

.uw-retry-btn {
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent, #6366f1);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.uw-retry-btn:hover {
  background: rgba(99,102,241,0.25);
}

/* ═══════════════════════════════════════════════════════════
   Phase 4: Unified Workspace Tabs (7タブ)
   ═══════════════════════════════════════════════════════════ */

.uw-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface, #1a1a2e);
}

.uw-tabs::-webkit-scrollbar {
  display: none;
}

.uw-tab {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  padding: 5px 5px;
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  flex-shrink: 0;
  /* [v15.2-E] font-size 9.5px, padding 5px 5px - 8タブを379px内に収める */
  text-align: center;
}

.uw-tab:hover {
  color: var(--text, #e0e0e0);
  background: var(--surface2, #252540);
}

.uw-tab.active {
  color: var(--accent, #6366f1);
  border-bottom-color: var(--accent, #6366f1);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   Phase 4: Unified Workspace Body
   ═══════════════════════════════════════════════════════════ */

.uw-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.uw-tab-content {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 12px 14px;
}

.uw-tab-content.active {
  display: flex;
}

/* ─── Overview タブ ─────────────────────────────────────── */
.uw-overview-section {
  margin-bottom: 16px;
}

.uw-overview-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.uw-overview-value {
  font-size: 13px;
  color: var(--text, #e0e0e0);
  line-height: 1.5;
}

.uw-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2, #252540);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text, #e0e0e0);
  margin: 2px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-next-action {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text, #e0e0e0);
  line-height: 1.4;
}

/* ─── Preview タブ ──────────────────────────────────────── */
.uw-preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

.uw-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
}

.uw-preview-url {
  font-size: 11px;
  color: var(--text-muted, #888);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.uw-preview-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.uw-preview-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted, #888);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.uw-preview-status-icon {
  font-size: 32px;
  opacity: 0.5;
}

.uw-preview-status-text {
  font-size: 13px;
  color: var(--text-muted, #888);
}

.uw-preview-status-sub {
  font-size: 11px;
  color: var(--text-muted, #888);
  opacity: 0.7;
}

.uw-preview-iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: none;
}

/* ─── Timeline タブ ─────────────────────────────────────── */
.uw-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.uw-timeline-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #2a2a3e);
  position: relative;
}

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

.uw-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border, #2a2a3e);
  flex-shrink: 0;
  margin-top: 4px;
}

.uw-timeline-dot.current {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
  animation: uw-pulse 1.5s ease-in-out infinite;
}

.uw-timeline-dot.done {
  background: #3b82f6;
}

.uw-timeline-dot.error {
  background: #ef4444;
}

.uw-timeline-content {
  flex: 1;
  min-width: 0;
}

.uw-timeline-step {
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #e0e0e0);
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
  /* white-space: nowrap は廃止 — 長いステップが重なって見える問題を修正 */
}

.uw-timeline-step.current {
  color: #22c55e;
}

.uw-timeline-meta {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.uw-timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: var(--text-muted, #888);
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}

/* ─── Files タブ ────────────────────────────────────────── */
.uw-file-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #2a2a3e);
}

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

.uw-file-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

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

.uw-file-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #e0e0e0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-file-meta {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.uw-file-action {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  flex-shrink: 0;
}

.uw-file-action.read {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

.uw-file-action.write {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.uw-file-action.create {
  background: rgba(168,85,247,0.15);
  color: #a855f7;
}

.uw-diff-block {
  margin-top: 8px;
  background: var(--surface2, #252540);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 6px;
  padding: 8px;
  font-size: 11px;
  font-family: 'Fira Code', 'Consolas', monospace;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
}

.uw-diff-add {
  color: #22c55e;
}

.uw-diff-remove {
  color: #ef4444;
}

/* ─── Debug タブ ────────────────────────────────────────── */
.uw-debug-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--text-muted, #888);
  font-size: 12px;
}

.uw-debug-item {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.uw-debug-title {
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 4px;
}

.uw-debug-body {
  font-size: 11px;
  color: var(--text, #e0e0e0);
  line-height: 1.5;
}

.uw-debug-meta {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 4px;
}

.uw-debug-recovery {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 4px;
  padding: 6px 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text, #e0e0e0);
}

/* ─── Artifacts タブ ────────────────────────────────────── */
.uw-artifact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #2a2a3e);
}

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

.uw-artifact-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--surface2, #252540);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

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

.uw-artifact-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #e0e0e0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uw-artifact-meta {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.uw-artifact-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.uw-artifact-btn {
  background: var(--surface2, #252540);
  border: 1px solid var(--border, #2a2a3e);
  color: var(--text, #e0e0e0);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.uw-artifact-btn:hover {
  background: var(--accent-dim, rgba(99,102,241,0.2));
  border-color: var(--accent, #6366f1);
}

.uw-artifact-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--text-muted, #888);
  font-size: 12px;
  flex-direction: column;
  gap: 6px;
}

/* ─── Logs タブ ─────────────────────────────────────────── */
.uw-log-item {
  font-size: 11px;
  font-family: 'Fira Code', 'Consolas', monospace;
  color: var(--text-muted, #888);
  padding: 2px 0;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  word-break: break-all;
}

.uw-log-item.info { color: #60a5fa; }
.uw-log-item.warn { color: #fbbf24; }
.uw-log-item.error { color: #ef4444; }
.uw-log-item.success { color: #22c55e; }

/* ─── Artifact Dock ─────────────────────────────────────── */
.uw-artifact-dock {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border, #2a2a3e);
  padding: 8px 14px;
  flex-shrink: 0;
  background: var(--surface, #1a1a2e);
}

.uw-artifact-dock.visible {
  display: flex;
}

.uw-dock-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.uw-dock-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.uw-dock-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2, #252540);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text, #e0e0e0);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.uw-dock-item:hover {
  border-color: var(--accent, #6366f1);
  background: rgba(99,102,241,0.1);
}

/* ═══════════════════════════════════════════════════════════
   Phase 9: Resizable Layout
   ═══════════════════════════════════════════════════════════ */

.uw-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s;
  z-index: 10;
}

.uw-resize-handle:hover,
.uw-resize-handle.dragging {
  background: var(--accent, #6366f1);
}

/* ═══════════════════════════════════════════════════════════
   Phase 10: One Command Home (中央空白時)
   ═══════════════════════════════════════════════════════════ */

.uw-idle-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px 16px;
  text-align: center;
  gap: 8px;
}

.uw-idle-icon {
  font-size: 36px;
  opacity: 0.4;
}

.uw-idle-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted, #888);
}

.uw-idle-sub {
  font-size: 12px;
  color: var(--text-muted, #888);
  opacity: 0.7;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   Phase 12: Failure UX
   ═══════════════════════════════════════════════════════════ */

.uw-failure-card {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.uw-failure-title {
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.uw-failure-body {
  font-size: 12px;
  color: var(--text, #e0e0e0);
  line-height: 1.5;
}

.uw-failure-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.uw-failure-btn {
  background: var(--surface2, #252540);
  border: 1px solid var(--border, #2a2a3e);
  color: var(--text, #e0e0e0);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.uw-failure-btn:hover {
  border-color: var(--accent, #6366f1);
}

/* ═══════════════════════════════════════════════════════════
   Phase 13: Completion Card
   ═══════════════════════════════════════════════════════════ */

.uw-completion-card {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.uw-completion-title {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.uw-completion-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.uw-completion-btn {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.uw-completion-btn:hover {
  background: rgba(34,197,94,0.25);
}

/* ═══════════════════════════════════════════════════════════
   Phase 11: Mobile Layout
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* モバイル: 1カラム（チャットのみ） */
  .chat-layout {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
  }

  .chat-layout .thread-sidebar {
    display: none;
  }

  .chat-layout .center-chat {
    flex: 1;
    min-height: 0;
  }

  /* Unified Workspace: Bottom Sheet */
  .unified-workspace-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 0;
    max-height: 70vh;
    border-left: none;
    border-top: 1px solid var(--border, #2a2a3e);
    border-radius: 16px 16px 0 0;
    z-index: 1200;
    transition: height 0.3s ease;
    overflow: hidden;
  }

  .unified-workspace-panel.mobile-open {
    height: 60vh;
  }

  /* モバイルナビ */
  .uw-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface, #1a1a2e);
    border-top: 1px solid var(--border, #2a2a3e);
    z-index: 1100;
    height: 56px;
  }

  .uw-mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 10px;
    cursor: pointer;
    padding: 6px 4px;
    transition: color 0.15s;
  }

  .uw-mobile-nav-btn .nav-icon {
    font-size: 18px;
    line-height: 1;
  }

  .uw-mobile-nav-btn.active {
    color: var(--accent, #6366f1);
  }

  /* モバイル時はBottom Sheetハンドル表示 */
  .uw-header::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border, #2a2a3e);
    border-radius: 2px;
    margin: 0 auto 8px;
  }
}

/* タブレット */
@media (min-width: 768px) and (max-width: 1023px) {
  .chat-layout {
    grid-template-columns: 0 1fr minmax(320px, 38vw) !important;
  }

  .chat-layout .thread-sidebar {
    display: none;
  }

  .uw-mobile-nav {
    display: none;
  }
}

@media (min-width: 1024px) {
  .uw-mobile-nav {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   Scrollbar styling
   ═══════════════════════════════════════════════════════════ */

.uw-tab-content::-webkit-scrollbar {
  width: 4px;
}

.uw-tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.uw-tab-content::-webkit-scrollbar-thumb {
  background: var(--border, #2a2a3e);
  border-radius: 2px;
}

.uw-tab-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #888);
}

/* ─── チャット集中モード ─────────────────────────────────── */
.chat-layout.focus-mode .unified-workspace-panel {
  display: none !important;
}

.chat-layout.focus-mode {
  grid-template-columns: 260px 1fr !important;
}

/* ─── Workspace展開ボタン（focus-mode時にチャット内に表示） ─── */
.uw-open-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: var(--accent, #6366f1);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.2s;
  display: none;
}
.chat-layout.focus-mode .uw-open-btn {
  display: block;
}

/* ─── Workspace展開ボタン（focus-mode時にチャット内に表示） ─── */
.uw-open-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: var(--accent, #6366f1);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.2s;
  display: none;
}
.chat-layout.focus-mode .uw-open-btn {
  display: block;
}

.uw-deploy-panel { padding: 12px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.uw-deploy-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border, #333); padding-bottom: 8px; margin-bottom: 4px; }
.uw-deploy-title { font-size: 12px; font-weight: 600; color: var(--text-primary, #e0e0e0); }
.uw-deploy-refresh-btn { background: var(--accent, #6366f1); color: #fff; border: none; border-radius: 4px; padding: 3px 8px; font-size: 10px; cursor: pointer; }
.uw-deploy-section { background: var(--bg-secondary, #1e1e2e); border: 1px solid var(--border, #333); border-radius: 6px; padding: 8px 10px; }
.uw-deploy-section-title { font-size: 10px; font-weight: 600; color: var(--text-muted, #888); text-transform: uppercase; margin-bottom: 6px; }
.uw-deploy-loading { font-size: 11px; color: var(--text-muted, #888); font-style: italic; }
.uw-deploy-ok { color: #4ade80; font-size: 11px; }
.uw-deploy-warn { color: #fbbf24; font-size: 11px; }
.uw-deploy-error { color: #f87171; font-size: 11px; }
.uw-deploy-info { color: var(--text-muted, #888); font-size: 11px; }
.uw-deploy-pr { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.uw-deploy-pre { font-size: 9px; color: var(--text-secondary, #ccc); white-space: pre-wrap; word-break: break-all; margin: 0; max-height: 200px; overflow-y: auto; }
.uw-deploy-task { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 0; }
.uw-deploy-task-id { font-family: monospace; font-size: 9px; color: var(--text-muted, #888); min-width: 60px; }
