/* ==========================================================================
   IBN BUSINESS AI WORKFORCE — PREMIUM ENTERPRISE STYLING
   Strict IBN Brand System: Deep Navy Blue, White, Soft Blue, Light Blue-Grey.
   Curated Corporate Palette.
   ========================================================================== */

/* View active display rule */
#view-business-ai-workforce.active {
  display: block !important;
}

/* Main Container Wrapper */
.ai-workforce-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0b192c;
}

/* Header & Gateway Banner */
.ai-workforce-hero-card {
  background: linear-gradient(135deg, #071224 0%, #0b192c 60%, #172554 100%);
  border-radius: 16px;
  padding: 28px 32px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(7, 18, 36, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-workforce-hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.ai-workforce-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.ai-workforce-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #bfdbfe;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.ai-workforce-badge-pill i {
  color: #60a5fa;
  font-size: 11px;
}

.ai-workforce-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.25;
}

.ai-workforce-hero-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 0;
}

/* Gateway Bridge Actions */
.ai-workforce-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.ai-workforce-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 25, 44, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.ai-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.ai-workforce-btn-group {
  display: flex;
  gap: 10px;
}

.btn-ai-portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #3b82f6;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-ai-portal:hover {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-ai-portal-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ai-portal-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Sub-Tab Navigation Bar */
.ai-workforce-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(11, 25, 44, 0.04);
}

.ai-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.ai-tab-btn:hover {
  color: #0b192c;
  background: #f1f5f9;
}

.ai-tab-btn.active {
  color: #ffffff;
  background: #0b192c;
  border-color: #0b192c;
  box-shadow: 0 2px 6px rgba(11, 25, 44, 0.15);
}

/* Metric Cards Grid */
.ai-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .ai-metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .ai-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .ai-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.ai-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 1px 3px rgba(11, 25, 44, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 25, 44, 0.08);
}

.ai-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f4f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 15px;
}

.ai-metric-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ai-metric-value {
  font-size: 22px;
  font-weight: 800;
  color: #0b192c;
  line-height: 1.2;
}

.ai-metric-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: #2563eb;
  margin-top: 6px;
}

/* Autonomous AI Employees Fleet Cards */
.ai-section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ai-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0b192c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-section-title i {
  color: #2563eb;
}

.ai-agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 1024px) {
  .ai-agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ai-agents-grid {
    grid-template-columns: 1fr;
  }
}

.ai-agent-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(11, 25, 44, 0.04);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.ai-agent-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.ai-agent-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.ai-agent-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #0b192c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(11, 25, 44, 0.2);
}

.ai-agent-info {
  flex: 1;
}

.ai-agent-name {
  font-size: 15.5px;
  font-weight: 700;
  color: #0b192c;
  line-height: 1.25;
  margin-bottom: 2px;
}

.ai-agent-title {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 6px;
}

.ai-agent-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.ai-agent-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.ai-agent-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.ai-skill-tag {
  font-size: 11px;
  font-weight: 600;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 8px;
  border-radius: 6px;
}

.ai-agent-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

.ai-agent-footer strong {
  color: #0b192c;
}

/* Two-Column Layout: Pipeline & Activity */
.ai-dashboard-split-row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .ai-dashboard-split-row {
    grid-template-columns: 1fr;
  }
}

.ai-content-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(11, 25, 44, 0.04);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.ai-panel-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0b192c;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Funnel Visualization */
.ai-funnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-funnel-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-funnel-step-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.ai-funnel-bar-track {
  height: 9px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.ai-funnel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Task Activity Stream */
.ai-activity-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
}

.ai-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0b192c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.ai-activity-content {
  flex: 1;
}

.ai-activity-title {
  font-size: 13px;
  font-weight: 700;
  color: #0b192c;
  line-height: 1.3;
}

.ai-activity-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* Leads Table View */
.ai-leads-table-container {
  overflow-x: auto;
}

.ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.ai-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.6px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.ai-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.ai-table tr:hover td {
  background: #f8fafc;
}

.ai-lead-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.ai-stage-select {
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0b192c;
  cursor: pointer;
}

/* Interactive Chat Assistant Widget */
.ai-chat-interface-card {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(11, 25, 44, 0.05);
}

.ai-chat-messages-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.ai-chat-msg {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  position: relative;
  white-space: pre-wrap;
}

.ai-chat-msg-agent {
  align-self: flex-start;
  background: #ffffff;
  color: #0b192c;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(11, 25, 44, 0.04);
}

.ai-chat-msg-user {
  align-self: flex-end;
  background: #0b192c;
  color: #ffffff;
}

.ai-chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.ai-chat-suggestion-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-chat-suggestion-chip:hover {
  background: #2563eb;
  color: #ffffff;
}

.ai-chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}

.ai-chat-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Embedded Port 8080 Live Frame */
.ai-embed-frame-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(11, 25, 44, 0.06);
}

.ai-embed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #0b192c;
  color: #ffffff;
}

.ai-embed-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.ai-embed-iframe {
  width: 100%;
  height: 820px;
  border: none;
  background: #ffffff;
}

/* Nav Pill Badge */
.nav-ai-pill {
  font-size: 9.5px;
  font-weight: 800;
  background: #2563eb;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
}
