/* Marketing Dashboard Styles */

.marketing-header {
    background: linear-gradient(135deg, #2196f3 0%, #1769aa 100%);
    color: white;
    padding: 40px;
    margin: -20px -20px 30px -20px;
    border-radius: 0 0 16px 16px;
    text-align: center;
}

.marketing-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.marketing-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* Marketing Tabs */
.marketing-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.marketing-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.marketing-tab:hover {
    background: #f8f9fa;
    color: #2196f3;
}

.marketing-tab.active {
    background: #2196f3;
    color: white;
}

.marketing-tab i {
    font-size: 1.2rem;
}

/* Tab Content */
.marketing-tab-content {
    display: none;
}

.marketing-tab-content.active {
    display: block;
}

/* Ads Analytics Styles */
.ads-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    margin-bottom: 30px;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2196f3, #1769aa);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range-selector label {
    font-weight: 600;
    color: #333;
}

.date-range-selector select {
    padding: 8px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
}

/* Statistics Cards */
.ads-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2196f3, #1769aa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2196f3;
    margin: 0 0 5px 0;
}

.stat-content p {
    color: #666;
    font-weight: 500;
    margin: 0;
}


/* Campaigns Table */
.campaigns-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    overflow: hidden;
}

.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.campaigns-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.campaign-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.campaign-filter label {
    font-weight: 500;
    color: #666;
    margin: 0;
}

.campaign-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.campaign-filter select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.campaigns-section h3 {
    padding: 25px 25px 0 25px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.campaigns-table-container {
    overflow-x: auto;
}

.campaigns-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.campaigns-table th,
.campaigns-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f4fa;
}

.campaigns-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sortable header styles */
.campaigns-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.campaigns-table th.sortable:hover {
    background: #e9ecef;
    color: #2196f3;
}

.campaigns-table th.sortable .sort-icon {
    margin-left: 8px;
    opacity: 0.5;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.campaigns-table th.sortable:hover .sort-icon {
    opacity: 1;
}

.campaigns-table th.sortable.sorted .sort-icon {
    opacity: 1;
    color: #2196f3;
}

.campaigns-table th.sortable.sorted-asc .sort-icon::before {
    content: "\f0de"; /* fa-sort-up */
}

.campaigns-table th.sortable.sorted-desc .sort-icon::before {
    content: "\f0dd"; /* fa-sort-down */
}

.campaigns-table tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.campaigns-table .loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* Status Badge */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.status-paused {
    background: #fff3e0;
    color: #f57c00;
}

.status-archived {
    background: #fce4ec;
    color: #c2185b;
}

.status-deleted {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-pending {
    background: #e3f2fd;
    color: #1976d2;
}

/* AI Chat Styles */
.ai-chat-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    padding: 25px;
    border-bottom: 1px solid #f0f4fa;
    text-align: center;
}

.ai-chat-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.ai-chat-header p {
    margin: 0;
    color: #666;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-message,
.user-message {
    display: flex;
    gap: 15px;
    max-width: 80%;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #2196f3, #1769aa);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #00c875, #00a85a);
}

.message-content {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: #2196f3;
    color: white;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.ai-chat-input-container {
    padding: 20px;
    border-top: 1px solid #f0f4fa;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#aiChatInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e1e1;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
}

#aiChatInput:focus {
    border-color: #2196f3;
}

.send-btn {
    width: 45px;
    height: 45px;
    background: #2196f3;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.send-btn:hover {
    background: #1769aa;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

/* AI Image Generator Styles */
.image-generator-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.generator-header {
    text-align: center;
    margin-bottom: 30px;
}

.generator-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.generator-header p {
    margin: 0;
    color: #666;
}

.generator-form {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.prompt-section label,
.style-options label,
.dimensions-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#imagePrompt {
    width: 100%;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#imagePrompt:focus {
    border-color: #2196f3;
    outline: none;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.style-option {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.style-option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.style-option.active {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

#imageSize {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.generate-btn {
    background: linear-gradient(135deg, #2196f3, #1769aa);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease;
    margin-top: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

.generated-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.generated-image {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    transition: transform 0.2s ease;
}

.generated-image:hover {
    transform: translateY(-2px);
}

.generated-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.image-info {
    padding: 15px;
}

.image-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.image-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.image-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-action-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.placeholder {
    text-align: center;
    color: #666;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}

/* Enhanced Loading Modal */
.loading-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    margin: 10% auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.loading-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-header {
    margin-bottom: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
    margin: 0 auto 20px auto;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #2196f3;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: innerPulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes innerPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

#loadingTitle {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { color: #333; }
    50% { color: #2196f3; }
}

/* Progress Bar */
.loading-progress-container {
    margin: 30px 0;
    position: relative;
}

.loading-progress-bar {
    width: 100%;
    height: 8px;
    background: #e3f2fd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196f3, #21cbf3, #2196f3);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease-out;
    animation: progressShimmer 2s linear infinite;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes progressGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.loading-percentage {
    position: absolute;
    top: -35px;
    right: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2196f3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
    animation: percentagePulse 1s ease-in-out infinite;
}

@keyframes percentagePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Messages */
.loading-message-container {
    margin: 25px 0;
    min-height: 60px;
}

.loading-message {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin: 0 0 8px 0;
    animation: messageSlide 0.5s ease-out;
}

.loading-sub-message {
    font-size: 14px;
    color: #888;
    margin: 0;
    font-style: italic;
    animation: messageSlide 0.5s ease-out 0.1s both;
}

@keyframes messageSlide {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Steps */
.loading-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.loading-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 12px;
    background: #f5f5f5;
    transition: all 0.3s ease;
    opacity: 0.5;
    transform: scale(0.9);
}

.loading-step.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.loading-step.completed {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    opacity: 1;
    transform: scale(1);
}

.loading-step.completed .step-icon {
    animation: checkmark 0.5s ease-out;
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.step-icon {
    font-size: 24px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    animation: stepBounce 2s ease-in-out infinite;
}

.loading-step.active .step-icon {
    animation: stepBounce 1s ease-in-out infinite, stepGlow 2s ease-in-out infinite;
}

@keyframes stepBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes stepGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(33, 150, 243, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.6)); }
}

.loading-step span {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.loading-step.active span {
    color: #2196f3;
    font-weight: 600;
}

.loading-step.completed span {
    color: #4caf50;
    font-weight: 600;
}

/* Performance Leaderboard Styles */
.leaderboard-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.leaderboard-header p {
    margin: 0;
    color: #666;
}

.top-performers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.top-performer-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
    border-left: 4px solid #2196f3;
}

.top-performer-card:hover {
    transform: translateY(-2px);
}

.performer-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2196f3, #1769aa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.performer-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.performer-content p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.performer-metric {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2196f3;
}

.rankings-section {
    margin-bottom: 40px;
}

.rankings-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.rankings-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.rankings-table th,
.rankings-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f4fa;
}

.rankings-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rankings-table tbody tr:hover {
    background: #f8f9fa;
}

.rank-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: #2196f3;
}

.performance-score {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.score-excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.score-good {
    background: #e3f2fd;
    color: #1976d2;
}

.score-average {
    background: #fff3e0;
    color: #f57c00;
}

.score-poor {
    background: #fce4ec;
    color: #c2185b;
}

.insights-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.insight-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid #ff9800;
}

.insight-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.insight-content h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.insight-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Optimization Rules Styles */
.rules-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.rules-header {
    text-align: center;
    margin-bottom: 30px;
}

.rules-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.rules-header p {
    margin: 0;
    color: #666;
}

.active-rules-section,
.rule-templates-section,
.steps-section {
    margin-bottom: 40px;
}

.active-rules-section h4,
.rule-templates-section h4,
.steps-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.rule-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #4caf50;
    position: relative;
}

.rule-card.inactive {
    border-left-color: #ff9800;
    opacity: 0.7;
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rule-title {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.rule-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
}

.rule-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.rule-conditions {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.rule-condition {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f4fa;
}

.rule-condition:last-child {
    border-bottom: none;
}

.condition-label {
    font-weight: 500;
    color: #333;
}

.condition-value {
    color: #2196f3;
    font-weight: 600;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.template-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-2px);
    border-color: #2196f3;
}

.template-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2196f3, #1769aa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin: 0 auto 15px auto;
}

.template-content h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.template-content p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.add-rule-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-rule-btn:hover {
    background: #1769aa;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid #2196f3;
}

.step-number {
    width: 30px;
    height: 30px;
    background: #2196f3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.step-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.step-action-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.step-action-btn:hover {
    background: #1769aa;
}

.step-action-btn.secondary {
    background: #6c757d;
}

.step-action-btn.secondary:hover {
    background: #5a6268;
}

/* Individual Ads Leaderboard Styles */
.ads-leaderboard-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.ads-leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.ads-leaderboard-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.ads-leaderboard-header p {
    margin: 0;
    color: #666;
}

.ads-filters {
    display: flex;
    gap: 20px;
    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: 600;
    color: #333;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

.top-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.top-ad-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
    border-left: 4px solid #00c875;
}

.top-ad-card:hover {
    transform: translateY(-2px);
}

.ad-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00c875, #00a85a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.ad-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.ad-content p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.ad-metric {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00c875;
}

.ads-table-section,
.ads-cards-section {
    margin-bottom: 40px;
}

.ads-table-section h4,
.ads-cards-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.ads-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.ads-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.ads-table th,
.ads-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f4fa;
    font-size: 0.9rem;
}

.ads-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ads-table tbody tr:hover {
    background: #f8f9fa;
}

.creative-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.creative-image {
    background: #e3f2fd;
    color: #1976d2;
}

.creative-video {
    background: #f3e5f5;
    color: #7b1fa2;
}

.creative-carousel {
    background: #e8f5e9;
    color: #2e7d32;
}

.creative-text {
    background: #fff3e0;
    color: #f57c00;
}

.ads-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ad-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #00c875;
    transition: transform 0.2s ease;
}

.ad-card:hover {
    transform: translateY(-2px);
}

.ad-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ad-card-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 1rem;
}

.ad-card-campaign {
    color: #666;
    font-size: 0.8rem;
    margin: 5px 0;
}

.ad-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.ad-metric-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.ad-metric-value {
    font-weight: 700;
    color: #00c875;
    font-size: 1.1rem;
}

.ad-metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.ad-card-actions {
    display: flex;
    gap: 8px;
}

.ad-action-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-action-btn:hover {
    background: #00c875;
    color: white;
    border-color: #00c875;
}

.creative-analysis-section {
    margin-bottom: 40px;
}

.creative-analysis-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.creative-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.creative-insight-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid #ff9800;
}

.creative-insight-card .insight-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.creative-insight-card .insight-content h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.creative-insight-card .insight-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Hierarchical Table Styles */
.hierarchical-table-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
    margin-top: 30px;
}

.table-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.table-level {
    display: none;
}

.table-level.active {
    display: block;
}

.table-level h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.adsets-table-container,
.individual-ads-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.adsets-table,
.individual-ads-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

.adsets-table th,
.adsets-table td,
.individual-ads-table th,
.individual-ads-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f4fa;
}

.adsets-table th,
.individual-ads-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adsets-table tbody tr:hover,
.individual-ads-table tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.adsets-table .loading,
.individual-ads-table .loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* Ad Image Styles */
.ad-image-container {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.table-actions {
    text-align: center;
    margin-top: 20px;
}

.targeting-info {
    font-size: 0.8rem;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creative-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.creative-image {
    background: #e3f2fd;
    color: #1976d2;
}

.creative-video {
    background: #f3e5f5;
    color: #7b1fa2;
}

.creative-carousel {
    background: #e8f5e9;
    color: #2e7d32;
}

.creative-text {
    background: #fff3e0;
    color: #f57c00;
}

/* Facebook Hierarchy Styles */
.facebook-hierarchy-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.breadcrumb-item {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item:hover {
    background: #e9ecef;
    color: #333;
}

.breadcrumb-item.active {
    background: #2196f3;
    color: white;
}

.breadcrumb-separator {
    color: #ccc;
    font-size: 0.8rem;
}

.hierarchy-level {
    display: none;
}

.hierarchy-level.active {
    display: block;
}

.level-header {
    margin-bottom: 30px;
    text-align: center;
}

.level-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.level-header p {
    margin: 0;
    color: #666;
}

.campaigns-grid,
.adsets-grid,
.individual-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.campaign-card,
.adset-card,
.individual-ad-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #2196f3;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.campaign-card:hover,
.adset-card:hover,
.individual-ad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.campaign-card {
    border-left-color: #2196f3;
}

.adset-card {
    border-left-color: #00c875;
}

.individual-ad-card {
    border-left-color: #ff9800;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

.card-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.status-paused {
    background: #fff3e0;
    color: #f57c00;
}

.status-archived {
    background: #fce4ec;
    color: #c2185b;
}

.status-deleted {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-pending {
    background: #e3f2fd;
    color: #1976d2;
}

.card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.metric-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.metric-value {
    font-weight: 700;
    color: #2196f3;
    font-size: 1.2rem;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.card-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.card-action-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-action-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.card-action-btn.secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.card-action-btn.secondary:hover {
    background: #5a6268;
}

.hierarchy-actions {
    text-align: center;
    margin-top: 30px;
}

.adset-info {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #1976d2;
}

.adset-info strong {
    color: #0d47a1;
}

.ad-preview {
    margin-bottom: 15px;
    text-align: center;
}

.ad-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.ad-headline {
    font-weight: 600;
    color: #333;
    margin: 10px 0 5px 0;
    font-size: 0.9rem;
}

.ad-description {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.creative-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-right: 8px;
}

.creative-image {
    background: #e3f2fd;
    color: #1976d2;
}

.creative-video {
    background: #f3e5f5;
    color: #7b1fa2;
}

.creative-carousel {
    background: #e8f5e9;
    color: #2e7d32;
}

.creative-text {
    background: #fff3e0;
    color: #f57c00;
}

/* Winning Ads Styles */
.winning-ads-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

/* CPA Rules Configuration Styles */
.cpa-rules-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.cpa-rules-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.rules-explanation h5,
.rules-settings h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-weight: 600;
}

.rule-explanation-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-explanation-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #ddd;
    transition: all 0.2s ease;
}

.rule-explanation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rule-explanation-card.won {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.rule-explanation-card.learning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #fef7e0 100%);
}

.rule-explanation-card.lost {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fef2f2 100%);
}

.rule-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.rule-explanation-card h6 {
    margin: 0 0 8px 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.rule-explanation-card.won h6 {
    color: #2e7d32;
}

.rule-explanation-card.learning h6 {
    color: #f57c00;
}

.rule-explanation-card.lost h6 {
    color: #c62828;
}

.rule-explanation-card p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.setting-group input {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.setting-group input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.setting-group small {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.rules-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 10px 20px;
    border: 2px solid #6c757d;
    border-radius: 6px;
    background: white;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #6c757d;
    color: white;
}

.btn-primary {
    padding: 10px 20px;
    border: 2px solid #2196f3;
    border-radius: 6px;
    background: #2196f3;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #1976d2;
    border-color: #1976d2;
}


.classification-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.classification-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
    border-left: 4px solid #2196f3;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card.won-ads {
    border-left-color: #4caf50;
}

.summary-card.testing-ads {
    border-left-color: #ff9800;
}

.summary-card.lost-ads {
    border-left-color: #f44336;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.summary-card.won-ads .summary-icon {
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

.summary-card.testing-ads .summary-icon {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.summary-card.lost-ads .summary-icon {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.summary-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.summary-count {
    font-size: 2rem;
    font-weight: 700;
    color: #2196f3;
    display: block;
}

.summary-card.won-ads .summary-count {
    color: #4caf50;
}

.summary-card.testing-ads .summary-count {
    color: #ff9800;
}

.summary-card.lost-ads .summary-count {
    color: #f44336;
}

.summary-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}



.winning-ads-table-section {
    margin-bottom: 40px;
}

.winning-ads-table-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.winning-ads-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.winning-ads-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.winning-ads-table th,
.winning-ads-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f4fa;
    font-size: 0.9rem;
}

.winning-ads-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Sortable header styles for winning ads table */
.winning-ads-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.winning-ads-table th.sortable:hover {
    background: #e9ecef;
    color: #2196f3;
}

.winning-ads-table th.sortable .sort-icon {
    margin-left: 8px;
    opacity: 0.5;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.winning-ads-table th.sortable:hover .sort-icon {
    opacity: 1;
}

.winning-ads-table th.sortable.sorted .sort-icon {
    opacity: 1;
    color: #2196f3;
}

.winning-ads-table th.sortable.sorted-asc .sort-icon::before {
    content: "\f0de"; /* fa-sort-up */
}

.winning-ads-table th.sortable.sorted-desc .sort-icon::before {
    content: "\f0dd"; /* fa-sort-down */
}

.winning-ads-table tbody tr:hover {
    background: #f8f9fa;
}

.classification-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.classification-won {
    background: #e8f5e9;
    color: #2e7d32;
}

.classification-learning,
.classification-testing {
    background: #fff3e0;
    color: #f57c00;
}

.classification-lost {
    background: #ffebee;
    color: #c62828;
}

.performance-score {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.score-excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.score-good {
    background: #e3f2fd;
    color: #1976d2;
}

.score-average {
    background: #fff3e0;
    color: #f57c00;
}

.score-poor {
    background: #ffebee;
    color: #c62828;
}

.classification-actions {
    display: flex;
    gap: 5px;
}

.classification-action-btn {
    padding: 4px 8px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.classification-action-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.classification-action-btn.won {
    border-color: #4caf50;
    color: #4caf50;
}

.classification-action-btn.won:hover {
    background: #4caf50;
    color: white;
}

.classification-action-btn.testing,
.classification-action-btn.learning {
    border-color: #ff9800;
    color: #ff9800;
}

.classification-action-btn.testing:hover,
.classification-action-btn.learning:hover {
    background: #ff9800;
    color: white;
}

.classification-action-btn.lost {
    border-color: #f44336;
    color: #f44336;
}

.classification-action-btn.lost:hover {
    background: #f44336;
    color: white;
}

.classification-insights {
    margin-bottom: 40px;
}

.classification-insights h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.classification-insights .insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.classification-insights .insight-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-left: 4px solid #2196f3;
}

.classification-insights .insight-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2196f3, #1769aa);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.classification-insights .insight-content h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.classification-insights .insight-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Recommendations System Styles */
.recommendation-container {
    max-width: 300px;
}

.recommendation-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #2196f3;
}

.recommendation-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recommendation-urgent {
    border-left-color: #f44336;
    background: #ffebee;
}

.recommendation-warning {
    border-left-color: #ff9800;
    background: #fff3e0;
}

.recommendation-success {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.recommendation-info {
    border-left-color: #2196f3;
    background: #e3f2fd;
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.recommendation-icon {
    font-size: 1.2rem;
}

.recommendation-action {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.recommendation-urgent .recommendation-action {
    color: #c62828;
}

.recommendation-warning .recommendation-action {
    color: #f57c00;
}

.recommendation-success .recommendation-action {
    color: #2e7d32;
}

.recommendation-info .recommendation-action {
    color: #1976d2;
}

.recommendation-reason {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.3;
}

.recommendation-more {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

/* Recommendations Modal */
.recommendations-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.recommendations-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.recommendations-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e1e1;
}

.recommendations-modal-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.performance-summary {
    padding: 25px 30px;
    border-bottom: 1px solid #e1e1e1;
}

.performance-summary h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 600;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.metric-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.recommendations-section {
    padding: 25px 30px;
}

.recommendations-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 600;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-detail-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #2196f3;
}

.recommendation-detail-card.recommendation-urgent {
    border-left-color: #f44336;
    background: #ffebee;
}

.recommendation-detail-card.recommendation-warning {
    border-left-color: #ff9800;
    background: #fff3e0;
}

.recommendation-detail-card.recommendation-success {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.recommendation-detail-card.recommendation-info {
    border-left-color: #2196f3;
    background: #e3f2fd;
}

.recommendation-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.recommendation-detail-header h4 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.recommendation-detail-card.recommendation-urgent .recommendation-detail-header h4 {
    color: #c62828;
}

.recommendation-detail-card.recommendation-warning .recommendation-detail-header h4 {
    color: #f57c00;
}

.recommendation-detail-card.recommendation-success .recommendation-detail-header h4 {
    color: #2e7d32;
}

.recommendation-detail-card.recommendation-info .recommendation-detail-header h4 {
    color: #1976d2;
}

.recommendation-detail-card .recommendation-reason {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.recommendation-detail-card .recommendation-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.recommendations-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e1e1;
    text-align: right;
}

/* Ad Status Badge Styles */
.ad-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Ad Creative Styles */
.ad-creative-cell {
    width: 80px;
    padding: 8px !important;
    text-align: center;
}

.ad-creative-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e1e1e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-creative-image:hover {
    border-color: #2196f3;
    transform: scale(1.05);
}

.ad-creative-placeholder {
    width: 60px;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.7rem;
    background: #f8f9fa;
}

.ad-creative-placeholder i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.ad-creative-placeholder span {
    font-size: 0.6rem;
    text-align: center;
}

/* Responsive Recommendations */
@media (max-width: 768px) {
    .recommendations-modal {
        padding: 10px;
    }
    
    .recommendations-modal-content {
        max-height: 95vh;
    }
    
    .recommendations-modal-header,
    .performance-summary,
    .recommendations-section,
    .recommendations-modal-footer {
        padding: 20px;
    }
    
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    
    .recommendation-container {
        max-width: 250px;
    }
    
    .recommendation-card {
        padding: 10px;
    }
    
    .recommendation-action {
        font-size: 0.8rem;
    }
    
    .recommendation-reason {
        font-size: 0.7rem;
    }
    
    .ad-creative-cell {
        width: 60px;
        padding: 4px !important;
    }
    
    .ad-creative-image,
    .ad-creative-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .ad-creative-placeholder i {
        font-size: 1rem;
    }
    
    .ad-creative-placeholder span {
        font-size: 0.5rem;
    }
    
    .ad-status-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .marketing-header {
        padding: 30px 20px;
        margin: -20px -20px 20px -20px;
    }
    
    .marketing-header h1 {
        font-size: 2rem;
    }
    
    .marketing-tabs {
        flex-direction: column;
    }
    
    .marketing-tab {
        padding: 15px;
        font-size: 1rem;
    }
    
    .ads-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ads-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generated-images {
        grid-template-columns: 1fr;
    }
    
    .ai-chat-messages {
        padding: 15px;
    }
    
    .ai-message,
    .user-message {
        max-width: 95%;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .top-performers-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .ads-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .top-ads-grid {
        grid-template-columns: 1fr;
    }
    
    .ads-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .creative-insights-grid {
        grid-template-columns: 1fr;
    }
    
    .ads-table {
        min-width: 800px;
    }
    
    .classification-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .classification-summary {
        grid-template-columns: 1fr;
    }
    
    .rules-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .rules-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    
    .winning-ads-table {
        min-width: 800px;
    }
    
    .classification-insights .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .campaigns-grid,
    .adsets-grid,
    .individual-ads-grid {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb-nav {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .marketing-header {
        padding: 20px 15px;
    }
    
    .marketing-header h1 {
        font-size: 1.5rem;
    }
    
    .marketing-header p {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .image-generator-container {
        padding: 20px;
    }
    
    .style-grid {
        grid-template-columns: 1fr;
    }
}

/* CPA Rules Collapsible Dropdown */
.cpa-rules-dropdown {
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cpa-rules-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.cpa-rules-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.cpa-rules-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpa-rules-toggle-icon {
    font-size: 1rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.cpa-rules-toggle-icon.rotated {
    transform: rotate(180deg);
}

.cpa-rules-content {
    padding: 0;
    background: white;
    transition: all 0.3s ease;
}

.cpa-rules-content.show {
    animation: slideDown 0.3s ease-out;
}

.cpa-rules-content.hide {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 25px;
    }
    to {
        opacity: 1;
        max-height: 2000px;
        padding: 25px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 2000px;
        padding: 25px;
    }
    to {
        opacity: 0;
        max-height: 0;
        padding: 0 25px;
    }
}

/* Responsive adjustments for CPA Rules */
@media (max-width: 768px) {
    .cpa-rules-header {
        padding: 15px 20px;
    }
    
    .cpa-rules-header h4 {
        font-size: 1.1rem;
    }
    
    .cpa-rules-content {
        padding: 20px !important;
    }
}

/* Creative Ideas Styles */
.creative-ideas-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.creative-ideas-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.creative-ideas-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.8rem;
}

.creative-ideas-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.add-angle-section {
    margin-bottom: 30px;
}

.add-angle-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.add-angle-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    flex: 1;
    justify-content: center;
    min-width: 200px;
}

.add-angle-btn #addAngleChevron {
    transition: transform 0.2s ease;
    margin-left: auto;
}

.add-angle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ai-generate-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
    min-width: 150px;
    justify-content: center;
}

.ai-generate-btn #aiGenerateChevron {
    transition: transform 0.2s ease;
    margin-left: auto;
}

.ai-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.settings-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
    min-width: 50px;
    gap: 8px;
}

.settings-btn #settingsChevron {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.settings-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Dropdown Styles */
.add-angle-dropdown,
.ai-generate-dropdown,
.business-settings-dropdown {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 12px;
    overflow: hidden;
}

.dropdown-content {
    padding: 20px;
}

.dropdown-content h4 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}


.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.save-angle-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-angle-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.cancel-angle-btn {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cancel-angle-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* AI Generate Dropdown Styles */
.ai-generate-content {
    padding: 0;
}

.ai-status {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.ai-status p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.ai-controls {
    text-align: center;
    margin-bottom: 20px;
}

.generate-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.generate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.generated-angles {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.generated-angles h4,
.generated-angles h5 {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.generated-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.generated-angle-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.generated-angle-content {
    flex: 1;
}

.generated-angle-title {
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.generated-angle-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.generated-angle-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.save-single-btn {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-single-btn:hover {
    background: #059669;
}

.remove-single-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.remove-single-btn:hover {
    background: #dc2626;
}

.generated-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.save-all-btn {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.save-all-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.clear-generated-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.clear-generated-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Business Settings Dropdown Styles */
.business-settings-content {
    padding: 0;
}

.business-settings-content p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.save-settings-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-settings-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.cancel-settings-btn {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cancel-settings-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* AI Generate Prompts Dropdown Styles */
.ai-generate-prompts-dropdown {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.ai-generate-prompts-dropdown .dropdown-content {
    padding: 16px;
}

.angle-info {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.angle-info-content h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
}

.angle-info-content h5 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.angle-info-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.prompt-quantity-section {
    margin-bottom: 16px;
}

.prompt-quantity-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.prompt-quantity-section select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.15s ease;
}

.prompt-quantity-section select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.generate-prompts-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.generate-prompts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.generate-prompts-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.generated-prompts {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    margin-top: 16px;
}

.generated-prompts h4 {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.generated-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.generated-prompt-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.generated-prompt-content {
    flex: 1;
}

.generated-prompt-title {
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.generated-prompt-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.generated-prompt-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.save-single-prompt-btn {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-single-prompt-btn:hover {
    background: #059669;
}

.remove-single-prompt-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.remove-single-prompt-btn:hover {
    background: #dc2626;
}

.generated-prompts-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.save-all-prompts-btn {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.save-all-prompts-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.clear-generated-prompts-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.clear-generated-prompts-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Prompt Details Styling */
.prompt-details {
    margin-top: 8px;
}

.prompt-section {
    margin-bottom: 12px;
}

.prompt-section:last-child {
    margin-bottom: 0;
}

.prompt-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.generated-prompt-details {
    margin-top: 8px;
}

.generated-prompt-strategy {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

.prompt-strategy {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.prompt-strategy:hover {
    background-color: #f3f4f6;
}

.ad-angles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ad-angle-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 12px;
}

.ad-angle-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ad-angle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}


.ad-angle-header:hover {
    background: #f3f4f6;
}

.ad-angle-header.expanded {
    background: #eff6ff;
    border-bottom-color: #3b82f6;
}

.ad-angle-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    flex: 1;
}

.ad-angle-title:hover {
    background: rgba(33, 150, 243, 0.1);
}

.ad-angle-title::before {
    content: "💡";
    font-size: 1.2rem;
}



.ad-angle-title.editing {
    background: white;
    border: 2px solid #2196f3;
    outline: none;
}

.ad-angle-title input {
    background: none;
    border: none;
    outline: none;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Status Button Styles */
.status-btn {
    width: 20px;
    height: 20px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.status-btn:hover {
    transform: scale(1.05);
    border-color: #9ca3af;
}

.status-btn.pending {
    border-color: #d1d5db;
    color: #9ca3af;
}

.status-btn.pending:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.status-btn.completed {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.status-btn.completed:hover {
    background: #45a049;
    border-color: #45a049;
}

.status-btn.rejected {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.status-btn.rejected:hover {
    background: #da190b;
    border-color: #da190b;
}

/* Status Dropdown Styles */
.status-dropdown {
    position: relative;
    display: inline-block;
}

.status-options {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    display: none;
    flex-direction: row;
    gap: 2px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-right: 8px;
    min-width: max-content;
}

/* Adjust positioning for prompts to prevent off-screen issues */
.prompt-header .status-options {
    right: auto;
    left: 100%;
    margin-right: 0;
    margin-left: 8px;
    /* Ensure dropdown doesn't go off screen */
    max-width: calc(100vw - 20px);
}

/* If there's not enough space on the right, position to the left */
.prompt-header .status-options.force-left {
    right: 100%;
    left: auto;
    margin-right: 8px;
    margin-left: 0;
}

/* Ensure dropdown is always visible */
.status-options {
    /* Add a small delay to allow positioning calculation */
    transition: none;
}

.status-option {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.status-option:hover {
    transform: scale(1.1);
}

.status-option.pending {
    border-color: #ddd;
    color: #999;
}

.status-option.pending:hover {
    border-color: #2196f3;
    color: #2196f3;
}

.status-option.completed {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.status-option.completed:hover {
    background: #45a049;
    border-color: #45a049;
}

.status-option.rejected {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.status-option.rejected:hover {
    background: #da190b;
    border-color: #da190b;
}

.ad-angle-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.angle-action-btn {
    background: none;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    opacity: 0.7;
}

.angle-action-btn:hover {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
    opacity: 1;
}

.angle-action-btn.delete:hover {
    background: #f44336;
    border-color: #f44336;
}

.expand-icon {
    font-size: 0.9rem;
    color: #666;
    transition: transform 0.2s ease;
}

.ad-angle-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.ad-angle-content {
    display: none;
    padding: 20px;
    background: white;
}

.ad-angle-card.expanded .ad-angle-content {
    display: block;
}

.ad-angle-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 16px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-angle-description:hover {
    background: #f3f4f6;
    border-left-color: #2563eb;
}

.ad-angle-description.editing {
    background: white;
    border: 2px solid #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ad-angle-description textarea {
    background: none;
    border: none;
    outline: none;
    font-size: inherit;
    color: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.ad-prompts-section {
    margin-top: 0;
}

.prompts-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prompt-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prompts-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-prompt-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.ai-generate-prompts-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.add-prompt-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.ai-generate-prompts-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Add Prompt Form Styles */
.add-prompt-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.prompt-form-content h6 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}

.new-prompt-title {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: all 0.15s ease;
    background: white;
}

.new-prompt-title:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.new-prompt-description {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.15s ease;
    background: white;
}

.new-prompt-strategy {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
    background-color: #f9fafb;
    color: #6b7280;
    transition: all 0.15s ease;
}

.new-prompt-description:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.new-prompt-strategy:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: white;
    color: #374151;
}

.prompt-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.save-prompt-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-prompt-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.cancel-prompt-btn {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cancel-prompt-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-item {
    background: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}

.prompt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.prompt-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.prompt-title {
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.prompt-title:hover {
    background: rgba(59, 130, 246, 0.1);
}

.prompt-title.editing {
    background: white;
    border: 2px solid #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.prompt-title input {
    background: none;
    border: none;
    outline: none;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
}

.prompt-description {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.prompt-description:hover {
    background: rgba(59, 130, 246, 0.1);
}

.prompt-description.editing {
    background: white;
    border: 2px solid #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.prompt-description textarea {
    background: none;
    border: none;
    outline: none;
    font-size: inherit;
    color: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
    resize: vertical;
    min-height: 40px;
    font-family: inherit;
}



.add-prompt-btn {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.add-prompt-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.save-angle-btn {
    background: linear-gradient(135deg, #2196f3, #1769aa);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.save-angle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Load Facebook Ads Button Styles */
.load-ads-section {
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.2);
}

.load-ads-btn {
    background: white;
    color: #4267B2;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.load-ads-btn:hover {
    background: #f0f2f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.load-ads-btn:active {
    transform: translateY(0);
}

.load-ads-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-ads-btn:disabled:hover {
    background: white;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.load-ads-btn i {
    font-size: 1.3rem;
}

.load-ads-description {
    color: white;
    margin: 15px 0 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Ask AI Tab Styles */
.ask-ai-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    padding: 30px;
}

.ask-ai-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.ask-ai-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ask-ai-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.campaign-selection-section {
    margin-bottom: 30px;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.selection-header h4 {
    margin: 0;
    color: #333;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selection-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.select-all-btn,
.deselect-all-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.select-all-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.deselect-all-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.copy-selected-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.copy-selected-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.copy-selected-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.copy-selected-btn.has-selection {
    background: linear-gradient(135deg, #10b981, #059669);
}

.copy-selected-btn.has-selection:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-campaigns {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-campaigns i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #3b82f6;
}

.loading-campaigns p {
    margin: 0;
    font-size: 1.1rem;
}

.no-campaigns {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

.no-campaigns i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.no-campaigns p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 1.1rem;
}

.campaign-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.campaign-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.campaign-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.campaign-checkbox {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.campaign-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    margin: 0;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.campaign-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.campaign-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.campaign-info {
    flex: 1;
}

.campaign-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.campaign-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.campaign-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-item i {
    color: #3b82f6;
    font-size: 0.8rem;
}

.copy-status {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.copy-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.copy-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.copy-status.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Ask AI */
@media (max-width: 768px) {
    .ask-ai-container {
        padding: 20px;
    }
    
    .ask-ai-header h3 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .selection-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .selection-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .campaign-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .campaign-stats {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .copy-selected-btn {
        width: 100%;
        justify-content: center;
    }
}
