/* AI Sales SDR v3 - Modern Dashboard Styles with Green Theme */

/* Import Open Sans font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* Global font settings - ensure everything uses Open Sans thin */
* {
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 300 !important;
}

/* Reset any bold text */
strong, b {
    font-weight: 300 !important;
}

/* Auto-generated email display styles */
.auto-generated-email-display {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

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

.auto-email-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.auto-email-indicator i {
    font-size: 1.1rem;
}

.auto-email-actions {
    display: flex;
    gap: 0.5rem;
}

.auto-email-preview {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 0.75rem;
}

.email-subject {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.email-preview-content {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.email-metadata {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.email-goal, .email-confidence {
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    border-radius: 0.25rem;
}

.auto-generation-loading {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.loading-indicator i {
    font-size: 1.1rem;
}

/* Direct Email Preview Modal Styles */
.agent-goal-section {
    background: var(--gray-50);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.agent-goal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.agent-goal-value {
    font-size: 1.1rem;
    color: var(--gray-700);
    padding: 0.5rem 0;
    text-transform: capitalize;
}

.from-info-section {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.email-content-section {
    margin-bottom: 1.5rem;
}

.email-content-area {
    min-height: 200px;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.5;
}

.email-content-area.editable {
    border-color: var(--primary-color);
    background-color: var(--gray-50);
}

.email-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.enrichment-status-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.status-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.status-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.status-value {
    color: var(--gray-800);
    font-weight: 500;
}

:root {
    --primary-color: #a4c3b2;
    --primary-hover: #8db09d;
    --secondary-color: #6b8b75;
    --success-color: #7cb342;
    --warning-color: #ff9800;
    --danger-color: #e57373;
    --info-color: #4db6ac;
    
    --gray-50: #f8faf9;
    --gray-100: #f1f5f3;
    --gray-200: #e8f0eb;
    --gray-300: #d4e6d9;
    --gray-400: #9cb8a5;
    --gray-500: #6b8b75;
    --gray-600: #5a7763;
    --gray-700: #4a6352;
    --gray-800: #3a4f42;
    --gray-900: #2a3b32;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    margin-top: 0;
    color: var(--gray-800);
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.header h1 i {
    color: var(--primary-color);
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.stat-label {
    color: var(--gray-600);
}

.status-indicator {
    font-size: 0.75rem;
}

.status-indicator.online {
    color: var(--success-color);
}

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

/* Header Navigation Styles */
.header-nav {
    display: flex;
    align-items: center;
}

.main-nav {
    margin: 0 1rem;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 0.5rem;
}

.nav-item.active .nav-link {
    color: var(--primary-color);
    font-weight: 300;
    border-bottom: 2px solid var(--primary-color);
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s;
    display: block;
}

.nav-link:hover {
    color: var(--primary-color);
}

.home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* AI Orchestration Styles */
.orchestration-config-section {
    margin-top: 2rem;
}

.orchestration-status-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.status-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 300;
    color: var(--gray-800);
}

.status-indicator-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.metric-label {
    font-weight: 300;
    color: var(--gray-600);
}

.metric-value {
    font-weight: 400;
    color: var(--gray-800);
}

.auto-enrichment-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.enrichment-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 300;
    color: var(--gray-800);
}

.enrichment-toggle {
    display: flex;
    align-items: center;
}

.cost-warning-panel {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #856404;
}

.cost-status-panel {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

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

.cost-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-label {
    font-weight: 300;
    color: var(--gray-600);
}

.cost-value {
    font-weight: 400;
    color: var(--gray-800);
}

.plan-management-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.plan-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 300;
    color: var(--gray-800);
}

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

.template-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
}

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

.template-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 300;
}

.template-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.template-stats {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.orchestration-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1.5rem;
}

.ai-orchestration-mode {
    background: linear-gradient(135deg, #a4c3b2, #6b8b75);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.orchestration-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.orchestration-description {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

/* Toggle Switch Styles */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-switch input {
    display: none;
}

.toggle-label {
    font-weight: 300;
    color: var(--gray-700);
}

/* Status Badge Styles */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: uppercase;
}

.status-badge.healthy {
    background: var(--success-color);
    color: white;
}

.status-badge.checking {
    background: var(--warning-color);
    color: white;
}

.status-badge.error {
    background: var(--danger-color);
    color: white;
}

.status-badge.pending {
    background: var(--gray-400);
    color: white;
}

/* Plan Upload Modal Styles */
.upload-plan-form .form-group {
    margin-bottom: 1rem;
}

.plan-format-help {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.format-example {
    background: var(--gray-100);
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.validation-results {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.validation-results.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.validation-results.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.home-link:hover {
    opacity: 0.9;
}

/* Navigation Dropdown Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-toggle i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-link:hover {
    background-color: var(--gray-50);
    color: var(--primary-color);
}

.dropdown-link.disabled {
    color: var(--gray-400);
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-link .coming-soon {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 300;
    margin-left: 0.5rem;
}

/* Responsive styles for navigation */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
        justify-content: center;
    }
    
    .main-nav {
        margin: 0;
        width: 100%;
    }
    
    .nav-list {
        justify-content: center;
    }
    
    /* Mobile dropdown adjustments */
    .dropdown-menu {
        position: absolute;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 250px;
    }
    
    .dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
}

/* Main Container */
.main-container {
    display: flex;
    min-height: calc(100vh - 73px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background-color: var(--gray-50);
    color: var(--gray-900);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-item i {
    width: 1.25rem;
    text-align: center;
}

.badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    padding-left: 0; /* Align with sidebar - no left margin */
    margin-left: 0;
    overflow-y: auto;
    background: var(--gray-50);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kpi-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.kpi-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.chart-container h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    color: var(--gray-500);
}

/* Tab Headers */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tab-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.tab-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Form Controls */
.search-input, .filter-select, .form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: white;
    color: var(--gray-900);
    transition: border-color 0.2s;
}

.search-input:focus, .filter-select:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-input {
    width: 300px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
    color: var(--gray-800);
    background: white;
    box-shadow: var(--shadow-sm);
}

.btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure button text is visible */
.btn-text {
    display: inline-block;
    white-space: nowrap;
}

/* Button sizes */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Button variants */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #6ba135;
    border-color: #6ba135;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Button with icon only */
.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    aspect-ratio: 1;
}

.btn-icon.btn-xs {
    padding: 0.25rem;
}

.btn-icon.btn-sm {
    padding: 0.375rem;
}

.btn-icon.btn-lg {
    padding: 0.75rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

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

.leads-table th {
    background-color: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.leads-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-900);
    font-size: 0.875rem;
}

.leads-table tr:hover {
    background-color: var(--gray-50);
}

.loading-row {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-new { background-color: var(--gray-100); color: var(--gray-700); }
.status-contacted { background-color: rgb(59 130 246 / 0.1); color: var(--primary-color); }
.status-engaged { background-color: rgb(16 163 74 / 0.1); color: var(--success-color); }
.status-qualified { background-color: rgb(8 145 178 / 0.1); color: var(--info-color); }
.status-unresponsive { background-color: rgb(217 119 6 / 0.1); color: var(--warning-color); }
.status-unsubscribed { background-color: rgb(220 38 38 / 0.1); color: var(--danger-color); }

/* Engagement Score */
.engagement-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-bar {
    width: 60px;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--danger-color), var(--warning-color), var(--success-color));
    transition: width 0.3s;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.template-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.template-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analytics-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.analytics-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.analytics-content {
    color: var(--gray-600);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.close {
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Configuration Page Styles */

/* Config Header */
.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.config-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Service Status Panel */
.service-status-panel {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.service-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.service-status-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.last-check {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.service-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: var(--primary-color);
    background: white;
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
}

.service-info {
    flex: 1;
}

.service-name {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    line-height: 1.2;
}

.service-status {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.status-indicator {
    display: flex;
    align-items: center;
}

.status-dot {
    font-size: 1.25rem;
    line-height: 1;
}

.status-dot.checking {
    color: var(--warning-color);
    animation: pulse 2s infinite;
}

.status-dot.online {
    color: var(--success-color);
}

.status-dot.offline {
    color: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Configuration Sections */
.config-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

/* Email Configuration Section with Reduced Padding */
.email-config-section {
    padding: 1rem !important;
}

.email-config-section .section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

/* Email Configuration Form */
.email-config-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.config-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(164, 195, 178, 0.1);
}

.config-help {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* Reply Routing Configuration */
.reply-routing-section {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: var(--gray-50);
}

.email-config-section .reply-routing-section {
    padding: 0.75rem;
}

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

.routing-title {
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.routing-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* Routing Description */
.routing-description {
    margin-bottom: 1rem;
}

.routing-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    background: white;
}

.option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
}

.option-icon.default {
    background: var(--info-color);
    color: white;
}

.option-icon.custom {
    background: var(--primary-color);
    color: white;
}

.option-details {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.reply-to-config {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Configuration Actions */
.config-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Configuration Status */
.config-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-label {
    color: var(--gray-600);
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--warning-color);
    color: white;
}

.status-badge.configured {
    background: var(--success-color);
    color: white;
}

#webhook-url-display {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: monospace;
}

/* Document Upload Grid */
.document-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Upload Cards */
.upload-card {
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.upload-card:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.upload-card.multiple-upload {
    grid-column: 1 / -1;
    border-style: solid;
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    color: white;
    font-size: 1.25rem;
}

.upload-icon.ppm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.upload-icon.factsheet {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.upload-icon.investor {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.upload-icon.additional {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.upload-title h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.upload-title p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

/* File Upload Areas */
.file-input {
    display: none;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.file-upload-area i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-text {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.upload-subtext {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Upload Info and Status */
.upload-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.file-name {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

.upload-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-align: center;
}

.upload-status.success {
    background: rgba(124, 179, 66, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.upload-status.error {
    background: rgba(229, 115, 115, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.upload-status.uploading {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

/* Existing Document Display */
.existing-document {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(124, 179, 66, 0.05);
    border: 1px solid rgba(124, 179, 66, 0.2);
    border-radius: var(--border-radius);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-info i {
    color: var(--success-color);
    font-size: 1.25rem;
}

.document-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.875rem;
    flex: 1;
}

.document-size {
    font-size: 0.75rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Multiple File Upload */
.multiple-upload-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.multiple-files-display {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.files-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: white;
    font-size: 0.875rem;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name-multiple {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove {
    background: var(--danger-color);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-remove:hover {
    background: #d32f2f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-status-grid {
        grid-template-columns: 1fr;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .routing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .document-upload-grid {
        grid-template-columns: 1fr;
    }
    
    .config-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .config-section {
        padding: 1rem;
    }
    
    .service-status-panel {
        padding: 1rem;
    }
    
    .upload-card {
        padding: 1rem;
    }
}

/* Tooltip styles */
.tooltip-icon {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--gray-500);
    cursor: help;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--gray-800);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: normal;
    white-space: nowrap;
    z-index: 100;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    max-width: 300px;
    white-space: normal;
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--gray-800);
    z-index: 100;
}

@media (max-width: 768px) {
    .tooltip-icon:hover::after {
        left: auto;
        right: 0;
        transform: none;
    }
    
    .tooltip-icon:hover::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Lead Details */
.lead-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lead-info-section h4,
.lead-actions-section h4,
.email-history-section h4,
.notes-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lead-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.email-history {
    max-height: 300px;
    overflow-y: auto;
}

.email-item {
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.email-item h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.email-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.notes-list.legacy {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.note-item {
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.add-note textarea {
    width: 100%;
    margin-bottom: 0.5rem;
    resize: vertical;
    min-height: 80px;
}

/* Response Section */
.response-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.response-content {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--gray-700);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay .loading-spinner {
    text-align: center;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-overlay .loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-overlay .loading-spinner p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    color: var(--gray-500);
}

/* Toast styles moved to toast-notifications.css */

/* Slide-in Animation */
@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* Leads Interface */
.leads-interface {
    display: flex;
    min-height: calc(100vh - 200px);
    max-height: calc(100vh - 200px);
    gap: 1rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.leads-list-panel {
    width: 350px;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.leads-list-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.leads-list-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

.leads-list-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.leads-list-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
}

.lead-list-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lead-list-item:hover {
    background-color: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.lead-list-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 139, 117, 0.3);
    transform: translateY(-1px);
}

.lead-list-item.active .lead-item-name,
.lead-list-item.active .lead-item-company,
.lead-list-item.active .lead-item-meta {
    color: white;
}

.lead-item-name {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.lead-item-company {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.lead-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    opacity: 0.8;
}

.lead-item-status {
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-item-score {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lead-item-score i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.loading-item {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* Lead Details Panel */
.lead-details-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.no-selection {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-selection-content {
    text-align: center;
    color: var(--gray-500);
}

.no-selection-content i {
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.no-selection-content h3 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.lead-details-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Lead Header */
.lead-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.lead-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.lead-info {
    flex: 1;
}

.lead-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.lead-info p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.lead-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.engagement-score-display {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Lead Tabs */
.lead-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-panel {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
    max-height: calc(100vh - 400px);
}

.tab-panel.active {
    display: block;
}

/* Profile Tab */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.profile-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-detail-label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.contact-detail-value {
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-id-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--gray-300);
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

/* Strategic Analysis Tab Styles */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.analysis-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.analysis-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analysis-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.analysis-section h5 {
    background: var(--gray-50);
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    margin: 0;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-section h5 i {
    color: var(--primary-color);
}

.analysis-text {
    padding: 1rem;
    line-height: 1.6;
}

.analysis-text p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.analysis-text p:last-child {
    margin-bottom: 0;
}

.analysis-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.analysis-text li {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

.analysis-text .no-data {
    color: var(--gray-500);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.synopsis-content {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    line-height: 1.6;
    color: var(--gray-700);
    width: 100%;
}

.market-intelligence-content {
    width: 100%;
}

/* Make Market Intelligence section span full width across both columns */
.profile-section:has(.market-intelligence-content) {
    grid-column: 1 / -1;
}

/* Enrichment Tab */
.enrichment-content {
    max-height: 100%;
    overflow-y: auto;
}

.enrichment-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.timestamp {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.enrichment-data {
    display: grid;
    gap: 1rem;
}

.enrichment-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.enrichment-section h5 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Email History */
.email-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.email-history-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.email-history-list {
    max-height: calc(100vh - 500px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-history-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    position: relative;
}

.email-history-item.sent {
    border-left: 4px solid var(--primary-color);
}

.email-history-item.received {
    border-left: 4px solid var(--success-color);
}

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

.email-subject {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.email-timestamp {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.email-content-preview {
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.email-content-text {
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.toggle-content {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.toggle-content:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.email-content-expandable .email-content-text {
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.email-engagements {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

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

.ai-message-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--primary-color);
    cursor: help;
}

/* Notes Section */
.notes-section {
    height: calc(100vh - 420px);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.add-note-form {
    flex-shrink: 0;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.add-note-form textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-note-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
    min-height: 300px;
}

.note-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--info-color);
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.note-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

.note-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* AI Indicators and Disclaimers */
.ai-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.ai-info-icon {
    cursor: help;
    transition: color 0.2s;
}

.ai-info-icon:hover {
    color: var(--primary-hover);
}

.ai-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-disclaimer {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--border-radius);
}

.disclaimer-content {
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.disclaimer-content i {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.disclaimer-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.disclaimer-text p {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.ai-send-info {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.7;
    cursor: help;
}

.ai-send-info:hover {
    opacity: 1;
}

/* Enhanced Tooltips */
[title] {
    position: relative;
}

/* Configuration Tab */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.config-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.config-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--gray-300);
    transition: border-color 0.3s;
}

.service-item.online {
    border-left-color: var(--success-color);
}

.service-item.offline {
    border-left-color: var(--danger-color);
}

.service-item.warning {
    border-left-color: var(--warning-color);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-info i {
    color: var(--primary-color);
    width: 1.25rem;
    text-align: center;
}

.service-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-right: 0.5rem;
}

.service-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    font-size: 1rem;
    line-height: 1;
}

.status-indicator.online {
    color: var(--success-color);
}

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

.status-indicator.warning {
    color: var(--warning-color);
}

.status-indicator.checking {
    color: var(--info-color);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.info-label {
    font-weight: 500;
    color: var(--gray-700);
}

.info-value {
    font-weight: 600;
    color: var(--gray-900);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        max-width: calc(100vw - 200px);
    }
    
    .charts-row,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .leads-interface {
        flex-direction: column;
        height: auto;
    }
    
    .leads-list-panel {
        width: 100%;
        max-height: 300px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .nav-item {
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }
    
    .main-content {
        max-width: 100%;
        padding: 1rem;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .tab-actions {
        flex-wrap: wrap;
    }
    
    .search-input {
        width: 100%;
    }
}

/* Enrichment Insights Styles */
.enrichment-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.enrichment-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.confidence-score, .email-tracking {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.confidence-label, .tracking-label {
    color: var(--text-muted);
    font-weight: 500;
}

.confidence-value {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.tracking-value {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.insight-item:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.insight-item i {
    color: var(--primary-color);
    margin-top: 2px;
    font-size: 12px;
}

.insight-item span {
    flex: 1;
    line-height: 1.4;
    color: var(--text-primary);
    font-size: 14px;
}

/* Strategic Insight Styles for Verbose Insights */
.strategic-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.strategic-insight-item:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.insight-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.insight-content {
    flex: 1;
}

.insight-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--gray-800);
    font-size: 15px;
    text-align: justify;
}

/* Email Configuration Styles */
.email-config-form {
    background: #f8f9fa;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.config-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.config-input {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(164, 195, 178, 0.1);
}

.config-help {
    color: var(--gray-600);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.email-config-status {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

#webhook-url-display {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--gray-800);
}

@media (max-width: 768px) {
    .config-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .config-actions {
        flex-direction: column;
    }
}

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

.enrichment-message.error {
    color: var(--error-color);
}

.enrichment-message i {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
}

.enrichment-message p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.enrichment-message .email-tracking {
    justify-content: center;
    margin-top: 15px;
}

/* Email Preview Modal Styles */
.large-modal {
    max-width: 800px;
}

.email-preview-header {
    background: var(--gray-50);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
}

.recipient-info {
    font-size: 14px;
    color: var(--gray-700);
}

.email-content-preview {
    margin-bottom: 25px;
}

.email-preview-area {
    min-height: 300px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 15px;
    resize: vertical;
}

.email-edit-area {
    min-height: 300px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    resize: vertical;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 20px;
}

.email-edit-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px dashed var(--warning-color);
    background: var(--gray-50);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 25px -25px -25px -25px;
}

.edit-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--warning-color);
    color: white;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.edit-notice i {
    font-size: 16px;
}

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

.btn-success {
    background-color: var(--success-color);
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #15803d;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
    border: none;
}

.btn-warning:hover {
    background-color: #b45309;
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content, .large-modal {
        width: 95%;
        margin: 1rem;
        max-width: none;
    }
    
    .action-buttons, .preview-actions, .edit-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .email-edit-section {
        margin: 25px -15px -15px -15px;
        padding: 20px 15px;
    }
}

/* Compact Configuration Styles */
.compact-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.compact-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.compact-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.compact-service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.status-dot {
    font-size: 0.75rem;
    font-weight: bold;
}

.status-dot.online {
    color: var(--success-color);
}

.status-dot.offline {
    color: var(--danger-color);
}

.status-dot.checking {
    color: var(--warning-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.summary-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
}

.summary-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 500;
}

/* Upload Section Styles */
.upload-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.upload-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-item {
    margin-bottom: 1.5rem;
}

.upload-item:last-child {
    margin-bottom: 0;
}

.upload-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.upload-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: all 0.2s;
}

.file-label:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.file-name {
    font-size: 0.875rem;
    color: var(--gray-600);
    flex: 1;
    min-width: 150px;
}

.upload-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: none;
}

.upload-status.success {
    background: #f0f9ff;
    color: var(--success-color);
    border: 1px solid #bfdbfe;
    display: block;
}

.upload-status.error {
    background: #fef2f2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
    display: block;
}

.upload-status.processing {
    background: #fffbeb;
    color: var(--warning-color);
    border: 1px solid #fed7aa;
    display: block;
}

/* CSV Upload Section */
.csv-upload-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

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

.upload-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.csv-upload-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.csv-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Removed duplicate rule - handled by .csv-preview-section h4 */

.preview-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.preview-table th,
.preview-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.preview-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-800);
}

.preview-table td {
    color: var(--gray-600);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Enhanced Enrichment Tab Styles */
.enrichment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.enrichment-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.confidence-score {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Finrobot Market Intelligence Styles */
.enrichment-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.enrichment-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enrichment-subsection {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.enrichment-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.enrichment-subsection h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sec-filing-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.financial-metric-item,
.market-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.financial-metric-item:last-child,
.market-metric-item:last-child {
    border-bottom: none;
}

.metric-value {
    font-weight: 600;
    color: var(--gray-800);
}

.metric-value.positive {
    color: var(--success-color);
}

.metric-value.negative {
    color: var(--danger-color);
}

.news-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.news-item h6 {
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.news-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.news-summary {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.peer-competitors {
    margin-bottom: 1rem;
}

.competitor-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

.market-position {
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.peer-company {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.peer-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.peer-metrics {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.peer-metrics span {
    display: inline-block;
    margin-right: 1rem;
}

.no-data {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem;
    font-style: italic;
}

.interests-list, .activities-list, .insights-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.interest-tag, .activity-item, .insight-item {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
}

.sec-data, .financial-data, .market-data, .news-data, .peer-data {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sec-filing-item, .financial-metric-item, .market-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
}

.news-item {
    background: white;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-200);
}

.news-item h6 {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.news-summary {
    color: var(--gray-700);
    line-height: 1.5;
}

.peer-company {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
}

.peer-name {
    font-weight: 500;
    color: var(--gray-800);
}

.peer-metrics {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Duplicate toast styles removed - using toast-notifications.css */
}

.metric-value {
    font-weight: 600;
    color: var(--primary-color);
}

.no-data {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    padding: 2rem;
}

/* Responsive Design for New Components */
@media (max-width: 1024px) {
    .compact-config-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .upload-section {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .compact-config-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-service-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .upload-control,
    .csv-upload-control {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-name {
        min-width: auto;
        text-align: center;
    }
    
    .upload-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .preview-actions {
        justify-content: stretch;
        flex-direction: column;
    }
}

/* Email Conversation Chain Styles */
.conversation-chain {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.conversation-header {
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.conversation-title i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.conversation-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.message-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.conversation-messages {
    padding: 1.5rem;
}

.conversation-message {
    position: relative;
    margin-bottom: 1.5rem;
}

.conversation-message:last-child {
    margin-bottom: 0;
}

.conversation-message.sent {
    margin-left: 0;
    margin-right: 2rem;
}

.conversation-message.received {
    margin-left: 2rem;
    margin-right: 0;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1rem;
}

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

.message-sender {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.sender-avatar.sent {
    background: var(--primary-color);
}

.sender-avatar.received {
    background: var(--secondary-color);
}

.sender-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sender-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.message-timestamp {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.message-content {
    margin-left: 3.25rem;
}

.conversation-message.received .message-content {
    margin-left: 0;
}

.message-subject {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message-body {
    position: relative;
}

.message-text {
    color: var(--gray-700);
    line-height: 1.6;
    font-size: 0.875rem;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.message-engagements {
    margin-top: 0.75rem;
    margin-left: 3.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.conversation-message.received .message-engagements {
    margin-left: 0;
}

.engagement-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.engagement-item.sent-status {
    background: rgba(164, 195, 178, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.engagement-item.delivered {
    background: rgba(124, 179, 66, 0.1);
    color: var(--success-color);
    border-color: var(--success-color);
}

.engagement-item.opened {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.engagement-item.clicked {
    background: rgba(77, 182, 172, 0.1);
    color: var(--info-color);
    border-color: var(--info-color);
}

.engagement-item.replied {
    background: rgba(124, 179, 66, 0.1);
    color: var(--success-color);
    border-color: var(--success-color);
}

.engagement-item.bounced,
.engagement-item.unsubscribed {
    background: rgba(229, 115, 115, 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.message-connector {
    position: absolute;
    left: 20px;
    bottom: -1.5rem;
    width: 2px;
    height: 1.5rem;
    background: var(--gray-300);
    z-index: 1;
}

.conversation-message.received .message-connector {
    left: calc(2rem + 20px);
}

.conversation-actions {
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.conversation-status .text-success {
    color: var(--success-color);
}

.conversation-status .text-warning {
    color: var(--warning-color);
}

.conversation-status .text-muted {
    color: var(--gray-500);
}

/* Strategic Insight Styles for Enhanced AI Insights */
.strategic-insight-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    position: relative;
}

.insight-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.insight-content {
    flex: 1;
}

.insight-content p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Responsive Design for Conversation Chains */
@media (max-width: 768px) {
    .conversation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .conversation-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .conversation-message.sent {
        margin-right: 0;
    }
    
    .conversation-message.received {
        margin-left: 0;
    }
    
    .message-content {
        margin-left: 0;
    }
    
    .conversation-message.received .message-content {
        margin-left: 0;
    }
    
    .message-engagements {
        margin-left: 0;
    }
    
    .conversation-message.received .message-engagements {
        margin-left: 0;
    }
    
    .message-connector {
        display: none;
    }
    
    .conversation-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .strategic-insight-item {
        flex-direction: column;
        text-align: center;
    }
    
    .insight-number {
        align-self: center;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    .tab-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .csv-upload-section {
        width: 100% !important;
    }
    
    .upload-container {
        padding: 1rem;
    }
    
    .upload-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .upload-header button {
        margin-top: 0.5rem;
    }
    
    .csv-upload-control {
        flex-direction: column;
    }
    
    .file-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #csv-upload-btn {
        width: 100%;
    }
    
    .document-section {
        padding: 1rem;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .document-upload-item {
        flex-direction: column;
    }
    
    .document-status-list {
        padding: 0.5rem;
    }
    
    .email-config-form {
        padding: 1rem;
    }
    
    .config-actions.header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .config-actions.header-actions button {
        margin: 0.25rem 0;
    }
    
    .lead-details-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lead-actions button {
        margin: 0.25rem 0;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
    
    .toast {
        width: 90%;
        max-width: 90%;
    }
}

/* NEW: Leads Tab Header - No title, perfect button alignment */
.leads-tab-header {
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-top: 0;
    padding: 0;
}

.leads-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

/* Perfect inline button group alignment */
.button-inline-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: none;
}

.button-inline-group .btn {
    margin: 0;
    padding: 0.5rem 1rem;
    height: 38px; /* Ensure consistent height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.button-inline-group .file-upload-inline {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

/* Leads tab content specific alignment */
#leads-tab {
    padding: 2rem;
    padding-left: 2rem; /* Match main content padding */
    margin-left: 0;
    margin-top: 0;
}

/* Upload status positioning */
.leads-actions-bar .upload-status {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    min-height: 0;
}

/* Import Lead Actions in header - Legacy support */
.import-lead-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-inline {
    position: relative;
    display: flex;
    align-items: center;
}

.file-upload-inline .file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-upload-inline .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.file-name-inline {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments for new leads actions bar */
@media (max-width: 992px) {
    .leads-actions-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .button-inline-group {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Legacy support */
    .tab-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .import-lead-actions {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .leads-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .search-input,
    .filter-select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .button-inline-group {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }
    
    /* Legacy support */
    .tab-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .import-lead-actions {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .file-name-inline {
        max-width: 100px;
    }
}

/* Fix button text visibility */
.btn-primary, .btn-success, .btn-danger {
    color: white !important;
}

.btn-secondary {
    background-color: #f1f5f3;
    color: var(--gray-700) !important;
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background-color: #e8f0eb;
}

/* Client ID copy button specific styles */
.contact-detail-value .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.contact-detail-value .btn::after {
    content: "Copy";
    display: inline;
    margin-left: 0.25rem;
}

/* Responsive styles for the header to ensure the logo stays in the corner on all screen sizes */
@media (max-width: 992px) {
    .header-content {
        padding: 0.75rem 0.5rem;
    }
    
    .header-logo {
        margin: 0;
        padding: 0;
    }
    
    .logo-image {
        height: 35px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-content {
        padding: 0.5rem;
        width: 100%;
    }
    
    .header-logo {
        margin: 0;
        padding: 0;
    }
    
    .header-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-start;
    }
}

/* Home Page Styles */
.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.welcome-section p {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 800px;
    margin: 0 auto;
}

/* Applications Section */
.applications-section {
    margin-bottom: 3rem;
}

.applications-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.application-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.application-card.coming-soon {
    opacity: 0.7;
    background-color: var(--gray-100);
}

.app-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.application-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.application-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.application-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.coming-soon-badge {
    background-color: var(--gray-300);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    display: inline-block;
    margin-top: auto;
}

/* Updates Container */
.updates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.market-updates-section,
.company-updates-section {
    margin-bottom: 2rem;
}

.market-updates-section h2,
.company-updates-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.update-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.update-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.update-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--gray-700);
}

.update-date {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.update-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.update-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.update-source {
    color: var(--gray-500);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.update-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.update-badge.product {
    background-color: var(--primary-color);
    color: white;
}

.update-badge.event {
    background-color: var(--warning-color);
    color: white;
}

.update-badge.case_study {
    background-color: var(--info-color);
    color: white;
}

/* Footer for home page */
.footer {
    background-color: var(--gray-700);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-image-small {
    height: 30px;
    width: auto;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: var(--gray-400);
    font-size: 0.875rem;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

/* Responsive styles for home page */
@media (max-width: 992px) {
    .home-container {
        padding: 1.5rem;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .welcome-section p {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .home-container {
        padding: 1rem;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .updates-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Orchestrated Email Button Styles */
.orchestrated-email-button {
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.orchestrated-email-button:hover {
    background: linear-gradient(135deg, #5a2d91, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.orchestrated-email-button:active {
    transform: translateY(0);
}

.orchestrated-email-button i {
    font-size: 1rem;
}

/* Confidence Score Badge Styles */
.confidence-score-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 40px;
    margin-left: 0.5rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.confidence-score-badge:hover {
    opacity: 1;
}

/* Lead item meta styling */
.lead-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Inline loading spinner styles (for buttons and small elements) */
.inline-loading-spinner, .loading-spinner:not(.loading-overlay .loading-spinner) {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    text-align: center;
}

.loading-container p {
    margin: 10px 0 5px 0;
    color: #666;
}

.enrichment-message {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.enrichment-message p {
    margin: 10px 0 5px 0;
    color: #666;
}

.enrichment-message .loading-spinner {
    margin-bottom: 15px;
}

/* CSV Preview and Upload Styles */
.csv-preview-section {
    margin: 1.5rem 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background-color: var(--gray-50);
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

.csv-preview-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.125rem;
}

.csv-preview-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.csv-preview-table th,
.csv-preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.csv-preview-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

.csv-preview-table tbody tr:hover {
    background-color: #f9f9f9;
}

.csv-preview-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    width: 100%;
    box-sizing: border-box;
}

.csv-preview-actions .btn {
    min-width: 100px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.upload-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.upload-status.processing {
    display: block;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.upload-status.success {
    display: block;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.upload-status.error {
    display: block;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.file-upload-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-name-inline {
    font-size: 12px;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-lead-actions {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Modal Header Actions Styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-actions .btn {
    margin: 0;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1;
}

.modal-header-actions .close {
    margin-left: 5px;
}