/**
 * AI Command Center — Components
 * Buttons, badges, tabs, pills, and generic status components.
 */
/* Buttons */
.btn {
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  line-height: 1.4;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--grad-btn);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--grad-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-glow);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.38rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.35;
  min-height: 30px;
  border-radius: 7px;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}


/* Badges */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-ceo { background: rgba(219, 39, 119, 0.12); color: #db2777; border: 1px solid rgba(219, 39, 119, 0.25); }
.badge-cmo { background: rgba(2, 132, 199, 0.12); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.25); }
.badge-cto { background: rgba(5, 150, 105, 0.12); color: #059669; border: 1px solid rgba(5, 150, 105, 0.25); }
.badge-omni, .badge-gateway { background: rgba(147, 51, 234, 0.12); color: #9333ea; border: 1px solid rgba(147, 51, 234, 0.25); }
.badge-openai { background: rgba(217, 119, 6, 0.12); color: #d97706; border: 1px solid rgba(217, 119, 6, 0.25); }

[data-theme="dark"] .badge-ceo { background: rgba(236, 72, 153, 0.15); color: #f472b6; border-color: rgba(236, 72, 153, 0.3); }
[data-theme="dark"] .badge-cmo { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
[data-theme="dark"] .badge-cto { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
[data-theme="dark"] .badge-omni, [data-theme="dark"] .badge-gateway { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }
[data-theme="dark"] .badge-openai { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }


/* Status Badges */
.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.status-pending { 
  background: rgba(100, 116, 139, 0.12); 
  color: #475569; 
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.status-pending::before { background: #64748b; }

.status-running { 
  background: rgba(217, 119, 6, 0.12); 
  color: #b45309; 
  border: 1px solid rgba(217, 119, 6, 0.3);
  animation: pulse-glow 2s infinite; 
}
.status-running::before { background: #d97706; }

.status-waiting_for_delegates { 
  background: rgba(37, 99, 235, 0.12); 
  color: #1d4ed8; 
  border: 1px solid rgba(37, 99, 235, 0.3);
  animation: pulse-glow 2s infinite; 
}
.status-waiting_for_delegates::before { background: #2563eb; }

.status-completed { 
  background: rgba(5, 150, 105, 0.12); 
  color: #047857; 
  border: 1px solid rgba(5, 150, 105, 0.3);
}
.status-completed::before { background: #059669; }

.status-failed { 
  background: rgba(225, 29, 72, 0.12); 
  color: #be123c; 
  border: 1px solid rgba(225, 29, 72, 0.3);
}
.status-failed::before { background: #e11d48; }

[data-theme="dark"] .status-pending { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.25); }
[data-theme="dark"] .status-running { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
[data-theme="dark"] .status-waiting_for_delegates { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }
[data-theme="dark"] .status-completed { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
[data-theme="dark"] .status-failed { background: rgba(244, 63, 94, 0.15); color: #fca5a5; border-color: rgba(244, 63, 94, 0.3); }

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
  50% { opacity: 0.6; box-shadow: 0 0 2px rgba(245, 158, 11, 0.1); }
}

.task-description {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.55rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}


/* Tab-pill buttons (shared across BI, forecast, daily-progress sections) */
.tab-pill {
  padding: 0.28rem 0.7rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.tab-pill.active {
  background: rgba(79, 70, 229, 0.14);
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

