/* Unified Dashboard Styles */

.unified-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.dashboard-header h3 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.dashboard-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

/* Brand Profile Card */
.brand-profile-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-status {
    margin-bottom: 15px;
}

.status-ready {
    color: #4caf50;
    font-weight: 600;
}

.status-missing {
    color: #ff9800;
    font-weight: 600;
}

.brand-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.brand-details {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

/* Discovery Section */
.discovery-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.discovery-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    flex: 1;
}

.search-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-input-group input:focus {
    outline: none;
    border-color: #2196f3;
}

.search-btn {
    padding: 12px 24px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #1976d2;
}

.search-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.advanced-btn,
.ai-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.ai-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.advanced-btn:hover {
    border-color: #2196f3;
    color: #2196f3;
}

.ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Advanced Filters */
.advanced-filters {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

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

.apply-btn {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.clear-btn {
    padding: 10px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 15px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.view-controls {
    display: flex;
    gap: 5px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 16px;
    background: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.view-btn.active {
    background: #2196f3;
    color: white;
}

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

.bulk-btn {
    padding: 10px 16px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.bulk-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.bulk-btn:not(:disabled):hover {
    background: #f57c00;
    transform: translateY(-1px);
}

/* Influencer Results */
.influencer-results {
    padding: 20px;
    min-height: 200px;
}

.influencer-results.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.influencer-results.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Unified Influencer Cards */
.unified-influencer-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    position: relative;
}

.unified-influencer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.selection-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.influencer-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.influencer-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.alignment-badge {
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 12px;
    min-width: 35px;
    text-align: center;
}

.ai-recommended-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat {
    text-align: center;
}

.stat .value {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.stat .label {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.email-stat .value {
    font-size: 20px;
}

.card-bio {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.ai-insight {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

.insight-icon {
    font-size: 16px;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.action-btn.analysis {
    border-color: #2196f3;
    color: #2196f3;
}

.action-btn.outreach {
    border-color: #4caf50;
    color: #4caf50;
}

.action-btn.details {
    border-color: #ff9800;
    color: #ff9800;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn.analysis:hover {
    background: #2196f3;
    color: white;
}

.action-btn.outreach:hover {
    background: #4caf50;
    color: white;
}

.action-btn.details:hover {
    background: #ff9800;
    color: white;
}

/* Card Results */
.card-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.analysis-result,
.outreach-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.analysis-result h6,
.outreach-result h6 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.analysis-content,
.outreach-content {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.hide-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* AI Insights Panel */
.ai-insights-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    height: 100vh;
    background: white;
    border-left: 1px solid #e0e0e0;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.panel-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.panel-content {
    padding: 20px;
}

/* Bulk Analysis Results */
.bulk-analysis-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.bulk-analysis-results h5 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.analysis-summary {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.summary-stats .stat {
    text-align: center;
}

.summary-stats .stat .value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.summary-stats .stat .label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.individual-analyses {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.analysis-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

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

.analysis-header h6 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.score-badge {
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.score-high {
    background: #4caf50;
}

.score-good {
    background: #ff9800;
}

.score-fair {
    background: #f44336;
}

.score-low {
    background: #9e9e9e;
}

.analysis-content {
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.bulk-actions-footer {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Campaign Builder */
.campaign-builder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.campaign-builder .builder-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.builder-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.campaign-form {
    padding: 30px;
}

.campaign-overview {
    margin-bottom: 30px;
    text-align: center;
}

.campaign-overview h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.campaign-overview p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section h6 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Template Selection */
.template-selection {
    margin-top: 20px;
}

.template-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.template-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 120px;
}

.template-option.active {
    border-color: #2196f3;
    background: #e3f2fd;
}

.template-option:hover {
    border-color: #2196f3;
}

.template-icon {
    font-size: 24px;
}

.template-name {
    font-weight: 500;
    font-size: 14px;
    text-align: center;
}

.template-content {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
}

/* Quick Template */
.quick-template ul {
    margin: 15px 0;
    padding-left: 20px;
}

.quick-template li {
    margin-bottom: 5px;
    color: #555;
}

.template-preview {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview-text {
    font-style: italic;
    color: #666;
    line-height: 1.5;
}

/* Custom Template */
.placeholder-help {
    margin-top: 15px;
}

.placeholder-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.placeholder-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Saved Templates */
.no-saved-templates {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.saved-templates {
    max-height: 300px;
    overflow-y: auto;
}

.saved-template-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-template-item:hover {
    background: #f8f9fa;
}

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

.template-header label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.template-type {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
}

.template-preview {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Selected Influencers */
.selected-influencers-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.selected-influencer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

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

.influencer-info strong {
    display: block;
    color: #333;
    margin-bottom: 2px;
}

.influencer-info span {
    color: #666;
    font-size: 14px;
}

.email-available {
    color: #4caf50;
    font-size: 12px;
    font-weight: 500;
}

.email-missing {
    color: #f44336;
    font-size: 12px;
    font-weight: 500;
}

/* Campaign Actions */
.campaign-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

.btn-outline {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #999;
}

.btn-danger {
    background: #f44336;
    color: white;
}

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

/* Loading and Error States */
.loading-state,
.error-state,
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-state .loading-spinner {
    margin: 0 auto 20px;
}

.error-state h4 {
    color: #f44336;
    margin-bottom: 10px;
}

.retry-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1002;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Campaign Management Styles */
.campaign-manager {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.header-info p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

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

.campaign-filters {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.filter-stats {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.stat-item .stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.campaign-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.campaign-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.campaign-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.campaign-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.campaign-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.campaign-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.campaign-date {
    font-size: 12px;
    color: #666;
}

.local-badge {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    width: fit-content;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #f5f5f5;
    color: #666;
}

.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

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

.status-paused {
    background: #fff3cd;
    color: #856404;
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.metric-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    text-transform: uppercase;
}

.campaign-budget {
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 4px;
    font-size: 14px;
}

.budget-label {
    font-weight: 500;
    color: #555;
}

.budget-value {
    color: #1976d2;
    font-weight: 600;
}

.campaign-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-campaign-btn {
    border-color: #2196f3;
    color: #2196f3;
}

.view-campaign-btn:hover {
    background: #2196f3;
    color: white;
}

.pause-campaign-btn {
    border-color: #ff9800;
    color: #ff9800;
}

.pause-campaign-btn:hover {
    background: #ff9800;
    color: white;
}

.resume-campaign-btn {
    border-color: #4caf50;
    color: #4caf50;
}

.resume-campaign-btn:hover {
    background: #4caf50;
    color: white;
}

.delete-campaign-btn {
    border-color: #f44336;
    color: #f44336;
}

.delete-campaign-btn:hover {
    background: #f44336;
    color: white;
}

/* Campaign Details Modal */
.modal-content.large {
    max-width: 900px;
    width: 90vw;
}

.campaign-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.details-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.details-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.details-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

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

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

.detail-item label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.detail-item span {
    color: #333;
    font-size: 14px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background: #f9f9f9;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.influencer-id {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.message-status {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #f5f5f5;
    color: #666;
}

.status-sent {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-failed {
    background: #ffebee;
    color: #c62828;
}

.message-content {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.message-meta {
    margin-top: 8px;
}

.message-meta small {
    color: #666;
    font-size: 11px;
}

.metadata-content {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
}

.metadata-content pre {
    margin: 0;
    font-size: 12px;
    color: #555;
    white-space: pre-wrap;
}

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

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.empty-state p {
    margin: 0 0 30px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Campaign Results Modal */
.campaign-results {
    text-align: center;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.result-stat.success {
    border-color: #4caf50;
    background: #f1f8e9;
}

.result-stat.error {
    border-color: #f44336;
    background: #ffebee;
}

.result-stat .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.result-stat.success .stat-value {
    color: #4caf50;
}

.result-stat.error .stat-value {
    color: #f44336;
}

.result-stat .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.results-actions {
    text-align: left;
    line-height: 1.6;
    color: #555;
}

.results-actions p {
    margin-bottom: 10px;
}

/* Analytics Dashboard Styles */
.analytics-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 20px;
}

.analytics-header h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.analytics-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

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

.metrics-overview {
    margin-bottom: 40px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #2196f3;
    margin-bottom: 8px;
    line-height: 1;
}

.metric-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-change {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}

.metric-change.positive {
    color: #4caf50;
}

.metric-change.negative {
    color: #f44336;
}

.metric-change.neutral {
    color: #666;
}

.analytics-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 300px;
}

.data-tables-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.table-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-container h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.data-table {
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.success-rate-bar {
    position: relative;
    background: #f0f0f0;
    border-radius: 10px;
    height: 20px;
    min-width: 80px;
    overflow: hidden;
}

.success-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336 0%, #ff9800 50%, #4caf50 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.success-rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Status badges in tables */
.data-table .status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .unified-dashboard {
        padding: 10px;
    }

    .dashboard-header {
        padding: 20px;
    }

    .dashboard-header h3 {
        font-size: 24px;
    }

    .search-controls {
        flex-direction: column;
    }

    .search-input-group {
        flex-direction: column;
    }

    .template-content {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .influencer-results.grid-view {
        grid-template-columns: 1fr;
    }

    .ai-insights-panel {
        width: 100vw;
        left: 0;
    }

    .campaign-builder {
        padding: 10px;
    }

    .template-options {
        flex-direction: column;
    }

    .campaign-actions {
        flex-direction: column;
    }

    /* Analytics responsive styles */
    .analytics-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .header-actions {
        justify-content: center;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .data-tables-section {
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: 15px;
    }

    .table-container {
        padding: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
}

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

    .metric-card {
        padding: 20px;
    }

    .metric-value {
        font-size: 2em;
    }

    .analytics-dashboard {
        padding: 10px;
    }

    .chart-container,
    .table-container {
        padding: 10px;
    }
}

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

    .card-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: auto;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .bulk-actions {
        flex-direction: column;
    }
}