/**
 * Page-Specific Styles
 *
 * Contains page-specific layouts and agent dashboard styles
 * that don't belong in generic modular files.
 *
 * Load Order (set in base.html):
 * 1. core.css - Design tokens, typography
 * 2. components.css - Buttons, forms, cards, tables
 * 3. layouts.css - Containers, utilities
 * 4. widgets.css - Widget framework
 * 5. pages.css (this file) - Page-specific styles
 * 6. themes/*.css - User theme overrides
 *
 * Note: Theme files load after this file and can override variables.
 */

   Sidebar Navigation Styles
   Extracted from navbar.html template
   ============================================ */

#flock-sidebar.preload {
  visibility: hidden;
}

#flock-sidebar {
  font-family: 'Roboto', sans-serif;
}

#flock-sidebar .brand-text {
  font-family: 'Oswald', sans-serif;
}

#flock-sidebar-wrapper {
  all: initial;
}

#flock-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.3s, background-color 0.3s, color 0.3s;
  z-index: 1000;
}

#flock-sidebar.expanded {
  width: 200px;
  -background-color: #fff;
  -color: #3D4F96;
  padding: 10px;
}

#flock-sidebar .sidebar-top,
#flock-sidebar .sidebar-bottom {
  -padding: 10px;
}

#flock-sidebar .brand {
  display: flex;
  align-items: center;
}

#flock-sidebar .brand-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
}

#flock-sidebar .brand-text {
  display: none;
  -font-weight: bold;
  -font-size: 1.2em;
  margin-left: 8px;

  text-align: center;
  font-size: 30px;
  line-height: 30px;
  margin-left: 0;
  width: 100%;
}

#flock-sidebar.expanded .brand-text {
  display: inline;
}

#flock-sidebar .customer-name {
  display: none;
  font-weight: 600;
  -color: #D77052;
  margin: 10px 0 5px 40px;
  font-size: 14px;
}

#flock-sidebar.expanded .customer-name {
  display: block;
}

#flock-sidebar .customer-switch-link {
  text-decoration: none;
  transition: opacity 0.2s;

  color: #D77052;
  margin-right: -20px;
}

#flock-sidebar .customer-switch-link:hover {
  opacity: 1 !important;
}

#flock-sidebar .sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0; /* Allow flex item to shrink below content size */

  font-size: var(--font-size-small);
}

/* Placeholder agent styling - italic and reduced opacity */
#flock-sidebar .nav-item-placeholder .nav-label {
  font-style: italic;
  opacity: 0.65;
}

#flock-sidebar .nav-item-placeholder .nav-icon {
  opacity: 0.5;
}

/* Mobile-only items hidden on desktop */
#flock-sidebar .nav-item-mobile-only {
  display: none !important;
}

#flock-sidebar .nav-item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  margin: 4px 0;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#flock-sidebar .nav-item:hover {
  background-color: var(--sidebar-bg-hover);
}

#flock-sidebar.expanded .nav-item:hover {
  background-color: var(--sidebar-bg-hover);
}

/* Active/Selected Nav Item - Fortune 500: Subtle background + text weight only */
#flock-sidebar .nav-item.active,
#flock-sidebar .nav-item[aria-current="page"] {
  background-color: var(--sidebar-bg-selected);
  color: var(--sidebar-icon-active);
  font-weight: 600;
}

#flock-sidebar .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  color: var(--sidebar-icon);
}

#flock-sidebar .nav-item:hover .nav-icon {
  color: var(--sidebar-icon-active);
}

#flock-sidebar .nav-item.active .nav-icon,
#flock-sidebar .nav-item[aria-current="page"] .nav-icon {
  color: var(--sidebar-icon-active);
}

#flock-sidebar .nav-item.active .nav-label,
#flock-sidebar .nav-item[aria-current="page"] .nav-label {
  color: var(--sidebar-icon-active);
}

#flock-sidebar .nav-label {
  display: none;
  margin-left: 20px;
}

#flock-sidebar.expanded .nav-label {
  display: inline;
}


#flock-sidebar .sidebar-toggle {
  position: absolute;
  right: -20px;
  top: 50px;
  background-color: var(--sidebar-bg-hover);
  color: var(--sidebar-text);
  width: 34px;
  height: 24px;
  border-radius: 0 16px 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

#flock-sidebar.expanded .sidebar-toggle {
  background-color: var(--content-bg);
  color: var(--sidebar-bg);
}

#flock-sidebar .logout {
  margin-top: auto;
}

.sidebar-toggle .toggle-icon {
  font-size: 16px;
  margin-right: -10px;
}

#flock-sidebar.collapsed {
  align-items: center;
}

#flock-sidebar .sidebar-top {
    padding: 16px;
    border-bottom: 1px solid var(--sidebar-border);
}

#flock-sidebar.collapsed .sidebar-top {
  padding-top: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#flock-sidebar.collapsed .sidebar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#flock-sidebar.collapsed .nav-item {
  width: 100%;
  justify-content: center;
}

#flock-sidebar .sidebar-bottom {
    padding-bottom: 30px;
    font-size: var(--font-size-small);
}

#flock-sidebar.collapsed .sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#flock-sidebar.collapsed .nav-label,
#flock-sidebar.collapsed .nav-greeting,
#flock-sidebar.collapsed .customer-name {
  display: none !important;
}

#flock-sidebar.expanded .nav-label {
  display: inline;
}


#flock-sidebar.expanded .nav-greeting,
#flock-sidebar.expanded .customer-name {
  width: 100%;
  margin: 10px 0;

  text-align: center;
  display: block;
  font-size: 20px;
}

#flock-sidebar.expanded .nav-greeting {
    -color: #D77052;
    font-size: 12px;
    display: none;
}

#flock-sidebar.no-transition {
  transition: none !important;
}


@media (max-width: 768px) {
  #flock-sidebar {
    top: auto;
    bottom: 15px;
    left: 0;
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    background-color: var(--sidebar-bg);
    transition: none;
  }

  #flock-sidebar.expanded {
    width: 100%;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
  }

  #flock-sidebar .sidebar-top,
  #flock-sidebar .sidebar-bottom,
  #flock-sidebar .sidebar-toggle {
    display: none;
  }

  #flock-sidebar .sidebar-nav {
    flex: 1;
    flex-direction: row;
    justify-content: space-around;
    overflow-y: visible;
  }

  /* Hide dynamic agent items on mobile - they use the Agents list page instead */
  #flock-sidebar .nav-item-agent {
    display: none !important;
  }

  /* Show mobile-only items (Agents list link, Profile) */
  #flock-sidebar .nav-item-mobile-only {
    display: flex !important;
  }

  #flock-sidebar .nav-item {
    padding: 0;
    flex-direction: column;
    justify-content: center;
  }

  #flock-sidebar .nav-label {
    display: none !important;
  }

  #flock-sidebar .nav-icon {
    font-size: 20px;
  }
}

/* ============================================
   Tools Hub Page Styles
   ============================================ */

.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tools-hub-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #e5e7eb);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tools-hub-card:hover {
  border-color: var(--color-primary, #3b82f6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tools-hub-card-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--color-primary, #3b82f6);
  flex-shrink: 0;
}

.tools-hub-card-body {
  flex: 1;
  margin-left: 16px;
}

.tools-hub-card-body h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
}

.tools-hub-card-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
}

.tools-hub-card-arrow {
  color: var(--text-secondary, #9ca3af);
  margin-left: 12px;
  flex-shrink: 0;
}

.tools-hub-card-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   Admin Dashboard - Statistics Row
   ============================================ */

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

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

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

.admin-stat-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #e5e7eb);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
}

a.admin-stat-card:hover {
  border-color: var(--color-primary, #1a2234);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-stat-card-static {
  cursor: default;
}

.admin-stat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--content-heading, #374151);
}

.admin-stat-header i {
  font-size: 16px;
  color: var(--icon-default, #9ca3af);
}

.admin-stat-numbers {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.admin-stat-item {
  flex: 1;
}

.admin-stat-value {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--content-heading, #374151);
  line-height: 1.2;
}

.admin-stat-value-alert {
  color: var(--color-danger, #dc3545);
}

.admin-stat-label {
  font-size: 0.75em;
  color: var(--content-text-muted, #6b7280);
  margin-top: 2px;
}

/* ============================================
   Admin Dashboard - Section Header
   ============================================ */

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   Admin Dashboard - Activity List
   ============================================ */

.admin-activity-list {
  display: grid;
  gap: 8px;
}

.admin-activity-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--card-border, #e5e7eb);
  border-radius: 6px;
  transition: background-color 0.15s;
}

.admin-activity-item:hover {
  background-color: var(--bg-hover, #f9fafb);
}

.admin-activity-icon {
  margin-right: 14px;
  color: var(--icon-default, #9ca3af);
  font-size: 1.1em;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.admin-activity-content {
  flex: 1;
  min-width: 0;
}

.admin-activity-title {
  font-weight: 600;
  color: var(--content-heading, #374151);
  font-size: 14px;
}

.admin-activity-entity {
  color: var(--content-text-muted, #6b7280);
  font-weight: normal;
  font-size: 0.9em;
}

.admin-activity-details {
  color: var(--content-text-muted, #6b7280);
  font-size: 13px;
  margin-top: 2px;
}

.admin-activity-meta {
  color: var(--content-text-muted, #9ca3af);
  font-size: 12px;
  margin-top: 4px;
}

.admin-activity-meta i {
  margin-right: 3px;
}

.admin-activity-user {
  margin-left: 10px;
}

.admin-activity-user i {
  margin-right: 3px;
}

.admin-activity-link {
  color: var(--content-text-muted, #9ca3af);
  text-decoration: none;
  padding: 6px;
  margin-left: 8px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.admin-activity-link:hover {
  color: var(--color-primary, #1a2234);
}

/* Remove agent button in table rows */
.btn-remove-agent {
  color: var(--text-secondary, #9ca3af);
  opacity: 0.6;
  transition: color 0.15s, opacity 0.15s;
}
.btn-remove-agent:hover {
  color: var(--color-danger, #dc3545);
  opacity: 1;
}

/* ============================================
   Agents List Page Styles
   Extracted from agents_list.html template
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: var(--table-header-bg);
    border-bottom: 1px solid var(--table-border);
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--table-header-text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--table-border);
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: var(--content-bg);
}

.data-table td {
    padding: 15px 20px;
    vertical-align: middle;
    font-size: 14px;
}

.agent-name-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.agent-name-link:hover {
    text-decoration: underline;
}

.workflow-link {
    color: #1a2234;
    text-decoration: none;
    font-weight: 500;
}

.workflow-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge-success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-link {
    background: none;
    border: none;
    color: #1a2234;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.btn-link:hover {
    background-color: #e9ecef;
}

/* Placeholder agents table styling */
.placeholder-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.placeholder-table tbody tr {
    background-color: #fafafa;
}

.placeholder-table tbody tr:hover {
    background-color: var(--content-bg);
}

.status-badge-placeholder {
    background-color: #e9ecef;
    color: #6c757d;
}

/* NOTE: Advisor styles moved to components.css (Fortune 500 design) */

/* ============================================
   Web Content Agent Dashboard Styles (extracted from web_content_dashboard.html)
   ============================================ */

.content-container {
    display: grid;
    gap: 1.5rem;
}

.content-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    color: #4285f4;
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggestion-card {
    padding: 1rem;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background: #fafbfc;
    transition: all 0.2s;
}

.suggestion-card:hover {
    background: #f6f8fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.suggestion-goal {
    font-weight: 600;
    color: #1a73e8;
    font-size: 1.05rem;
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fee;
    color: #dc3545;
}

.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.priority-low {
    background: #e7f3ff;
    color: #004085;
}

.suggestion-action {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.suggestion-impact {
    color: #28a745;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.suggestion-details {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    margin-top: 0.75rem;
}

/* Markdown styling within suggestion-details */
.suggestion-details h1,
.suggestion-details h2,
.suggestion-details h3,
.suggestion-details h4 {
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.suggestion-details h1 { font-size: 1.5rem; }
.suggestion-details h2 { font-size: 1.3rem; }
.suggestion-details h3 { font-size: 1.1rem; }
.suggestion-details h4 { font-size: 1rem; }

.suggestion-details p {
    margin: 0.5rem 0;
}

.suggestion-details ul,
.suggestion-details ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.suggestion-details li {
    margin: 0.25rem 0;
}

.suggestion-details code {
    background: #f6f8fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85em;
}

.suggestion-details pre {
    background: #f6f8fa;
    padding: 0.75rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.suggestion-details pre code {
    background: none;
    padding: 0;
}

.suggestion-details blockquote {
    border-left: 3px solid #ddd;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #666;
}

.suggestion-details strong {
    font-weight: 600;
    color: #333;
}

.suggestion-details em {
    font-style: italic;
}

.suggestion-details a {
    color: #1a73e8;
    text-decoration: none;
}

.suggestion-details a:hover {
    text-decoration: underline;
}

.suggestion-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.status-pending {
    background: #e3f2fd;
    color: #1976d2;
}

.status-in-progress {
    background: #fff3e0;
    color: #f57c00;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.config-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.config-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.config-value {
    color: #333;
    font-family: monospace;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.goals-section {
    margin-top: 1.5rem;
}

.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.add-goal-btn {
    padding: 0.5rem 1rem;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.add-goal-btn:hover {
    background: #357ae8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    text-align: left;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4285f4;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* CIM Analysis Agent Dashboard Styles (extracted from cim_dashboard.html) */

/* Enhanced Modal Responsive Design */
@media (max-width: 1200px) {
    .modal-container {
        width: 90vw !important;
        height: 85vh !important;
        min-width: 600px !important;
    }
}

@media (max-width: 900px) {
    .modal-container {
        width: 95vw !important;
        height: 90vh !important;
        min-width: 500px !important;
        min-height: 500px !important;
    }
}

@media (max-width: 600px) {
    .modal-container {
        width: 98vw !important;
        height: 95vh !important;
        min-width: 320px !important;
        min-height: 400px !important;
        border-radius: 0 !important;
        top: 2.5vh !important;
        left: 1vw !important;
        transform: none !important;
    }

    /* Tab navigation adjustments for mobile */
    .tab-button {
        font-size: 0.85em !important;
        padding: 10px 8px !important;
    }

    .tab-button i {
        display: none !important;
    }
}

/* Modal content area improvements */
.modal-container #tab-content {
    padding: 25px;
    line-height: 1.6;
}

/* Enhanced tab styling for better UX */
/* NOTE: .tab-button.active blue border styles REMOVED - see Fortune 500 styles in lines ~4690+ */
.tab-button {
    transition: all 0.2s ease;
    border-radius: 4px 4px 0 0;
}

/* Improved content spacing and readability */
@media (min-width: 1400px) {
    .modal-container {
        max-width: 1600px !important;
    }
}

/* Print-friendly styles */
@media print {
    #document-modal {
        position: static !important;
        background-color: transparent !important;
    }

    .modal-container {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Error Recovery Modal Styles */
.retry-status {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.retry-status h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4em;
}

.retry-status h4 {
    margin: 20px 0 10px 0;
    color: #555;
    font-size: 1.1em;
}

.current-status {
    background-color: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.retry-count {
    background-color: #fff3e0;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #ff9800;
    font-size: 0.9em;
}

.retry-options {
    margin: 20px 0;
}

.retry-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.retry-option-btn {
    padding: 12px 20px;
    background-color: #1a2234;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.retry-option-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.retry-option-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.no-retry {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.error-details {
    margin: 20px 0;
}

.error-details ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.error-details li {
    background-color: #f8f9fa;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

.error-time {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
}

.recovery-suggestions {
    margin: 20px 0;
}

.recovery-suggestions ul {
    padding-left: 20px;
}

.recovery-suggestions li {
    margin: 8px 0;
    line-height: 1.4;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 10000;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-content {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2em;
    flex-shrink: 0;
}

.notification-content span {
    flex: 1;
    line-height: 1.4;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Trends Research Agent Dashboard Styles (extracted from trends_research_dashboard.html)
   ============================================ */

.research-container {
    display: grid;
    gap: 1.5rem;
}

.research-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: #8b5cf6;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Research Summary Styles */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b5cf6;
}

/* Research Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    background: #f9fafb;
    border-radius: 6px;
    padding: 1.25rem;
    border-left: 4px solid #8b5cf6;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.topic-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.relevance-badge {
    background: #8b5cf6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.topic-summary {
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.topic-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.topic-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #999;
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.source-tag {
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Configuration Summary */
.config-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.config-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.config-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.config-label {
    color: #666;
    font-size: 0.9rem;
}

.config-value {
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* ============================================
   PR Proposal Agent Dashboard Styles (extracted from pr_proposal_dashboard.html)
   ============================================ */

.proposals-container {
    display: grid;
    gap: 1.5rem;
}

.proposals-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: #8b5cf6;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Proposal Cards */
.proposal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.proposal-card {
    background: #f9fafb;
    border-radius: 6px;
    padding: 1.5rem;
    border-left: 4px solid #8b5cf6;
    transition: all 0.2s;
    cursor: pointer;
}

.proposal-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.proposal-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-idea {
    background: #dbeafe;
    color: #1e40af;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.proposal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.proposal-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.proposal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #999;
}

.proposal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.proposal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.proposal-tag {
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Summary Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 4px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #8b5cf6;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Web Analytics Agent Dashboard Styles (extracted from web_analytics_dashboard.html) */

.analytics-container {
    display: grid;
    gap: 1.5rem;
}

.analytics-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: #4285f4;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Snapshot Card Styles */
.snapshot-content {
    display: grid;
    gap: 1rem;
}

.snapshot-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.snapshot-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.rating-stars {
    color: #fbbf24;
}

/* Search Ranking Styles */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rank-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 4px;
}

.rank-term {
    flex: 1;
    color: #333;
}

.rank-position {
    font-weight: 600;
    color: #4285f4;
}

/* Geo Performance Styles */
.geo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 4px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #4285f4;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.zip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.zip-code {
    padding: 0.25rem 0.75rem;
    background: #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #333;
}

/* Weather Agent Dashboard Styles (extracted from weather_agent_dashboard.html) */

/* Forecast card hover effects */
.forecast-card:hover {
    border-color: #007bff !important;
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Weather icon mapping for common conditions */
.fa-clear-day:before { content: "\f185"; } /* sun */
.fa-clear-night:before { content: "\f186"; } /* moon */
.fa-partly-cloudy-day:before { content: "\f6c4"; } /* cloud-sun */
.fa-partly-cloudy-night:before { content: "\f6c3"; } /* cloud-moon */
.fa-cloudy:before { content: "\f0c2"; } /* cloud */
.fa-overcast:before { content: "\f0c2"; } /* cloud */
.fa-rain:before { content: "\f73d"; } /* cloud-rain */
.fa-rain-day:before { content: "\f743"; } /* cloud-sun-rain */
.fa-rain-night:before { content: "\f73d"; } /* cloud-rain */
.fa-snow:before { content: "\f2dc"; } /* snowflake */
.fa-snow-day:before { content: "\f2dc"; } /* snowflake */
.fa-snow-night:before { content: "\f2dc"; } /* snowflake */
.fa-thunderstorm:before { content: "\f76c"; } /* bolt */
.fa-thunderstorm-day:before { content: "\f76c"; } /* bolt */
.fa-thunderstorm-night:before { content: "\f76c"; } /* bolt */
.fa-fog:before { content: "\f75f"; } /* smog */
.fa-fog-day:before { content: "\f75f"; } /* smog */
.fa-fog-night:before { content: "\f75f"; } /* smog */
.fa-unknown:before { content: "\f059"; } /* question-circle */

/* ========================================
   CRM Dashboard Inline Style Replacements
   (Phase 2.2 - Inline Style Elimination)
   ======================================== */

/* Layout Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

/* Text Utilities */
.text-muted {
    color: var(--color-text-muted);
}

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

.text-danger {
    color: var(--color-danger);
}

/* NOTE: .text-sm, .text-xs, .font-semibold, .text-center, .text-uppercase
   are now defined in the Typography System section (lines 164-277) */

/* Form Sections */
.form-section {
    margin-bottom: 30px;
}

.form-section-header-required {
    color: var(--color-danger);
    border-bottom: 2px solid var(--color-danger);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.form-section-header-optional {
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-text-secondary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-category-header {
    color: #666;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Search Form */
.header-search-form-full {
    width: 100%;
    font-size: 14px;
    margin: 0;
}

.header-select-narrow {
    flex: 0 1 120px;
}

/* Select Option Styling */
.select-option-primary {
    background: var(--color-primary);
    color: white;
}

/* Pagination */
.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Empty State */
.empty-state-container {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.fallback-message {
    padding: 40px;
    text-align: center;
    color: var(--color-text-muted);
}

.fallback-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* Completeness Display */
.completeness-display {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
}

.completeness-bar-container {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    margin-top: 10px;
}

.completeness-bar {
    height: 100%;
    background-color: var(--color-success);
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Result Count Badge */
.result-count-badge {
    min-width: 200px;
}

/* Type Breakdown List */
.type-breakdown-list {
    font-size: 0.9em;
    color: #333;
}

.type-breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

/* ========================================
   Fact Edit Form Styles
   (Phase 2.2 - Inline Style Elimination)
   ======================================== */

/* Container */
.container-medium {
    max-width: 800px;
    margin: 0 auto;
}

/* Page Header */
.page-header-simple {
    margin-bottom: 24px;
}

.page-header-simple h1 {
    color: var(--color-primary);
    margin: 0 0 8px 0;
}

.page-header-simple p {
    color: var(--color-text-secondary);
    margin: 0;
}

/* Form Card */
.form-card {
    background: white;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Fields - Override defaults for simpler inline-style compatibility */
.form-field {
    margin-bottom: 24px;
}

.form-field-lg {
    margin-bottom: 32px;
}

.form-label-simple {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-input-simple {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-input-simple:focus {
    border-color: var(--color-primary);
    outline: none;
}

.form-textarea-json {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
}

.form-helper-text {
    color: var(--color-text-secondary);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.required-indicator {
    color: var(--color-danger);
}

/* Form Actions */
.form-actions-bordered {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.btn-icon-left {
    margin-right: 8px;
}

.ml-auto {
    margin-left: auto;
}

/* Additional Spacing Utilities */
.mb-32 {
    margin-bottom: 32px;
}

.mr-8 {
    margin-right: 8px;
}

/* ========================================
   MFA Requirement Banner (base.html)
   (Phase 2.2 - Inline Style Elimination)
   ======================================== */

/* Base Banner Styles */
.mfa-banner {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Banner Variants - Based on Grace Days */
.mfa-banner-critical {
    background-color: #dc3545;
    color: white;
}

.mfa-banner-urgent {
    background-color: #ff6b6b;
    color: white;
}

.mfa-banner-warning {
    background-color: #ffc107;
    color: #856404;
}

/* Banner Icon */
.mfa-banner-icon {
    font-size: 24px;
}

/* Banner Content */
.mfa-banner-content {
    flex: 1;
}

.mfa-banner-title {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Banner Action Button */
.mfa-banner-button {
    padding: 10px 20px;
    background-color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.mfa-banner-critical .mfa-banner-button,
.mfa-banner-urgent .mfa-banner-button {
    color: #dc3545;
}

.mfa-banner-warning .mfa-banner-button {
    color: #856404;
}

/* ========================================
   Compact Agent Card (Dashboard)
   REMOVED: Styles moved to components.css with Fortune 500 styling
   ======================================== */

/* ========================================
   Workflow Column Headers
   (Inline Style Conversion)
   ======================================== */

.workflow-column-header {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.workflow-column-header-learn {
    background-color: #4CAF50;
}

.workflow-column-header-think {
    background-color: #2196F3;
}

.workflow-column-header-do {
    background-color: #FF9800;
}

.workflow-column-header-agents {
    background-color: #1a2234; /* Primary blue */
}

.workflow-column-header h3 {
    margin: 0;
    font-size: 18px;
    color: white; /* CRITICAL: Override default heading color */
    font-weight: 600;
}

.workflow-header-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   CIM Dashboard Components
   (Inline Style Conversion)
   ======================================== */

/* Loading States */
.loading-container {
    text-align: center;
    padding: 60px;
    color: #666;
}

.loading-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: #1a2234;
}

.loading-icon-sm {
    font-size: 2em;
    color: #007bff;
}

.loading-text {
    margin: 0;
    font-size: 1.1em;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    padding: 0 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Tab Buttons - Fortune 500 Style (neutral colors) */
.tab-button {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--content-text-muted, #6b7280);
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-button i {
    color: var(--icon-default, #9ca3af);
    margin-right: 6px;
}

.tab-button:hover {
    background-color: var(--content-bg, #f5f7fa);
    color: var(--content-heading, #374151);
}

.tab-button:hover i {
    color: var(--content-text-muted, #6b7280);
}

.tab-button.active {
    border-bottom-color: var(--accent-primary, #1a2234);
    color: var(--content-heading, #374151);
}

.tab-button.active i {
    color: var(--content-heading, #374151);
}

/* Upload Progress - Fortune 500 Style (light background) */
.upload-progress-bar-container {
    padding: 12px 20px;
    background-color: var(--accent-info-light, #e0f2fe);
    border-bottom: 1px solid var(--content-border, #e5e7eb);
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.upload-progress-label {
    font-weight: 500;
    font-size: 0.85em;
    color: var(--badge-info-text, #075985);
}

.upload-progress-percent {
    font-size: 0.85em;
    color: var(--badge-info-text, #075985);
}

.upload-progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--content-border, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background-color: var(--accent-info, #0284c7);
    width: 0%;
    transition: width 0.3s ease;
}

.upload-message {
    padding: 12px 20px;
    font-size: 0.9em;
    border-bottom: 1px solid var(--content-border, #e5e7eb);
    border-left: 4px solid transparent;
}

.upload-message-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.upload-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* CIM Info Panels */
.cim-info-panel {
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cim-info-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cim-info-value {
    color: #333;
}

/* CIM Debug Panel */
.cim-debug-panel {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8em;
}

.cim-debug-panel-warning {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
}

.cim-debug-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.cim-debug-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    color: #666;
}

.cim-debug-value {
    color: #333;
    font-weight: 500;
}

/* CIM Section Header */
.cim-section-header {
    margin: 0 0 25px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cim-section-header i {
    color: #1a2234;
}

/* CIM Highlighted Box */
.cim-highlight-box {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1a2234;
}

/* CIM Edit Controls */
.cim-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.cim-edit-label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cim-edit-display {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

.cim-edit-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #1a2234;
    border-radius: 4px;
    font-size: 1em;
    margin-bottom: 10px;
}

/* CIM Grid Layouts */
.cim-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* CIM Action Buttons in Rows */
.cim-action-row {
    display: flex;
    gap: 10px;
}

/* CIM Timestamp Display */
.cim-timestamp {
    color: #999;
    margin-left: 8px;
}

/* CIM Alert Boxes */
.cim-alert {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 4px;
    color: white;
}

.cim-alert-error {
    background-color: #dc3545;
}

.cim-alert-warning {
    background-color: #ffc107;
    color: #333;
}

.cim-alert-info {
    background-color: #17a2b8;
}

/* CIM Status Pills */
.cim-status-pill {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
}

.cim-status-active {
    background-color: #28a745;
    color: white;
}

.cim-status-inactive {
    background-color: #6c757d;
    color: white;
}

/* CIM Small Action Buttons */
.cim-btn-small {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.cim-btn-edit {
    padding: 6px 12px;
    background-color: #1a2234;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.cim-btn-refresh {
    padding: 6px 12px;
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cim-btn-save {
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.cim-btn-cancel {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* CIM Refresh Indicator */
.cim-refresh-indicator {
    font-size: 0.75em;
    background-color: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* CIM Result States */
.cim-result-newer {
    color: #28a745;
    font-weight: 600;
}

.cim-result-older {
    color: #dc3545;
    font-weight: 600;
}

.cim-result-missing {
    color: #ffc107;
}

/* CIM Upload Form */
.cim-upload-form {
    flex-wrap: nowrap;
    width: 100%;
    font-size: 14px;
    margin: 0 0 0 100px;
}

.cim-file-input {
    flex: 1 1 250px;
    min-width: 200px;
}

.cim-filter-label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: 10px;
}

.cim-filter-select {
    flex: 0 1 auto;
}

/* CIM Modal Styles - Fortune 500 Style */
.cim-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.cim-modal-overlay-high {
    z-index: 2000;
}

.cim-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--content-card-bg, white);
    border-radius: var(--radius-lg, 8px);
    overflow: hidden;
    box-shadow: var(--shadow-lg, 0 8px 16px rgba(0,0,0,0.15));
    display: flex;
    flex-direction: column;
}

/* Large modal - 90% of viewport for more content space */
.cim-modal-xl {
    width: 90vw;
    height: 90vh;
    max-width: 1600px;
    min-width: 800px;
    min-height: 600px;
}

.cim-modal-md {
    width: 90vw;
    max-width: 600px;
    max-height: 80vh;
}

/* Modal Header - Fortune 500: Clean, no gradient */
.cim-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--content-border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background-color: var(--content-card-bg, white);
}

.cim-modal-header-gray {
    background-color: var(--content-bg, #f5f7fa);
}

.cim-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--content-heading, #374151);
}

.cim-modal-close {
    background: none;
    border: none;
    font-size: 1.25em;
    cursor: pointer;
    color: var(--content-text-muted, #6b7280);
    padding: 4px 8px;
    border-radius: var(--radius-sm, 4px);
    transition: all 0.2s;
}

.cim-modal-close:hover {
    color: var(--content-heading, #374151);
    background-color: var(--content-bg, #f5f7fa);
}

.cim-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--content-bg, #f5f7fa);
}

.cim-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--content-border, #e5e7eb);
    background-color: var(--content-card-bg, white);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* CIM Tab Bar - Fortune 500 Style */
.cim-tab-container {
    border-bottom: 1px solid var(--content-border, #e5e7eb);
    flex-shrink: 0;
}

.cim-tab-bar {
    display: flex;
    padding: 0 20px;
    background-color: var(--content-card-bg, white);
}

/* CIM Button - Fix Link */
.cim-btn-fix {
    padding: 6px 12px;
    background-color: white;
    color: #dc3545;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
}

.cim-btn-fix:hover {
    background-color: #f8f9fa;
}

/* CIM Opportunity Container */
.cim-opportunity-container {
    min-width: 300px;
}

/* CIM Toggle Buttons */
.cim-btn-toggle-off {
    padding: 4px 8px;
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.cim-btn-toggle-on {
    padding: 4px 8px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.cim-btn-edit-small {
    padding: 4px 8px;
    background-color: #1a2234;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

/* CIM Card Panels */
.cim-card {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cim-card-title {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cim-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CIM Matchmaking Score Cards */
.cim-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.cim-score-card {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1a2234;
}

.cim-score-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.cim-score-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.cim-score-text {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

/* CIM Confidence Badges */
.cim-confidence-badge {
    font-size: 0.7em;
    padding: 3px 8px;
    color: white;
    border-radius: 12px;
    white-space: nowrap;
}

.cim-confidence-high {
    background-color: #28a745;
}

.cim-confidence-medium {
    background-color: #ffc107;
    color: #333;
}

.cim-confidence-low {
    background-color: #dc3545;
}

/* CIM Info Box */
.cim-info-box {
    margin-top: 15px;
    padding: 12px;
    background-color: #e7f3ff;
    border-radius: 6px;
    border-left: 3px solid #0066cc;
}

.cim-info-box-content {
    display: flex;
    align-items: start;
    gap: 10px;
}

.cim-info-box-icon {
    color: #0066cc;
    margin-top: 2px;
}

.cim-info-box-text {
    font-size: 0.9em;
    color: #004080;
}

/* CIM Empty State Box */
.cim-empty-box {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.cim-empty-content {
    display: flex;
    align-items: start;
    gap: 12px;
}

/* CIM Extracted Timestamp */
.cim-extracted-time {
    font-size: 0.8em;
    color: #999;
}

/* CIM Empty State */
.cim-empty-icon {
    color: #6c757d;
    font-size: 1.5em;
    margin-top: 4px;
}

.cim-empty-title {
    margin: 0 0 8px 0;
    color: #495057;
}

.cim-empty-text {
    margin: 0 0 12px 0;
    color: #6c757d;
    font-size: 0.95em;
}

/* CIM Source Panel */
.cim-source-panel {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.cim-source-header {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cim-source-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    font-size: 0.95em;
}

.cim-source-label {
    font-weight: 500;
    color: #666;
}

.cim-source-id {
    color: #666;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
}

/* CIM No Opportunity State */
.cim-no-opportunity {
    text-align: center;
    padding: 60px 20px;
}

.cim-no-opportunity-icon {
    font-size: 4em;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.cim-no-opportunity-title {
    margin: 0 0 15px 0;
    color: #666;
}

.cim-no-opportunity-text {
    margin: 0 0 25px 0;
    color: #999;
}

.cim-note-box {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    color: #666;
    font-size: 0.95em;
}

/* ========================================
   CRM Profile Components
   (Inline Style Conversion)
   ======================================== */

/* CRM Tab Container */
.crm-tab-container {
    background-color: white;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.crm-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--content-border, #e5e7eb);
}

.crm-tab-button {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    color: var(--content-text-muted, #6b7280);
    transition: all 0.2s ease;
}

.crm-tab-button:hover {
    background-color: var(--content-bg, #f5f7fa);
    color: var(--content-heading, #374151);
}

.crm-tab-button.active {
    border-bottom-color: var(--accent-primary, #1a2234);
    color: var(--accent-primary, #1a2234);
}

.crm-tab-content-container {
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    min-height: 500px;
}

/* CRM Section Headers */
.crm-section-header {
    color: var(--content-heading, #374151);
    border-bottom: 1px solid var(--content-border, #e5e7eb);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.crm-section-header i {
    margin-right: 8px;
}

/* CRM Required Field Marker */
.crm-required-marker {
    color: #dc3545;
    margin-left: 4px;
}

/* CRM Section Spacing */
.crm-section {
    margin-bottom: 40px;
}

/* CRM Notes */
.crm-notes-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.crm-note-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #1a2234;
}

.crm-note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85em;
    color: #666;
}

.crm-note-type {
    background-color: #1a2234;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85em;
}

.crm-note-content {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ── Notes/emails feed: collapsible cards ── */
.crm-feed-card .crm-note-meta { margin-bottom: 8px; }
.crm-feed-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a2234;
}
.crm-feed-toggle { color: #888; }
.crm-feed-chevron { transition: transform 0.15s ease; }
.crm-feed-card.collapsed .crm-feed-chevron { transform: rotate(180deg); }
.crm-feed-card.collapsed .crm-feed-body { display: none; }
.crm-feed-card.collapsed .crm-feed-title { margin-bottom: 0; }

/* Emails: teal accent to distinguish from notes (navy). */
.crm-email-card { border-left-color: #17a2b8; }
.crm-email-card.collapsed { opacity: 0.9; }
.crm-email-addr { margin-bottom: 6px; }
.crm-feed-lowpri {
    display: inline-block;
    background-color: #e9ecef;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 500;
}

/* CRM Empty State */
.crm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.crm-empty-icon {
    font-size: 4em;
    color: #ccc;
    margin-bottom: 20px;
}

.crm-empty-title {
    margin: 0 0 15px 0;
    color: #666;
}

.crm-empty-text {
    margin: 0;
    color: #999;
}

/* CRM Field Values */
.crm-field-unit {
    color: #666;
    margin-left: 4px;
}

.crm-not-set {
    color: #999;
    font-style: italic;
}

/* CRM Primary Badge */
.badge-primary-small {
    display: inline-block;
    padding: 2px 6px;
    background-color: #1a2234;
    color: white;
    font-size: 0.7em;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 600;
}

/* Button Icon Variants */
.btn-icon-primary {
    padding: 6px 12px;
    background-color: #1a2234;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-icon-primary:hover {
    background-color: #2a3a7a;
    color: white;
}

.btn-icon-danger {
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-icon-danger:hover {
    background-color: #c82333;
}

/* Badge Variants */
.badge-info-pill {
    display: inline-block;
    padding: 2px 8px;
    background-color: #17a2b8;
    color: white;
    font-size: 0.9em;
    border-radius: 10px;
    margin-left: 5px;
}

.badge-warning-pill {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f97316;
    color: white;
    font-size: 0.9em;
    border-radius: 10px;
    margin-left: 5px;
}

/* Button Size Variants */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.85em !important;
}

/* Flex Utilities */
.flex-1 {
    flex: 1;
}

.gap-10 {
    gap: 10px;
}

/* CRM Progress Indicator */
.crm-progress-indicator {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

/* CRM Category Header */
.crm-category-header {
    color: #1a2234;
    border-bottom: 2px solid #1a2234;
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: capitalize;
}

/* CRM Metric Card */
.crm-metric-card {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #dee2e6;
}

.crm-metric-card-populated {
    border-left-color: #28a745;
}

.crm-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.crm-metric-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.crm-metric-name {
    color: #333;
    font-size: 1.05em;
    font-weight: 600;
}

.crm-metric-description {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
}

.crm-metric-response {
    background-color: white;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
}

.crm-metric-response-label {
    color: #333;
    margin-bottom: 8px;
}

.crm-metric-source {
    font-size: 0.85em;
    color: #666;
}

.crm-metric-empty {
    color: #999;
    font-style: italic;
    margin-top: 5px;
}

/* Status Badge Variants */
.badge-status {
    display: inline-block;
    padding: 2px 8px;
    color: white;
    font-size: 0.75em;
    border-radius: 10px;
    font-weight: 600;
}

.badge-verified {
    background-color: #28a745;
}

.badge-ai {
    background-color: #6c757d;
}

.badge-manual {
    background-color: #17a2b8;
}

.badge-populated {
    background-color: #28a745;
}

.badge-empty {
    background-color: #ffc107;
    color: #333;
}

/* Badge Filled Variants (solid background) */
.badge-success-filled {
    background-color: #28a745;
    color: white;
}

.badge-info-filled {
    background-color: #17a2b8;
    color: white;
}

.badge-danger-filled {
    background-color: #dc3545;
    color: white;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.badge-lg {
    padding: 8px 16px;
    font-size: 0.85em;
}

/* CRM Section Title */
.crm-section-title {
    color: var(--content-heading, #374151);
    border-bottom: 1px solid var(--content-border, #e5e7eb);
    padding-bottom: 10px;
    margin: 0;
    flex: 1;
}

.crm-section-header-action {
    float: right;
    margin-top: -5px;
}

/* CRM Metric Actions */
.crm-metric-actions {
    display: flex;
    gap: 5px;
    margin-left: 15px;
}

/* CRM Matches Table */
.crm-matches-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.crm-matches-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #1a2234;
}

.crm-matches-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

.crm-matches-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* CRM Score Large */
.crm-score-large {
    font-size: 1.5em;
    font-weight: 700;
}

/* Empty State Message Narrow */
.empty-state-message-narrow {
    max-width: 600px;
    margin: 0 auto;
}

/* Button Action Small */
.btn-action-sm {
    padding: 8px 14px;
    white-space: nowrap;
}

/* Button Action Info (teal) - Updated for Fortune 500 design */
.btn-action-info {
    background-color: var(--accent-info);
    color: white;
}

.btn-action-info:hover {
    background-color: #0369a1;
}

/* ========================================
   Configuration Page Components
   (Inline Style Conversion)
   ======================================== */

/* Config Section Header */
.config-section-header {
    margin-bottom: 25px;
}

.config-section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-section-title {
    color: #1a2234;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-section-title-purple {
    color: #6f42c1;
}

.config-section-title-info {
    color: #17a2b8;
}

.config-section-subtitle {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.95em;
}

.config-section-hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 10px 0 0 0;
}

/* Legacy color variants - kept for backwards compatibility but discouraged */
/* Fortune 500 design: use neutral dividers, not colored ones */
.config-section-hr-purple {
    background: #e5e7eb;
}

.config-section-hr-info {
    background: #e5e7eb;
}

/* Config Label */
.config-label {
    font-weight: 600;
    color: #333;
    padding-top: 8px;
    text-align: right;
}

/* Config Panel */
.config-panel {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.config-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.config-panel-actions {
    margin-top: auto;
    padding-top: 15px;
}

.config-panel-title {
    margin-top: 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-panel-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Config Form Actions */
.config-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid #e1e5e9;
}

/* Config Table */
.config-table {
    width: 100%;
    border-collapse: collapse;
}

.config-table thead tr {
    background-color: #f8f9fa;
    border-bottom: 2px solid #1a2234;
}

.config-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #495057;
}

.config-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

/* Form Error */
.form-input-error {
    border-color: #dc3545 !important;
}

.form-error {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Form Checkbox Large */
.form-checkbox-lg {
    width: 18px;
    height: 18px;
}

/* Form Input File */
.form-input-file {
    padding: 10px;
    border: 1px solid #ddd;
}

/* Button Full Width */
.btn-full-width {
    width: 100%;
}

/* Table Empty State */
.table-empty-state {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* Badge System */
.badge-system {
    display: inline-block;
    padding: 2px 6px;
    background-color: #6c757d;
    color: white;
    border-radius: 8px;
    font-size: 0.7em;
    margin-left: 5px;
}

/* Badge Type */
.badge-type {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e7f3ff;
    color: #0056b3;
    border-radius: 12px;
    font-size: 0.85em;
}

/* Badge Category */
.badge-category {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 12px;
    font-size: 0.85em;
}

/* Text Muted Light */
.text-muted-light {
    color: #dee2e6;
}

/* Font Mono */
.font-mono {
    font-family: monospace;
}

/* Button Icon Disabled */
.btn-icon-disabled {
    padding: 6px 12px;
    background-color: #dee2e6;
    color: #999;
    border: none;
    border-radius: 4px;
    cursor: not-allowed;
}

/* Gap 12 */
.gap-12 {
    gap: 12px;
}

/* Font Weight Medium */
.font-weight-medium {
    font-weight: 500;
}

/* Form Input Short */
.form-input-short {
    width: 200px;
}

/* Form Input Suffix */
.form-input-suffix {
    margin-left: 10px;
    color: #666;
}

/* Config Toolbar */
.config-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.config-toolbar-description {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

.config-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Config Category Tabs */
.config-category-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e1e5e9;
}

/* Config Field Lists */
.config-field-lists {
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background-color: #f8f9fa;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

/* Button Action Purple */
.btn-action-purple {
    background-color: #6f42c1;
    color: white;
}

.btn-action-purple:hover {
    background-color: #5a32a3;
}

/* Button Action Yellow */
.btn-action-yellow {
    background-color: #ffc107;
    color: #333;
}

.btn-action-yellow:hover {
    background-color: #e0a800;
}

/* ========================================
   Phase 3: Design System Components
   ======================================== */

/* Section Heading with Icon */
.section-heading {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading-lg {
    font-size: 1.3em;
}

.section-heading-primary {
    color: #1a2234;
}

.section-heading-underline {
    border-bottom: 2px solid #1a2234;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Page Title (h1 with icon) */
.page-title {
    margin: 0;
    color: #333;
    font-size: 2em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title-icon {
    color: #1a2234;
}

/* Card Section Title */
.card-section-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3em;
}

/* Empty State Title */
.empty-state-title {
    color: #333;
    margin-bottom: 15px;
}

.empty-state-title-muted {
    color: #6c757d;
}

/* Detail Label/Value Pattern */
.detail-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.detail-value {
    color: #666;
}

.detail-value-multiline {
    line-height: 1.5;
}

/* Padding Top */
.pt-20 {
    padding-top: 20px;
}

/* Card with Gradient Header */
.card-gradient {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-gradient-header {
    background: linear-gradient(135deg, #1a2234, #5a73d4);
    color: white;
    padding: 20px;
}

.card-gradient-body {
    padding: 25px;
}

/* Status Indicator */
.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-error {
    color: #dc3545;
    font-weight: 600;
}

.status-label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.status-value {
    font-weight: 500;
}

/* Status Grid - responsive grid layout for agent status info */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Info List - styled list for information sections */
.info-list {
    margin: 10px 0;
    padding-left: 20px;
    line-height: 1.6;
}

.info-list li {
    margin-bottom: 6px;
}

/* Card Gradient Header Variants */
.card-gradient-header-green {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.card-gradient-header-purple {
    background: linear-gradient(135deg, #007bff, #6f42c1);
}

/* Error Alert Box */
.error-alert {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
}

.error-alert-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.error-alert-message {
    flex: 1;
}

.error-alert-title {
    color: #721c24;
    font-weight: 600;
}

.error-alert-text {
    color: #721c24;
    margin-top: 5px;
}

/* Recovery/Status Message Box */
.status-message-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.action-message-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

/* Weather Display Styles */
.weather-current-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: center;
}

.weather-temp-display {
    text-align: center;
}

.weather-temp-large {
    font-size: 3.5em;
    font-weight: 300;
    color: #333;
    margin-bottom: 10px;
}

.weather-condition {
    font-size: 1.2em;
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
}

.weather-icon-large {
    font-size: 2em;
    color: #ffc107;
    margin-top: 10px;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.weather-detail-item label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.weather-detail-value {
    font-weight: 600;
    font-size: 1.1em;
}

.weather-detailed-forecast {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.weather-detailed-forecast strong {
    color: #333;
}

.weather-detailed-forecast div {
    color: #666;
    margin-top: 5px;
}

/* Forecast Cards */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.forecast-card {
    text-align: center;
    padding: 20px;
    border: 2px solid #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
    background-color: #fdfdfd;
}

.forecast-card:hover {
    border-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.forecast-day {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.forecast-icon {
    font-size: 1.8em;
    color: #ffc107;
    margin: 10px 0;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.forecast-high {
    font-weight: 600;
    color: #dc3545;
}

.forecast-low {
    color: #6c757d;
}

.forecast-description {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
}

/* Data Source Footer */
.data-source-footer {
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.data-source-footer .update-time {
    margin-top: 5px;
}

/* Empty State Card */
.empty-state-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.empty-state-content {
    padding: 60px;
    text-align: center;
}

.empty-state-icon-large {
    font-size: 4em;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state-title {
    color: #333;
    margin-bottom: 15px;
}

.empty-state-text {
    color: #666;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Service Logo/Icon in Header */
.service-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
}

.service-icon-success {
    color: #28a745;
}

/* Dynamic Message States (for JavaScript-set messages) */
.message-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message-success strong {
    color: #155724;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message-error strong {
    color: #721c24;
}

.message-detail {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* ============================================
   CIM Dashboard Specific Styles
   ============================================ */

/* Info Panel */
.info-panel {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.info-panel-header {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Metadata Item */
.meta-item-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item-value {
    color: #666;
}

.meta-item-value-mono {
    color: #666;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
}

/* Job Table */
.job-table-container {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.job-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: white;
}

.job-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    background-color: #f8f9fa;
}

.job-table td {
    padding: 12px;
}

.job-table tr {
    border-bottom: 1px solid #f1f3f4;
}

.job-type-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-type-name {
    font-weight: 500;
}

.job-type-id {
    font-size: 0.8em;
    color: #666;
    font-family: monospace;
    margin-top: 2px;
}

.job-status-text {
    font-weight: 500;
    text-transform: capitalize;
}

.job-time-cell {
    color: #666;
    font-size: 0.85em;
}

.job-error-detail {
    color: #dc3545;
    font-size: 0.8em;
    margin-top: 4px;
}

.job-warning-detail {
    color: #ffc107;
    font-size: 0.8em;
    margin-top: 4px;
}

/* Section Header with Border */
.section-title-border {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-title-flex {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-count {
    color: #666;
    font-size: 0.8em;
    font-weight: 400;
    margin-left: auto;
}

/* Content Card */
.content-card {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.content-card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.content-card-header h6 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-card-body {
    padding: 20px;
}

/* Detail Field */
.detail-field {
    margin-bottom: 15px;
}

.detail-field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.detail-field-value {
    color: #666;
    line-height: 1.6;
    white-space: break-spaces;
}

/* Table Controls Bar */
.table-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.table-controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.table-controls-text {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Data Table Styles */
.data-table-wrapper {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.data-table-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table-title h6 {
    margin: 0;
    color: #333;
}

.data-table-meta {
    color: #666;
    font-size: 0.85em;
    margin-top: 3px;
}

.data-table-type {
    color: #007bff;
    font-size: 0.85em;
    margin-top: 3px;
}

.data-table-row-count {
    color: #666;
    font-size: 0.85em;
}

.data-table-pagination-bar {
    padding: 10px 15px;
    background-color: #fefefe;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table-pagination-info {
    color: #666;
    font-size: 0.85em;
}

.data-table-scroll {
    overflow-x: auto;
    padding: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.data-table th {
    text-align: left;
    padding: 10px;
    border: 1px solid #e9ecef;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
    background-color: #f8f9fa;
}

.data-table th .sort-icon {
    margin-left: 5px;
    color: #ccc;
    font-size: 0.8em;
}

.data-table td {
    padding: 10px;
    border: 1px solid #e9ecef;
    color: #333;
}

/* Icon Colors */
.icon-primary { color: #007bff; }
.icon-danger { color: #dc3545; }
.icon-success { color: #28a745; }
.icon-warning { color: #ffc107; }
.icon-muted { color: #6c757d; }

/* Empty State in Content Area */
.content-empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.content-empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Small Buttons for Tables */
.btn-table {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-table-primary {
    background-color: #1a2234;
    color: white;
}

.btn-table-success {
    background-color: #28a745;
    color: white;
}

.btn-table-secondary {
    background-color: var(--btn-secondary-bg, #e5e7eb);
    color: var(--btn-secondary-text, #374151);
}

.btn-table-secondary:hover {
    background-color: var(--btn-secondary-bg-hover, #d1d5db);
}

/* Table header with subtext on second line */
.th-with-subtext {
    line-height: 1.2;
}

.th-subtext {
    display: block;
    font-size: 0.75em;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 2px;
}

.btn-table-sm {
    padding: 4px 8px;
    font-size: 0.8em;
}

.btn-table:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Text Viewer Styles */
.text-viewer-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.text-viewer-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.text-viewer-meta {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.text-viewer-meta-warning {
    color: #ffc107;
}

.text-viewer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-viewer-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.85em;
}

.search-results-info {
    color: #666;
    font-size: 0.85em;
    min-width: 120px;
}

.search-navigation {
    display: none;
    align-items: center;
    gap: 5px;
}

.text-viewer-container {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.text-viewer-content {
    padding: 25px;
    overflow-y: auto;
    position: relative;
}

.text-viewer-content-sm {
    max-height: 500px;
}

.text-viewer-content-lg {
    max-height: 600px;
}

.text-viewer-pre {
    margin: 0;
    white-space: pre-wrap;
    color: #333;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.text-viewer-footer {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Generating/Loading States */
.generating-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

.generating-state-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #007bff;
}

.generating-state-hint {
    font-size: 0.9em;
    color: #999;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px;
    color: #dc3545;
}

.error-state-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

/* Intake Form Styles */
.intake-empty-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

.intake-empty-icon {
    font-size: 3em;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ============================================
   Matchmaking Dashboard Styles
   ============================================ */

/* Progress Indicator (Matchmaking-specific override) */
#matching-progress.progress-indicator {
    display: none !important;  /* Override components.css default */
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: var(--accent-info-light, #e0f2fe);
    border-radius: 6px;
    border-left: 4px solid var(--accent-info, #0284c7);
}

.progress-indicator-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-indicator-icon {
    color: var(--accent-info, #0284c7);
    font-size: 1.5em;
}

.progress-indicator-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.progress-indicator-subtitle {
    font-size: 0.9em;
    color: #666;
}

/* Alert Error Content */
.alert-error-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-error-icon {
    font-size: 1.5em;
    color: #dc3545;
    margin-top: 2px;
}

.alert-error-body {
    flex: 1;
}

.alert-error-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.alert-error-message {
    margin-bottom: 12px;
    color: #721c24;
}

.alert-error-actions {
    display: flex;
    gap: 10px;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* Badge Variants */
.badge-warning-count {
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-left: 4px;
}

/* Match Count Cells - Using 4-color heatmap scale from core.css */
.match-count-cell {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

/* Strong (75-100%): Emerald Green - var(--heatmap-strong) */
.match-count-strong {
    background-color: #ecfdf5;
    color: var(--heatmap-strong, #059669);
}

/* Warm (50-74%): Golden Yellow - var(--heatmap-warm) */
.match-count-warm {
    background-color: #fefce8;
    color: var(--heatmap-warm, #ca8a04);
}

/* Weak (25-49%): Orange - var(--heatmap-weak) */
.match-count-weak {
    background-color: #fff7ed;
    color: var(--heatmap-weak, #ea580c);
}

/* Unprocessed: Neutral gray */
.match-count-unprocessed {
    background-color: var(--bg-tertiary, #f3f4f6);
    color: var(--text-muted, #6b7280);
}

/* Accepted: Same as Strong (green) */
.match-count-accepted {
    background-color: #ecfdf5;
    color: var(--heatmap-strong, #059669);
}

/* Rejected: Red - var(--heatmap-poor) */
.match-count-rejected {
    background-color: #fef2f2;
    color: var(--heatmap-poor, #dc2626);
}

/* Empty: Very subtle */
.match-count-empty {
    background-color: var(--bg-tertiary, #f8f9fa);
    color: var(--text-muted, #9ca3af);
}

/* Match Table */
.match-table th {
    padding: 12px;
    font-weight: 600;
    color: #495057;
}

.match-table th.text-center {
    text-align: center;
}

.match-table th.text-left {
    text-align: left;
}

.match-table th.color-success { color: #28a745; }
.match-table th.color-info { color: #17a2b8; }
.match-table th.color-warning { color: #ffc107; }
.match-table th.color-secondary { color: #6c757d; }

.match-table th.border-left-primary {
    border-left: 2px solid #1a2234;
}

.match-table td {
    padding: 12px;
}

.match-table td.border-left {
    border-left: 2px solid #e9ecef;
}

.match-table-subheader th {
    padding: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.85em;
}

/* Opportunity Name Cell */
.opportunity-name {
    font-weight: 600;
    color: #333;
}

/* Stats timestamp */
.stats-timestamp {
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

/* ============================================
   Status Indicator Cards
   ============================================ */

.status-indicator-card {
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.status-indicator-success {
    background-color: #d4edda;
    border-left-color: #28a745;
}

.status-indicator-success .status-indicator-header i {
    color: #28a745;
}

.status-indicator-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.status-indicator-error .status-indicator-header i {
    color: #dc3545;
}

.status-indicator-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.status-indicator-warning .status-indicator-header i {
    color: #ffc107;
}

.status-indicator-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.status-indicator-text {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* ============================================
   Section Header Variants
   ============================================ */

.section-header-error h3 {
    color: #dc3545;
}

/* ============================================
   Error Panel
   ============================================ */

.error-panel {
    padding: 20px;
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #e53e3e;
    line-height: 1.6;
}

/* ============================================
   Chat Interface Styles
   ============================================ */

.chat-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.chat-history {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background-color: #fafafa;
}

.chat-message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.chat-message-user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 14px;
}

.chat-avatar-success {
    background-color: #28a745;
}

.chat-avatar-primary {
    background-color: #1a2234;
}

.chat-bubble {
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: 80%;
}

.chat-bubble-assistant {
    background-color: white;
    border-radius: 15px 15px 15px 5px;
}

.chat-bubble-user {
    background-color: #e3f2fd;
    border-radius: 15px 15px 5px 15px;
}

.chat-bubble p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.chat-input-section {
    padding: 20px;
    background-color: white;
    border-top: 1px solid #ddd;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

.chat-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.chat-input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.btn-chat-send {
    border-radius: 25px;
    padding: 12px 20px;
}

/* ============================================
   Stat Card Additions
   ============================================ */

.stat-card-description {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

.stat-card-icon.danger {
    color: #dc3545;
}

.stat-card-icon.purple {
    color: #6f42c1;
}

/* ============================================
   Code Inline
   ============================================ */

.code-inline {
    font-size: 0.85em;
    color: #999;
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* ============================================
   Color Utilities - Additional
   ============================================ */

.color-danger {
    color: #dc3545;
}

/* ============================================
   Button Option Cards
   ============================================ */

.btn-option-card {
    width: 100%;
    padding: 15px;
    text-align: left;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-option-card:hover {
    background-color: #e9ecef;
    border-color: #1a2234;
}

.btn-option-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.btn-option-description {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   Form Textarea Variants
   ============================================ */

.form-textarea {
    height: 100px;
    resize: vertical;
}

.form-textarea-sm {
    height: 80px;
    resize: vertical;
}

/* ============================================
   Modal Variants
   ============================================ */

.modal-large {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-footer-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.modal-title {
    margin: 0;
    color: #333;
}

/* ============================================
   Definition List
   ============================================ */

.definition-list {
    margin: 0;
}

/* ============================================
   List Simple
   ============================================ */

.list-simple {
    margin: 0;
    padding-left: 1.5rem;
    color: #666;
}

.list-simple li {
    margin-bottom: 0.5rem;
}

/* ============================================
   Detail Section Styles
   ============================================ */

.detail-section-title {
    color: #666;
    margin-bottom: 10px;
}

.detail-text {
    line-height: 1.6;
}

/* ============================================
   Stat Value Variants
   ============================================ */

.stat-value-purple {
    font-size: 1.25rem;
    font-weight: 600;
    color: #8b5cf6;
}

/* ============================================
   Spacing Utilities - Additional
   ============================================ */

.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }

/* ============================================
   Detail Field Styles
   ============================================ */

.detail-field-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.detail-field-value {
    color: #666;
}

/* ============================================
   Link Styles
   ============================================ */

.link-primary {
    color: #1a2234;
    text-decoration: none;
}

.link-primary:hover {
    color: #2a3a7a;
    text-decoration: underline;
}

/* ============================================
   Status Badges (for dynamic JS generation)
   ============================================ */

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-completed {
    background-color: #28a745;
    color: white;
}

.status-badge-processing {
    background-color: #ffc107;
    color: #333;
}

.status-badge-failed {
    background-color: #dc3545;
    color: white;
}

.status-badge-unknown {
    background-color: #6c757d;
    color: white;
}

.status-badge-active {
    background-color: #17a2b8;
    color: white;
}

.status-badge-inactive {
    background-color: #6c757d;
    color: white;
}

/* ============================================
   Dialog/Confirmation Styles - Fortune 500 Style
   ============================================ */

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-container {
    background-color: var(--content-card-bg, white);
    padding: 24px;
    border-radius: var(--radius-lg, 8px);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg, 0 8px 16px rgba(0,0,0,0.15));
}

.dialog-header {
    text-align: center;
    margin-bottom: 16px;
}

/* Dialog icons - neutral grey by default (Fortune 500) */
.dialog-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    color: var(--icon-default, #9ca3af);
}

/* Semantic icon colors - only use when meaning is critical */
.dialog-icon-warning {
    color: var(--accent-warning, #d97706);
}

.dialog-icon-info {
    color: var(--icon-default, #9ca3af); /* Neutral grey, not bright blue */
}

.dialog-icon-error {
    color: var(--accent-danger, #dc2626);
}

.dialog-icon-success {
    color: var(--accent-success, #059669);
}

.dialog-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--content-heading, #374151);
}

.dialog-body {
    margin-bottom: 20px;
    color: var(--content-text, #4b5563);
    line-height: 1.5;
}

.dialog-body p {
    margin: 0 0 8px 0;
}

.dialog-body p:last-child {
    margin-bottom: 0;
}

/* Form group inside dialog - proper spacing */
.dialog-container .form-group {
    margin-bottom: 20px;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--content-border, #e5e7eb);
    margin-top: 20px;
}

/* ============================================
   CIM Edit Form Styles
   ============================================ */

.cim-edit-form {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cim-edit-header {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cim-edit-type-badge {
    font-size: 0.75em;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    color: #666;
}

.cim-edit-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cim-edit-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cim-validation-error {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 8px;
    display: none;
}

/* ============================================
   CIM Table Styles
   ============================================ */

.cim-table-cell {
    padding: 12px;
}

.cim-table-cell-center {
    padding: 12px;
    text-align: center;
}

.cim-opportunity-name {
    color: #1a2234;
    font-weight: 600;
}

.cim-pending-text {
    color: #999;
    font-style: italic;
}

.cim-document-link {
    color: #1a2234;
    text-decoration: underline;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cim-pdf-icon {
    color: #dc3545;
}

.cim-date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cim-action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   CIM Generating/Progress State
   ============================================ */

.cim-progress-container {
    text-align: center;
    padding: 60px;
    color: #666;
}

.cim-progress-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #007bff;
}

.cim-progress-bar-container {
    margin: 30px auto;
    max-width: 400px;
}

.cim-progress-bar-track {
    background-color: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.cim-progress-bar-fill {
    background-color: #1a2234;
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.cim-progress-message {
    font-size: 0.9em;
    color: #999;
    margin-top: 15px;
}

/* ============================================
   CIM Success/Error States
   ============================================ */

.cim-success-state {
    text-align: center;
    padding: 60px;
    color: #28a745;
}

.cim-error-state {
    text-align: center;
    padding: 60px;
    color: #dc3545;
}

.cim-state-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

/* ============================================
   Search Highlight
   ============================================ */

.search-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
}

/* ============================================
   CIM Section Card Styles
   ============================================ */

.cim-section-card {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.cim-section-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cim-section-title {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cim-section-title i {
    color: #007bff;
}

.cim-section-body {
    padding: 20px;
}

.cim-field-grid {
    display: grid;
    gap: 15px;
}

.cim-field-item {
    border-bottom: 1px solid #f8f9fa;
    padding-bottom: 15px;
}

.cim-field-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cim-field-label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.cim-field-value {
    color: #666;
    line-height: 1.5;
}

.cim-field-empty {
    font-style: italic;
    opacity: 0.7;
}

/* ============================================
   CIM Alert Styles
   ============================================ */

.cim-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cim-alert-icon {
    margin-top: 2px;
}

.cim-alert-content {
    flex: 1;
}

.cim-alert-link {
    text-decoration: underline;
}

.cim-alert-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
}

/* ============================================
   CIM Troubleshooting Tips
   ============================================ */

.cim-tips-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cim-tips-title {
    margin: 0 0 10px 0;
}

.cim-tips-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #666;
}

/* ============================================
   CIM Backwards Compatibility Aliases
   These map old CIM-specific class names to generic equivalents.
   TODO: Update templates to use generic classes, then remove these.
   ============================================ */

/* Table aliases */
.cim-table-row { user-select: none; cursor: pointer; }
.cim-table-row:hover { background-color: var(--content-bg); }

/* Dialog aliases - use .dialog-* instead */
.cim-dialog-center { text-align: center; margin-bottom: 20px; }
.cim-dialog-icon { font-size: 3em; margin-bottom: 15px; }
.cim-dialog-icon-warning { color: #f39c12; }
.cim-dialog-icon-primary { color: #007bff; }
.cim-dialog-icon-error { color: #dc3545; }
.cim-dialog-title { margin: 0 0 10px 0; color: #333; }
.cim-dialog-body { margin-bottom: 25px; color: #666; line-height: 1.5; }
.cim-dialog-buttons { display: flex; gap: 15px; justify-content: center; }

/* Search highlight - generic utility */
.search-highlight,
.cim-search-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
}

/* ============================================
   Match Detail Page Styles
   ============================================ */

/* Match score section - compact layout */
.match-score-section {
    padding: 20px 30px;
    text-align: center;
}

/* Match participants display */
.match-participants {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    background-color: var(--content-bg, #f8f9fa);
    border-radius: var(--radius-md, 6px);
}

.match-last-activity {
    text-align: center;
    margin-top: 8px;
}
.match-last-activity i { margin-right: 4px; }

.match-participant {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--content-heading, #333);
    font-size: 1em;
}

.match-connector {
    color: var(--content-text-muted, #999);
    font-size: 1em;
}

/* Match score display wrapper */
.match-score-display {
    margin: 15px 0;
}

/* Large match score display */
.match-score-large {
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

/* Match quality label */
.match-quality-label {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--content-heading, #333);
    text-transform: uppercase;
}

/* Progress bar container - original */
.progress-bar-container {
    width: 60%;
    margin: 20px auto;
    background-color: var(--content-border, #e9ecef);
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
}

/* Progress bar container - compact */
.progress-bar-container-compact {
    position: relative;
    width: 50%;
    margin: 12px auto 0;
    background-color: var(--content-border, #e9ecef);
    border-radius: 8px;
    height: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.3s ease;
}

/* Info callout box */
.info-callout {
    padding: 20px;
    background-color: var(--content-bg, #f8f9fa);
    border-radius: var(--radius-md, 6px);
    border-left: 3px solid var(--content-border, #e5e7eb);
}

/* Info callout box - compact */
.info-callout-compact {
    padding: 12px 15px;
    background-color: var(--content-bg, #f8f9fa);
    border-radius: var(--radius-md, 6px);
    border-left: 3px solid var(--content-border, #e5e7eb);
}

.info-callout-header {
    font-weight: 600;
    color: var(--content-heading, #333);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
}

.info-callout-text {
    color: var(--content-text, #666);
    line-height: 1.5;
    margin: 0;
    font-size: 0.95em;
}

/* Metadata row */
.metadata-row {
    display: flex;
    justify-content: space-around;
    text-align: center;
    color: var(--content-text, #666);
    font-size: 0.9em;
    padding-top: 20px;
    border-top: 1px solid var(--content-border, #e5e7eb);
}

/* Metadata row - compact */
.metadata-row-compact {
    display: flex;
    justify-content: space-around;
    text-align: center;
    color: var(--content-text, #666);
    font-size: 0.85em;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--content-border, #e5e7eb);
}

.metadata-item {
    flex: 1;
}

.metadata-item strong {
    color: var(--content-heading, #495057);
}

/* Entity display styles */
.entity-name {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--accent-primary, #1a2234);
    margin-bottom: 10px;
}

.entity-meta {
    color: var(--content-text, #666);
    font-size: 0.9em;
    margin-bottom: 5px;
}

/* Field display styles */
.field-label {
    font-weight: 600;
    color: var(--content-heading, #333);
    margin-bottom: 8px;
}

.field-value-box {
    padding: 15px;
    background-color: var(--content-bg, #f8f9fa);
    border-radius: var(--radius-md, 6px);
}

.scrollable-content {
    max-height: 400px;
    overflow-y: auto;
}

.field-row {
    margin-bottom: 8px;
    color: var(--content-text, #666);
}

.field-key {
    color: var(--content-heading, #495057);
}

.field-value {
    color: var(--content-text, #666);
}

/* Grid layouts */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Utility classes */
.flex-row {
    display: flex;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.bg-white {
    background-color: white;
}

.border-left-primary {
    border-left: 3px solid var(--accent-primary, #1a2234);
    border-radius: 4px;
}

.text-primary {
    color: var(--content-heading, #495057);
}

.badge-outline {
    padding: 6px 12px;
    border-radius: var(--radius-sm, 4px);
    background-color: white;
    border: 1px solid var(--content-border, #dee2e6);
    color: var(--content-heading, #495057);
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Expand/collapse button for metric table */
.expand-button {
    background: none;
    border: none;
    color: var(--content-text-muted, #999);
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    font-size: 0.75em;
    transition: color 0.2s;
    vertical-align: middle;
    opacity: 0.6;
}

.expand-button:hover {
    color: var(--content-heading, #495057);
    opacity: 1;
}

.expand-button i {
    font-size: 0.9em;
}

.metric-description,
.analysis-text {
    position: relative;
    display: inline;
}

.metric-full,
.analysis-full {
    display: inline;
}

.metric-full.hidden,
.analysis-full.hidden {
    display: none;
}
