/**
 * GAIAI V3 — 4-Zone Core Layout & Navigation Architecture
 * Standards: Linear / Vercel Enterprise B2B SaaS
 * 1. Top Bar: 52px Fixed Glass Header
 * 2. Left Nav Rail: 64px Precision Rail
 * 3. Central Main Workspace: Dynamic View Switcher
 * 4. Right Swarm Panel: 360px Fixed Telemetry & Subagent Station
 */

#app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-canvas);
  position: relative;
}

/* ==========================================================================
   Zone 1: Top Bar (44px Fixed Minimalist Glass Header — Linear/Raycast Standard)
   ========================================================================== */
#top-bar {
  height: 44px;
  min-height: 44px;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.02), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 16px;
}

/* --- SOL BÖLÜM: Brand & Workspace Context --- */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.topbar-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.45));
}

.topbar-brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-crumb-sep {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 400;
  margin: 0 1px;
  user-select: none;
}

.topbar-workspace {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 2.5px 7.5px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
  cursor: default;
  transition: all var(--trans-fast);
}

.topbar-workspace:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.topbar-workspace-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.topbar-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  line-height: 1;
  user-select: none;
}

.topbar-live-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulse-emerald 2.2s infinite;
}

.topbar-live-text {
  font-size: 9.5px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- ORTA BÖLÜM: Hızlı Komut Paleti & Arama Barı --- */
.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 440px;
  margin: 0 auto;
}

.topbar-command-trigger {
  width: 100%;
  max-width: 380px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
  outline: none;
}

.topbar-command-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-secondary);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.12);
}

.topbar-cmd-left {
  display: flex;
  align-items: center;
  gap: 7.5px;
  overflow: hidden;
}

.topbar-cmd-icon {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color var(--trans-fast);
}

.topbar-command-trigger:hover .topbar-cmd-icon {
  color: var(--accent-primary);
}

.topbar-cmd-placeholder {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--trans-fast);
}

.topbar-command-trigger:hover .topbar-cmd-placeholder {
  color: var(--text-secondary);
}

.topbar-cmd-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 1.5px 5.5px;
  line-height: 1.1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* --- SAĞ BÖLÜM: Sistem Sağlığı & Kurucu Rozeti --- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Tek Kapsül Sistem Sağlığı Hapı */
.topbar-health-wrapper {
  position: relative;
}

.topbar-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
  height: 28px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  outline: none;
}

.topbar-health-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.topbar-health-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.topbar-chevron-down {
  color: var(--text-dim);
  transition: transform var(--trans-fast);
  margin-left: 1px;
}

.topbar-health-pill[aria-expanded="true"] .topbar-chevron-down {
  transform: rotate(180deg);
}

/* Hover / Click Telemetri Popover Kartı */
.topbar-telemetry-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 290px;
  background: #101015;
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 12px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--trans-fast);
  pointer-events: none;
}

.topbar-health-wrapper:hover .topbar-telemetry-popover,
.topbar-telemetry-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.telemetry-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.telemetry-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.telemetry-badge {
  font-size: 9px;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  padding: 1.5px 5.5px;
  border-radius: 3px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.telemetry-version {
  font-size: 9.5px;
  color: var(--text-dim);
}

.telemetry-popover-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.5px 0;
  font-size: 11px;
}

.telemetry-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-item-name {
  color: var(--text-secondary);
}

.telemetry-item-value {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 10.5px;
}

/* Hızlı Kısayol: Swarm Motoru Rozeti */
.topbar-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  outline: none;
}

.topbar-quick-pill:hover {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.topbar-quick-icon {
  flex-shrink: 0;
}

/* Kurucu Profil Kartı: GA Kurucu Ortak Hapı */
.topbar-founder-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 9px 0 3.5px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans-fast);
  outline: none;
}

.topbar-founder-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.founder-avatar-badge {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.founder-title-text {
  font-size: 11px;
  font-weight: 600;
  color: #c7d2fe;
  letter-spacing: -0.01em;
}

/* Standart Durum Noktası Tanımları */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background-color: var(--accent-success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulse-dot 2.5s infinite;
}

.status-dot.connecting {
  background-color: var(--accent-warning);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  animation: pulse-amber 1.8s infinite;
}

/* Mikro Etkileşim Animasyonları */
@keyframes pulse-emerald {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.92); }
}

@keyframes focus-flash {
  0% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6); }
  100% { box-shadow: none; }
}

.keyboard-highlight-pulse {
  animation: focus-flash 1s ease-out;
}

@keyframes panel-flash {
  0% { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.8); }
  100% { box-shadow: none; }
}

.panel-highlight-flash {
  animation: panel-flash 1.2s ease-out;
}

/* Responsive Kurallar */
@media (max-width: 960px) {
  .topbar-workspace,
  .topbar-crumb-sep {
    display: none;
  }
  .topbar-command-trigger {
    max-width: 260px;
  }
}

@media (max-width: 720px) {
  .topbar-center {
    display: none;
  }
  .topbar-swarm-label {
    display: none;
  }
  .topbar-founder-pill .founder-title-text {
    display: none;
  }
  .topbar-founder-pill {
    padding: 0 3.5px;
  }
}

/* ==========================================================================
   4-Zone Main Workspace Container
   ========================================================================== */
#app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 44px);
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Zone 2: Left Nav Rail (56px Fixed)
   ========================================================================== */
#nav-rail {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  z-index: 60;
  height: 100%;
}

.nav-rail-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 8px 0 12px;
}

.nav-rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.nav-item {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  transition: all var(--trans-fast);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-white);
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.18);
}

.nav-item .nav-active-pill {
  display: none;
}

.nav-item.active .nav-active-pill {
  display: block;
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent-primary);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent-primary);
}

.nav-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.nav-icon-wrapper svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  line-height: 1;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Nav Rail Bottom: Founder Profile */
.nav-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.founder-avatar-pill {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.founder-avatar-pill:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.avatar-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Zone 3: Central Main Dynamic Workspace
   ========================================================================== */
#main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-canvas);
  position: relative;
}

.view-panel {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.view-panel.active-view {
  display: flex;
}

.view-panel[style*="display: none"],
.view-panel[style*="display:none"] {
  display: none !important;
}

/* ==========================================================================
/* ==========================================================================
   Zone 4: Right Swarm Panel (Removed - 100% Full Width Workspace)
   ========================================================================== */
#swarm-panel {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

/* Swarm Cockpit Interior */
.swarm-cockpit-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.panel-header {
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.015);
  flex-shrink: 0;
}

.panel-icon {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-white);
  text-transform: uppercase;
}

.section-title {
  padding: 10px 14px 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.todo-counter {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(99, 102, 241, 0.28);
}

/* 3 Specialist Subagents in Swarm Panel */
.agent-cards-container {
  padding: 2px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--trans-fast);
}

.agent-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-muted);
}

.agent-card.working {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-icon-wrapper {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agent-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.agent-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agent-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  line-height: 1.2;
}

.agent-badge.working {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.agent-badge.idle {
  background: rgba(255, 255, 255, 0.04);
  color: #71717a;
  border: 1px solid var(--border-subtle);
}

.agent-role-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.agent-status-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.agent-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-status-dot.working {
  background-color: var(--accent-warning);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  animation: pulse-amber 1.8s infinite;
}

.agent-status-dot.idle {
  background-color: var(--text-dim);
}

.agent-status-note {
  font-size: 9.5px;
  color: var(--text-muted);
}

.agent-tag-badge {
  font-size: 9px;
  color: var(--text-dim);
}

/* Native TODO Queue in Swarm Panel */
.todo-input-bar {
  display: flex;
  gap: 6px;
  padding: 0 14px 6px;
}

.todo-input {
  flex: 1;
  height: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0 8px;
  font-size: 11px;
  color: var(--text-primary);
  transition: all var(--trans-fast);
}

.todo-input:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.04);
}

.btn-todo-add {
  width: 28px;
  height: 28px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-xs);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-todo-add:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.5);
}

.todo-list {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
  flex-shrink: 0;
}

.todo-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 10.5px;
  padding: 10px;
  font-style: italic;
}

.todo-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  transition: all var(--trans-fast);
}

.todo-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-muted);
}

.todo-item.done {
  text-decoration: line-through;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.015);
  border-color: transparent;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

.todo-item.in-progress {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.todo-check-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.todo-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.3;
}

.todo-delete-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
  opacity: 0.4;
  transition: all var(--trans-fast);
}

.todo-delete-btn:hover {
  opacity: 1;
  color: var(--accent-danger);
}

/* Terminal Box in Swarm Panel */
.terminal-box {
  flex: 1;
  min-height: 150px;
  background: #060608;
  border-top: 1px solid var(--border-subtle);
  padding: 10px 14px;
  overflow-y: auto;
  font-size: 10.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.log-line {
  line-height: 1.4;
  word-break: break-all;
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.log-time {
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
}

.log-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.log-badge.log-sys {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

.log-badge.log-swarm {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
}

.log-badge.log-mcp {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

.log-badge.log-call {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.log-badge.log-stt {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
}

.log-badge.log-tts {
  color: #f472b6;
  background: rgba(244, 114, 182, 0.12);
}

.log-text {
  color: var(--text-secondary);
}

.btn-clear-logs {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  opacity: 0.5;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: all var(--trans-fast);
}

.btn-clear-logs:hover {
  opacity: 1;
  color: var(--text-primary);
}
