/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Limit Notice Styles */
.limit-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.limit-notice p {
    margin: 0;
    font-weight: 500;
}

/* Info Note Styles */
.info-note {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1976d2;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-note strong {
    color: #1565c0;
}

/* Notification Banner Styles */
.notification-banner {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px 0;
    padding: 16px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-text {
    color: #856404;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

/* No Data Banner Styles */
.no-data-banner {
    background: #f8f9fa;
    color: #374151;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.no-data-banner h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #374151;
}

.no-data-banner p {
    margin: 12px 0;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
}

.no-data-banner ul {
    text-align: center;
    display: block;
    margin: 20px 0;
    list-style: none;
    padding: 0;
}

.no-data-banner li {
    margin: 8px 0;
    padding: 4px 0;
    color: #6b7280;
    text-align: center;
}

.no-data-banner .cta-container {
    text-align: center;
    margin: 25px 0;
}

.no-data-banner .cta-button {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    border: none;
}

.no-data-banner .cta-button:hover {
    background: #2563eb;
}

.no-data-banner .help-text {
    margin-top: 15px;
    font-size: 14px;
    color: #9ca3af;
}

/* Suggested Prompts Styles */
.suggested-prompts-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.section-subheader {
    margin-bottom: 20px;
}

.section-subheader h3 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.suggested-prompts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.suggested-prompt-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.suggested-prompt-card:hover {
    border-color: #7f56d9;
    box-shadow: 0 4px 12px rgba(127, 86, 217, 0.15);
    transform: translateY(-2px);
}

/* Added state styling removed - cards are now hidden instead */

/* Icon removed - no longer needed */

.suggested-prompt-content h4 {
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.suggested-prompt-text {
    color: #495057;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    font-style: italic;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #7f56d9;
}

.suggested-prompt-action {
    text-align: center;
}

.suggested-prompt-action .btn-primary {
    background: #7f56d9;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.suggested-prompt-action .btn-primary:hover {
    background: #6941c6;
}

/* Removed conflicting loading-spinner style */

.suggested-prompt-added {
    text-align: center;
    color: #28a745;
    font-size: 14px;
    font-weight: 500;
    padding: 20px;
}

.suggested-prompt-added i {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.existing-prompts-section {
    margin-top: 30px;
}

/* AI Recommendations Loading Styles */
.ai-recommendations-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.ai-recommendations-loading .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ai-recommendations-loading .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.ai-recommendations-loading .btn-primary i {
    width: 20px;
    height: 20px;
}

.ai-recommendations-note {
    margin-top: 12px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* ai-recommendations-actions removed - no refresh button needed */

/* Simple Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 30px;
}

.simple-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Competitor Analysis Styles */
.competitor-analysis-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.competitor-analysis-summary h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.competitor-analysis-summary p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.competitor-analysis-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e1e5e9;
}

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

.competitor-metric-card {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.competitor-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.competitor-metrics-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
}

.competitor-metric-label {
    color: #6c757d;
}

.competitor-metric-value {
    margin-left: 5px;
    font-weight: 500;
}

.competitor-sentiment-positive {
    color: #28a745;
}

.competitor-sentiment-negative {
    color: #dc3545;
}

.competitor-sentiment-neutral {
    color: #6c757d;
}

.competitor-sentiment-not-available {
    color: #ffc107;
}

/* Competitor Logo Styles */
.competitor-logo-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.competitor-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.competitor-logo:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Adjust competitor name styling for logo integration */
.competitor-name .competitor-logo-name {
    gap: 8px;
}

.competitor-name .competitor-logo {
    width: 31px;
    height: 31px;
}

/* Dashboard Competitor Overview Styles */
.competitor-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.competitor-overview-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.competitor-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.competitor-metrics {
    flex-direction: column;
    gap: 12px;
}

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

.metric-label {
    color: #6c757d;
    font-size: 14px;
}

.metric-value {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.no-data {
    text-align: center;
    padding: 5px 5px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    display: inline-block;
}

.not-visible {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.no-data p {
    margin: 0;
    font-size: 16px;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    border: 1px solid;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Login Page Styles */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #7F56D9;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #7F56D9;
}

.btn-primary {
    background: #7F56D9;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    background: #6B46C1;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    color: #666;
    font-size: 14px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

/* Brand Selection Page Styles */
.brand-select-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    margin: 50px auto;
}

.brand-select-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-select-header h1 {
    color: #7F56D9;
    margin-bottom: 10px;
}

.logout-link {
    color: #7F56D9;
    text-decoration: none;
    font-weight: 600;
}

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

.brand-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    border-color: #7F56D9;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(127, 86, 217, 0.2);
}

.brand-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.brand-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.brand-agency {
    color: #7F56D9;
    font-weight: 600;
    margin-bottom: 5px;
}

.brand-industry {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-select-brand {
    background: #7F56D9;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-select-brand:hover {
    background: #6B46C1;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



/* Sidebar Styles */
.dashboard-sidebar {
    background: #fafafa;
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 90;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd; /* light grey, 1px */
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #e1e5e9;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.logo-image {
    width: 27px;
    height: 27px;
    opacity: 0.8;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #7F56D9;
    letter-spacing: 0.5px;
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.beta-tag {
    font-size: 8px;
    font-weight: 500;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: -6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.logo-image:hover {
    opacity: 1;
}

.brand-switcher label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.brand-switcher select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.brand-switcher select:focus {
    outline: none;
    border-color: #7F56D9;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-divider {
    height: 1px;
    background-color: #e1e5e9;
    margin: 8px 16px;
    opacity: 0.6;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #323232;
}

.nav-link.active {
    background: #f5f5f5;
    color: #323232;
    border-left-color: #7F56D9;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Feather Icons specific styling */
.nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

.nav-link:hover .nav-icon svg {
    stroke: #7F56D9;
}

.nav-link.active .nav-icon svg {
    stroke: #7F56D9;
}

.nav-text {
    font-size: 14px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.sidebar-footer .user-info {
    margin-bottom: 15px;
}

.sidebar-footer .user-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.sidebar-footer .user-name {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-footer .user-role {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.link-icon {
    font-size: 10px;
}

.link-text {
    font-size: 11px;
}

/* Feather Icons for footer links */
.link-icon svg {
    width: 10px;
    height: 10px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

/* Releases Page Styles */
.releases-container {
    max-width: 800px;
    margin: 0 auto;
}

.release-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.release-card.latest {
    border-color: #7F56D9;
    background: linear-gradient(135deg, #faf9ff 0%, #ffffff 100%);
}

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

.release-badge {
    background: #7F56D9;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.release-date {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.release-title {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.release-content h3 {
    color: #555;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px 0;
}

.release-content h3:first-child {
    margin-top: 0;
}

.release-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.release-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.feature-icon {
    color: #28a745;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.release-features span {
    color: #555;
    line-height: 1.5;
}

.technical-details {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.technical-details p {
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.technical-details ul {
    margin: 0;
    padding-left: 20px;
}

.technical-details li {
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.sidebar-logout:hover {
    background: #e9ecef;
    color: #495057;

}

.logout-icon {
    font-size: 10px;
}

/* Feather Icons for logout */
.logout-icon svg {
    width: 10px;
    height: 10px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

.logout-text {
    font-size: 11px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    color: #7F56D9;
    font-size: 1.8rem;
}

.brand-info h2 {
    color: #333;
    margin-bottom: 5px;
}

.agency-name {
    color: #666;
    font-size: 14px;
}

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

.user-info {
    color: #666;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-logout {
    background: #dc3545;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

.dashboard-main {
    padding: 30px;
    margin-left: 280px;
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0px 0 0px 0;
  
}

.section-header h1,
.section-header h2 {
    color: #333;
    font-size: 16px;
    margin: 0;
 
}

.section-header p {
    color: #666;
    font-size: 10px;
    margin: 8px 0 0 0;
    font-weight: 400;
}

.batch-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.batch-info p {
    margin: 0;
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-info strong {
    color: #212529;
    font-weight: 600;
    min-width: 80px;
}

.section-header .header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.section-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.section-actions .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.section-actions .btn-primary:hover {
    background: #6B46C1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 86, 217, 0.3);
}



/* Section header with description */
.section-header.has-description {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.section-header.has-description .header-actions {
    align-self: flex-end;
    margin-top: 10px;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #7F56D9;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.actions-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.actions-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.executions-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.executions-section h3 {
    margin-bottom: 20px;
    color: #333;
}

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

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

.executions-table th,
.executions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.executions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

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

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

.status-running {
    background: #cce5ff;
    color: #004085;
}

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

.brand-overview-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.brand-overview-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.brand-details {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    gap: 10px;
}

.detail-item label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.detail-item span {
    color: #333;
}

.detail-item a {
    color: #667eea;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

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

/* Prompts Section Styles */
.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prompt-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

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

.prompt-header h3 {
    color: #333;
    font-size: 0.8rem;
    margin: 0;
}

.language-badge {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.prompt-text {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 14px;
}

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

.prompt-actions button {
    padding: 8px 16px;
    font-size: 13px;
}

/* Settings Section Styles */
.settings-form {
    border-radius: 12px;
    max-width: 600px;
}

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

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

.settings-form input,
.settings-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
}

.settings-form input:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.settings-form input:read-only,
.settings-form textarea:read-only {
    background: #f8f9fa;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Settings Page Styles */
.settings-container {
    display: grid;
    gap: 30px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1rem;
    border-bottom: 2px solid #f0f2ff;
    padding-bottom: 10px;
}

/* Enhanced Brand Information Section */
.brand-info-section {
}

.section-header-inline {
    margin-bottom: 25px;
}

.section-header-inline h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.2rem;
    border-bottom: none;
    padding-bottom: 0;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #7F56D9;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

.brand-settings-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-display-value {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    color: #333;
    min-height: 44px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
}

.form-display-value.prompt-text-display {
    min-height: auto;
    white-space: pre-wrap;
    line-height: 1.6;
}

.no-data {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* AI Bot Detection Tracking Styles */
.tracking-snippet-section {
    margin-top: 20px;
}

.tracking-snippet-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.tracking-snippet-section h5 {
    color: #555;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.code-block {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    color: #495057;
}

.btn-copy {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.btn-copy:hover {
    background: #5a6268;
}

.code-content {
    padding: 16px;
    margin: 0;
    background: #f8f9fa;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    overflow-x: auto;
}

.code-content code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.tracking-key-info {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

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

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

.info-item strong {
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #495057;
}

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

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.tracking-stats {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
}

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

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #7F56D9;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-data {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Traffic Monitoring Styles */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 2px;
}

.stat-period {
    font-size: 12px;
    color: #9ca3af;
}

.chart-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.chart-section h3 {
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.top-models-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
}

.top-models-section h3 {
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.section-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

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

.model-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.model-card:hover {
    background: #f1f3f4;
    transform: translateY(-1px);
}

.model-rank {
    background: #7F56D9;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.model-info {
    flex: 1;
}

.model-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.model-visits {
    font-size: 12px;
    color: #6b7280;
}

.model-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-data-message p {
    margin: 0;
    font-size: 14px;
}

.input-icon {
    width: 16px;
    height: 16px;
    color: #7F56D9;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.brand-settings-form input,
.brand-settings-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.brand-settings-form input:focus,
.brand-settings-form textarea:focus {
    outline: none;
    border-color: #7F56D9;
    background: white;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.brand-settings-form input:disabled,
.brand-settings-form textarea:disabled {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.brand-settings-form input:enabled,
.brand-settings-form textarea:enabled {
    background: white;
    color: #333;
    cursor: text;
    opacity: 1;
}

.brand-settings-form input::placeholder,
.brand-settings-form textarea::placeholder {
    color: #999;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    align-items: center;
}

.form-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.form-actions button i {
    width: 16px;
    height: 16px;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
    border-color: #adb5bd;
}

.btn-primary {
    background: #7F56D9;
    color: white;
}

.btn-primary:hover {
    background: #6B46C1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 86, 217, 0.3);
}

/* Responsive Design for Brand Settings */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .settings-section {
        padding: 20px;
    }
    
    .section-header-inline h3 {
        font-size: 1.1rem;
    }
}



.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

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

/* Prompt Meta Styles */
.prompt-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

.prompt-status {
    padding: 2px 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.prompt-date {
    color: #666;
}

.status-draft {
    background: #e2e3e5;
    color: #495057;
}

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

/* Location Management Styles */
.locations-selection {
    margin: 20px 0;
}

.help-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

.country-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.country-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

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

.location-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
}

.location-checkbox-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.location-checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.location-checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.timezone-info {
    color: #666;
    font-size: 12px;
    font-weight: normal;
}

.location-count {
    color: #666;
    font-size: 14px;
    margin-left: 15px;
}

.location-count span {
    font-weight: 600;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .login-container,
    .brand-select-container {
        margin: 20px auto;
        padding: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
        height: 100vh;
        top: 0;
        z-index: 1000;
    }
    
    .dashboard-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        padding: 20px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .executions-table {
        font-size: 14px;
    }
    
    .executions-table th,
    .executions-table td {
        padding: 8px;
    }
    
    .prompts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 20px 15px 15px 15px;
    }
    
    .section-header.has-description .header-actions {
        align-self: stretch;
        justify-content: center;
    }
} 

/* Prompts Table Styles */
.prompts-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.prompts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.prompts-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e1e5e9;
    font-size: 14px;
}

.prompts-table th:first-child {
    border-top-left-radius: 12px;
}

.prompts-table th:last-child {
    border-top-right-radius: 12px;
}

.prompts-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: top;
}

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

.prompts-table tr:last-child td {
    border-bottom: none;
}

.prompts-table tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.prompts-table tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.prompt-topic {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.prompt-language {
    min-width: 80px;
}

.prompt-text {
    color: #666;
    line-height: 1.4;
    max-width: 300px;
}

.prompt-status {
    min-width: 80px;
}

.prompt-date {
    color: #888;
    font-size: 13px;
    min-width: 100px;
}

.prompt-actions {
    min-width: 200px;
}

.prompt-actions button {
    margin-right: 8px;
    margin-bottom: 4px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    /* No transform animation */
}

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

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

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

.language-badge {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
} 

/* Prompt Form Styles */
.prompt-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
  
    border: 1px solid #e1e5e9;
    max-width: 800px;
}

.prompt-form .form-group {
    margin-bottom: 25px;
}

.prompt-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.prompt-form input,
.prompt-form select,
.prompt-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.prompt-form input:focus,
.prompt-form select:focus,
.prompt-form textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Prompt Details View */
.prompt-details {
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e1e5e9;
    max-width: 800px;
}

.detail-row {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.detail-row.full-width {
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
    margin-right: 20px;
    font-size: 14px;
}

.detail-value {
    color: #555;
    flex: 1;
    line-height: 1.5;
}

.prompt-text-full {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Delete Confirmation */
.delete-confirmation {
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e1e5e9;
    max-width: 600px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.warning-box h3 {
    color: #856404;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.warning-box p {
    color: #856404;
    margin: 0;
    font-size: 14px;
}

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

.summary-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

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

.summary-item strong {
    min-width: 80px;
    margin-right: 15px;
    color: #333;
}

.delete-form .form-group {
    margin-bottom: 25px;
}

.delete-form label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.delete-form input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 400px;
    padding: 15px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prompt-form,
    .prompt-details,
    .delete-confirmation {
        padding: 20px;
        margin: 0 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-label {
        min-width: auto;
        margin-right: 0;
    }
    
    .suggested-prompts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .suggested-prompt-card {
        padding: 12px;
    }
    
    .suggested-prompts-section {
        padding: 15px;
        margin-top: 20px;
        margin-bottom: 30px;
        border-radius: 8px;
    }
} 

/* Competitors Table Styles */
.competitors-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.competitors-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.competitors-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e1e5e9;
    font-size: 14px;
}

.competitors-table th:first-child {
    border-top-left-radius: 12px;
}

.competitors-table th:last-child {
    border-top-right-radius: 12px;
}

.competitors-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: top;
}

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

.competitors-table tr:last-child td {
    border-bottom: none;
}

.competitors-table tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.competitors-table tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.competitor-name {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.competitor-synonyms {
    min-width: 200px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.competitor-website {
    min-width: 120px;
}

.competitor-website a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.competitor-website a:hover {
    text-decoration: underline;
}

.competitor-industry {
    min-width: 100px;
    color: #555;
}



.competitor-status {
    min-width: 80px;
}

.competitor-actions {
    min-width: 280px;
    white-space: nowrap;
}

.competitor-actions button {
    margin-right: 6px;
    margin-bottom: 0;
    display: inline-block;
}

.no-data {
    color: #999;
    font-style: italic;
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
    .competitors-table th,
    .competitors-table td {
        padding: 12px 15px;
    }
    
    .competitor-strengths {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .competitors-table-container {
        margin: 20px -15px 0;
    }
    
    .competitors-table {
        font-size: 13px;
    }
    
    .competitors-table th,
    .competitors-table td {
        padding: 10px 12px;
    }
    
    .competitor-actions {
        min-width: 200px;
    }
    
    .competitor-actions button {
        padding: 4px 8px;
        font-size: 11px;
        margin-right: 4px;
        margin-bottom: 0;
    }
} 

/* Competitor Form Styles */
.competitor-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e1e5e9;
    max-width: 800px;
}

.competitor-form .form-group {
    margin-bottom: 25px;
}

.competitor-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.competitor-form input,
.competitor-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.competitor-form input:focus,
.competitor-form select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.competitor-form .form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Competitor Details View */
.competitor-details {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    max-width: 800px;
}

/* Competitor Summary for Delete Confirmation */
.competitor-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.competitor-summary .summary-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

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

.competitor-summary .summary-item strong {
    min-width: 80px;
    margin-right: 15px;
    color: #333;
}

/* Responsive adjustments for competitor forms */
@media (max-width: 768px) {
    .competitor-form,
    .competitor-details {
        padding: 20px;
        margin: 0 15px;
    }
    
    .competitor-summary .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .competitor-summary .summary-item strong {
        min-width: auto;
        margin-right: 0;
    }
} 

/* Prompt Execution Styles */
.execution-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    max-width: 1000px;
}

.execution-info h3 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.execution-info p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
}

.execution-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.stat-item strong {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.execution-form {
}

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

.execution-form label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.execution-form input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
}

.execution-results {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e1e5e9;
}

.execution-results h3 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.results-table {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.results-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e1e5e9;
    font-size: 13px;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: top;
    font-size: 13px;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.response-preview {
    color: #666;
    line-height: 1.4;
    max-width: 400px;
    max-height: none;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
}

.error-message {
    color: #dc3545;
    font-style: italic;
    max-width: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .execution-container {
        padding: 20px;
        margin: 0 15px;
    }
    
    .execution-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
}

/* Batch summary styling */
.batch-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.batch-summary h4 {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

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

.batch-stat {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.batch-stat strong {
    display: block;
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
} 

/* Reports Page Styles */
.reports-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.report-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}



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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

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

.stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

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

.batch-list {
    margin-top: 20px;
}

.batch-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

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

.batch-name {
    font-weight: 600;
    color: #333;
}

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

.status-completed { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }
.status-running { background: #fff3cd; color: #856404; }
.status-partial { background: #cce5ff; color: #004085; }

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

/* Batch Card Styles */
.batch-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.batch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.stat-box {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

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

.results-table {
    overflow-x: auto;
    margin-top: 20px;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.results-table th, .results-table td {
    padding: 8px;
    border: 1px solid #e1e5e9;
    text-align: left;
}

.results-table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

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

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

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

.status-pending { 
    background: #e2e3e5; 
    color: #383d41; 
}

.response-preview {
    max-width: 400px;
    max-height: none;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.error-message {
    color: #dc3545;
    font-style: italic;
    max-width: 400px;
}

.col-prompt-content {
    width: 20%;
}

.col-location {
    width: 15%;
}

.col-topic {
    width: 20%;
}

.col-response {
    width: 35%;
}

.col-status {
    width: 10%;
}

.col-metrics {
    width: 15%;
}

.batch-actions {
    margin-top: 15px;
}

.execution-summary {
    margin-top: 20px;
    margin-bottom: 30px;
}

/* End Batch Card Styles */

/* Response Row Styling */
.response-row {
    /* No background - let the cell handle it */
}

.openai-response-cell {
    padding: 15px !important;
    border-top: 2px solid #e1e5e9;
}

.response-header {
    color: #495057;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.response-content {
    color: #333;
    line-height: 1.6;
    white-space: normal;
    word-wrap: break-word;
    max-width: none;
    font-size: 15px;
}

/* Enhanced LLM Response Formatting */
.response-content p {
    margin: 0 0 12px 0;
    line-height: 1.7;
}

.response-content p:last-child {
    margin-bottom: 0;
}

/* Bullet Points and Lists */
.response-content ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.response-content ol {
    margin: 12px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

.response-content li {
    margin: 6px 0;
    line-height: 1.6;
}

.response-content ul ul,
.response-content ol ol,
.response-content ul ol,
.response-content ol ul {
    margin: 4px 0;
}

/* Headers */
.response-content h1,
.response-content h2,
.response-content h3,
.response-content h4,
.response-content h5,
.response-content h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.response-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 8px;
}

.response-content h2 {
    font-size: 20px;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 6px;
}

.response-content h3 {
    font-size: 18px;
}

.response-content h4 {
    font-size: 16px;
}

.response-content h5 {
    font-size: 15px;
}

.response-content h6 {
    font-size: 14px;
}

/* Code and Preformatted Text */
.response-content code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.response-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.response-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #333;
}

/* Blockquotes */
.response-content blockquote {
    border-left: 4px solid #007bff;
    background: #f8f9fa;
    margin: 12px 0;
    padding: 12px 16px;
    font-style: italic;
    color: #6c757d;
}

/* Tables */
.response-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 14px;
}

.response-content th,
.response-content td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    text-align: left;
}

.response-content th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Horizontal Rules */
.response-content hr {
    border: none;
    border-top: 2px solid #e1e5e9;
    margin: 20px 0;
}

/* Strong and Emphasis */
.response-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.response-content em {
    font-style: italic;
    color: #495057;
}

/* Links within response content */
.response-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.1);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.response-content a:hover {
    color: #0056b3;
    background: rgba(0, 123, 255, 0.15);
    border-color: #007bff;
    text-decoration: underline;
}

/* Additional LLM Output Patterns */

/* Better spacing for common LLM patterns */
.response-content p:empty {
    margin: 8px 0;
}

/* Special styling for common LLM response sections */
.response-content p:has-text("Summary:") {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e1e5e9;
}

.response-content p:has-text("Analysis:") {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e1e5e9;
}

.response-content p:has-text("Conclusion:") {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e1e5e9;
}

.response-content p:has-text("Recommendations:") {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e1e5e9;
}

/* Response Link Styling */
.response-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.1);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.response-link:hover {
    color: #0056b3;
    background: rgba(0, 123, 255, 0.15);
    border-color: #007bff;
    text-decoration: underline;
}

.response-link:active {
    transform: translateY(1px);
}

/* Ensure main data rows stay white */
.prompt-table-container tbody tr:not(.response-row) {
    background: white;
}

/* End Response Row Styling */

/* Enhanced Metrics Grid Styling */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.visibility-card::before {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.share-card::before {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.positive-card::before {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
}

.negative-card::before {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a24 100%);
}

.neutral-card::before {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

.metric-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
    line-height: 1;
}

.metric-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
    margin-bottom: 12px;
}

.metric-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.8s ease;
}

.visibility-card .progress-bar {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.share-card .progress-bar {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.positive-card .progress-bar {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
}

.negative-card .progress-bar {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a24 100%);
}

.neutral-card .progress-bar {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

/* Enhanced Competitor Analysis Styling */
.competitor-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.competitor-analysis-title {
    display: flex;
    align-items: center;
    margin: 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.competitor-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.competitor-metric-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.competitor-metric-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.competitor-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.competitor-logo-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.competitor-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.competitor-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.competitor-metrics-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.competitor-metric-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.competitor-metric-value {
    font-size: 14px;
    font-weight: 600;
}

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

.metric-badge.success {
    background: #c6f6d5;
    color: #22543d;
}

.metric-badge.danger {
    background: #fed7d7;
    color: #742a2a;
}

.metric-badge.sentiment-positive {
    background: #c6f6d5;
    color: #22543d;
}

.metric-badge.sentiment-negative {
    background: #fed7d7;
    color: #742a2a;
}

.metric-badge.sentiment-neutral {
    background: #e2e8f0;
    color: #4a5568;
}

.metric-badge.sentiment-not-available {
    background: #fef5e7;
    color: #744210;
}

.share-metric {
    color: #667eea;
    font-weight: 700;
}

/* Enhanced Citations Styling */
.citations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    min-width: 0;
}

.citations-title {
    display: flex;
    align-items: center;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.citation-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.citations-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.citation-item {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.citation-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateX(2px);
}

.citation-number {
    background: #667eea;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.citation-link-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.citation-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.3s ease;
}

.citation-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.external-link-icon {
    width: 10px;
    height: 10px;
    color: #a0aec0;
}

.citation-title {
    font-size: 12px;
    color: #2d3748;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.citation-snippet {
    font-size: 11px;
    color: #718096;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    word-wrap: break-word;
}

.no-citations {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 6px;
    color: #718096;
    font-style: italic;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .competitor-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .competitor-analysis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .citations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .no-citations {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
        font-size: 12px;
        padding: 10px 12px;
    }
}

/* Citations Row Styling */
.citations-row {
    /* No background - let the cell handle it */
}

.citations-cell {
    padding: 15px !important;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
}


.citations-content {
    color: #333;
    line-height: 1.6;
}

.citations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.citation-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.citation-number {
    background: #007bff;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
    align-self: flex-start;
}

.citation-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-block;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.citation-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.citation-url {
    color: #6c757d;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    word-break: break-all;
    flex: 1;
}

/* Enhanced citation styles for SerpAPI */
.citation-title {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.4;
    width: 100%;
}

.citation-snippet {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
    width: 100%;
}

/* End Citations Row Styling */

/* Prompt Table Container Styling */
.prompt-table-container {
    margin-bottom: 40px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.prompt-table-container h3 {
    background: #f8f9fa;
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.prompt-table-container .results-table {
    border: none;
    margin: 0;
    border-radius: 0;
}

/* End Prompt Table Container Styling */

/* Share of Voice Badge Styling */
.share-of-voice-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.share-of-voice-badge:not([style*="background"]) {
    background: #17a2b8;
    color: white;
}

/* Dashboard Content */
.dashboard-content {
}

.metrics-overview {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e1e5e9;
    margin-bottom: 24px;
}

.metrics-overview:last-child {
    margin-bottom: 0;
}

.metrics-overview h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.metric-definition {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
    line-height: 1.4;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 5px 5px;
    margin: 0;
}

/* Responsive chart adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .metrics-overview {
        padding: 16px;
    }
}

/* Visibility Dashboard - Two Column Layout */
.visibility-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.chart-column {
    min-height: 300px;
}

.ranking-column {
   
    padding: 1.5rem;
}

/* Share of Voice Dashboard - Two Column Layout */
.share-of-voice-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.pie-column {
    min-height: 300px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-column .chart-container {
    max-width: 400px;
    width: 100%;
}

.ranking-column h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Ranking Table Styles */
.ranking-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ranking-header {
    display: grid;
    grid-template-columns: 40px 1fr 80px 100px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
}

.ranking-row {
    display: grid;
    grid-template-columns: 40px 1fr 80px 100px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s ease;
}

.ranking-row:hover {
    background: #f8fafc;
}

.ranking-row:last-child {
    border-bottom: none;
}


.rank-position {
    font-weight: 600;
    color: #64748b;
    text-align: center;
}

.rank-entity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
}

.entity-name {
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.brand-indicator {
    font-size: 1.1rem;
}

.competitor-indicator {
    font-size: 1rem;
}

.rank-visibility {
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.rank-trend {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.trend-up {
    color: #059669;
}

.trend-down {
    color: #dc2626;
}

.trend-neutral {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .visibility-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ranking-column {
        order: -1; /* Show ranking above chart on mobile */
    }
}

@media (max-width: 768px) {
    .metrics-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .timeframe-filter {
        align-self: flex-start;
        margin-top: 0;
    }
    
    .ranking-header,
    .ranking-row {
        grid-template-columns: 40px 1fr 70px 80px;
        gap: 0.75rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .rank-trend {
        font-size: 0.75rem;
    }
}



/* Timeframe Filter */
.timeframe-filter {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeframe-filter label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.timeframe-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeframe-select:hover {
    border-color: #7F56D9;
}

.timeframe-select:focus {
    outline: none;
    border-color: #7F56D9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.filter-label-disabled {
    color: #9ca3af;
    font-weight: 500;
}

.filter-label {
    color: #374151;
    font-weight: 600;
}

.timeframe-select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.timeframe-select:disabled:hover {
    border-color: #d1d5db;
}

/* Upgrade option styling */
.timeframe-select option:disabled {
    color: #9ca3af !important;
    font-style: italic;
    background-color: #f8f9fa;
    opacity: 0.8;
}

.timeframe-select option:disabled:hover {
    background-color: #f8f9fa;
}

/* Responsive timeframe filter */
@media (max-width: 768px) {
    .timeframe-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .timeframe-filter label {
        text-align: center;
    }
    
    .filter-group {
        align-items: center;
    }
}










/* Citations Table Styles */
.citations-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.citations-section h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.citations-header-row h4 {
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.citations-header-row .btn-secondary {
    margin: 0;
}

.citations-table-container {
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.citations-table {
    width: 100%;
}

.citations-header {
    display: grid;
    grid-template-columns: 120px 200px 4fr;
    gap: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.citation-row {
    display: grid;
    grid-template-columns: 120px 200px 4fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: start;
    font-size: 0.9rem;
}

.citation-row:last-child {
    border-bottom: none;
}

.citation-row:hover {
    background: #f9fafb;
}

.citation-date {
    color: #6b7280;
    font-weight: 500;
}

.citation-entity {
    font-weight: 600;
    color: #374151;
}

.citation-domain {
    min-width: 120px;
    max-width: 120px;
}

.citation-sublink {
    min-width: 0;
    flex: 1;
}

.citation-location {
    color: #6b7280;
    font-size: 0.85rem;
    min-width: 200px;
    max-width: 200px;
}

.citation-urls {
    color: #1f2937;
    line-height: 1.4;
}

.citation-urls a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}

.citation-urls a:hover {
    text-decoration: underline;
}

.domain-item {
    display: inline-block;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
}

.domain-count {
    background: #7F56D9;
    color: white;
    border-radius: 10px;
    padding: 0.125rem 0.375rem;
    margin-left: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.no-citations {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Simplified Citations Table Styling */
.citations-table-container {
    margin-top: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: white;
}

/* Citations Page Specific Column Distribution */
.citations-page .citations-header,
.citations-page .citation-row {
    display: grid;
    grid-template-columns: 160px 1fr 120px;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    align-items: start;
}

.citations-page .citations-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.citations-page .citation-row {
    border-bottom: 1px solid #e5e7eb;
    align-items: start;
    font-size: 0.9rem;
    min-height: 60px;
    transition: background-color 0.2s ease;
}

.citations-page .citation-row:last-child {
    border-bottom: 1px solid #e5e7eb;
}

.citations-page .citation-row:hover {
    background: #f8fafc;
}

/* Citations Page Column Element Styling */
.citations-page .citation-domain {
    color: #1f2937;
    font-weight: 600;
    min-width: 160px;
    max-width: 160px;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    line-height: 1.4;
}

.citations-page .citation-sublink {
    min-width: 0;
    flex: 1;
    line-height: 1.5;
}

.citations-page .citation-sublink a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.citations-page .citation-sublink a:hover {
    text-decoration: underline;
}

.citations-page .citation-title {
    font-size: 0.9rem;
    color: #374151;
    margin-top: 4px;
    margin-bottom: 4px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
}

.citations-page .citation-snippet {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
    word-break: break-word;
    font-style: normal;
}

/* Responsive Design for Citations Table */
@media (max-width: 1024px) {
    .citations-page .citations-header,
    .citations-page .citation-row {
        grid-template-columns: 140px 1fr 100px;
        gap: 1rem;
        padding: 1rem;
    }
    
    .citations-page .citation-domain {
        min-width: 140px;
        max-width: 140px;
        font-size: 0.85rem;
    }
    
    .citations-page .citation-location {
        min-width: 100px;
        max-width: 100px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .citations-page .citations-header,
    .citations-page .citation-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .citations-page .citation-domain {
        min-width: auto;
        max-width: none;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .citations-page .citation-sublink {
        margin-bottom: 0.5rem;
    }
    
    .citations-page .citation-location {
        min-width: auto;
        max-width: none;
        text-align: left;
        font-size: 0.8rem;
        color: #6b7280;
        border-top: 1px solid #f3f4f6;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .citations-page .citation-row {
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* New Citations Table Styling - Alternative Classes */
.citations-table-alt-container {
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.citations-table-alt {
    width: 100%;
}

.citations-header-alt {
    display: grid;
    grid-template-columns: 120px 200px 4fr;
    gap: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.citation-row-alt {
    display: grid;
    grid-template-columns: 120px 200px 4fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: start;
    font-size: 0.9rem;
}

.citation-row-alt:last-child {
    border-bottom: none;
}

.citation-row-alt:hover {
    background: #f9fafb;
}

.citation-date-alt {
    color: #6b7280;
    font-weight: 500;
}

.citation-entity-alt {
    font-weight: 600;
    color: #374151;
}

.citation-domain-alt {
    min-width: 120px;
    max-width: 120px;
}

.citation-sublink-alt {
    min-width: 0;
    flex: 1;
}

.citation-location-alt {
    color: #6b7280;
    font-size: 0.85rem;
    min-width: 200px;
    max-width: 200px;
}

.citation-urls-alt {
    color: #1f2937;
    line-height: 1.4;
}

.citation-urls-alt a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}

.citation-urls-alt a:hover {
    text-decoration: underline;
}

.domain-item-alt {
    display: inline-block;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
}

.domain-count-alt {
    background: #7F56D9;
    color: white;
    border-radius: 10px;
    padding: 0.125rem 0.375rem;
    margin-left: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.no-citations-alt {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Share of Voice Charts Layout */
.share-of-voice-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.share-of-voice-charts .chart-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .share-of-voice-charts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Info Icon Styling */
.info-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #9CA3AF;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    cursor: help;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.info-icon:hover {
    background: #6B7280;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

/* Tooltip positioning */
.info-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: #374151;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 12px;
}

/* Ensure tooltip positioning works */
.metrics-title h3,
.citations-section h4 {
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
}

.citations-section h4 .info-icon {
    margin-left: auto;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #dc2626;
    font-size: 1.1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* Metrics Header Layout */
.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.metrics-title {
    flex: 1;
}

.metrics-title h3 {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.metrics-title .metric-definition {
    margin: 0;
}

/* Updated Timeframe Filter for header positioning */
.timeframe-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Entity Logo Styles */
.entity-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.entity-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.competitor-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.competitor-name {
    margin-left: 0.5rem;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
}

.brand-name {
    margin-left: 0.5rem;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
}



.logo-placeholder {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    line-height: 1;
}

.competitor-logo .logo-placeholder {
    color: #6b7280;
}

/* Update rank-entity to accommodate logos */
.rank-entity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
}

.entity-name {
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Topic Analysis Styles */
.topic-analysis-container {
    padding: 0;
}

/* Dashboard Content Styling for Topic Analysis */
.dashboard-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}


.dashboard-topic-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    margin-top: 20px;
}

/* Topic Analysis Export Button Styling */
.dashboard-topic-content .section-header .section-actions {
    margin-left: auto;
}

.dashboard-topic-content .section-header .section-actions .btn-primary {
    background: linear-gradient(135deg, #7F56D9, #9F7AEA);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(127, 86, 217, 0.2);
}

.dashboard-topic-content .section-header .section-actions .btn-primary:hover {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(127, 86, 217, 0.3);
}

/* Responsive design for export button */
@media (max-width: 768px) {
    .dashboard-topic-content .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-topic-content .section-header .section-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .dashboard-topic-content .section-header .section-actions .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Location Filter Styling */
.metrics-info {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.metrics-info p {
    margin: 0;
    color: #1565c0;
    font-size: 14px;
    text-align: center;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-form label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-form select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #333;
    min-width: 200px;
}

.filter-form select:focus {
    outline: none;
    border-color: #7F56D9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

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

/* Remove hover effects for keyword results and loading state */
#keywordResults:hover,
#loadingState:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #7F56D9, #9F7AEA);
}

.card-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1;
}

.card-content p {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #7F56D9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #7F56D9, #9F7AEA);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.chart-section h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.table-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.table-section h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

.data-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}


.topic-tag {
    background: linear-gradient(135deg, #7F56D9, #9F7AEA);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.brand-tag {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.competitor-tag {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.visibility-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.visibility-indicator.visible {
    background: #10b981;
    color: white;
}

.visibility-indicator.not-visible {
    background: #ef4444;
    color: white;
}

.share-voice {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.no-data {
    color: #9ca3af;
    font-style: italic;
}

.sentiment-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.sentiment-tag.positive {
    background: #10b981;
    color: white;
}

.sentiment-tag.negative {
    background: #ef4444;
    color: white;
}

.sentiment-tag.neutral {
    background: #6b7280;
    color: white;
}

.sentiment-tag.not_available {
    background: #9ca3af;
    color: white;
}

.prompt-preview {
    max-width: 300px;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

.sentiment-bars {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: #f3f4f6;
}

.sentiment-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.sentiment-bar.positive {
    background: #10b981;
}

.sentiment-bar.neutral {
    background: #6b7280;
}

.sentiment-bar.negative {
    background: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .card {
        flex-direction: column;
        text-align: center;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Coming Soon Page Styles */
.coming-soon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.coming-soon-content {
    text-align: center;
    max-width: 600px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.coming-soon-icon {
    margin-bottom: 24px;
}

.coming-soon-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    font-family: 'Poppins', 'Inter', sans-serif;
}

.coming-soon-content p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.6;
}

.feature-list {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.feature-item span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.coming-soon-footer {
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.coming-soon-footer p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
    font-style: italic;
}

.admin-only-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
}

.admin-only-notice p {
    margin: 0;
    color: #92400e;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Admin Dashboard Styles */
.admin-header {
    background: #1f2937;
    color: white;
    padding: 20px;
    border-bottom: 1px solid #374151;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-sections {
    display: grid;
    gap: 30px;
}

.admin-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 12px;
}

.admin-form {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}

.form-row input,
.form-row select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #7F56D9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.form-row button {
    padding: 10px 20px;
    background: #7F56D9;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-row button:hover {
    background: #6b46c1;
}

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

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

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}


.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-agency_admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-brand_manager {
    background: #dcfce7;
    color: #166534;
}



.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.success-message {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #166534;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

.admin-note {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #1e40af;
    font-size: 14px;
}

.admin-note p {
    margin: 0;
    display: flex;
    align-items: center;
}

.admin-note i {
    color: #3b82f6;
}

.role-requirements {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #92400e;
    font-size: 14px;
}

.role-requirements p {
    margin: 0;
    display: flex;
    align-items: center;
}

.role-requirements i {
    color: #f59e0b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
}

/* Topic Analysis Metric Color Coding */
.metric-excellent {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    font-weight: 600;
}

.metric-good {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    font-weight: 600;
}

.metric-average {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600;
}

.metric-poor {
    background-color: #fecaca !important;
    color: #991b1b !important;
    font-weight: 600;
}

.metric-very-poor {
    background-color: #fee2e2 !important;
    color: #7f1d1d !important;
    font-weight: 600;
}

.metric-not-visible {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    font-weight: 600;
}

.metric-no-data {
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    font-weight: 600;
}

/* Sentiment-specific metric colors */
.metric-sentiment-positive {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    font-weight: 600;
}

.metric-sentiment-slightly-positive {
    background-color: #ecfdf5 !important;
    color: #15803d !important;
    font-weight: 600;
}

.metric-sentiment-negative {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    font-weight: 600;
}

.metric-sentiment-slightly-negative {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    font-weight: 600;
}

.metric-sentiment-neutral {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    font-weight: 600;
}

.metric-sentiment-mixed {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600;
}

/* Sentiment indicator spacing */
.sentiment-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.sentiment-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.sentiment-indicator.positive {
    background-color: #dcfce7;
    color: #166534;
}

.sentiment-indicator.negative {
    background-color: #fee2e2;
    color: #991b1b;
}

.sentiment-indicator.neutral {
    background-color: #f3f4f6;
    color: #374151;
}

/* Ensure metric cells have proper padding and text contrast */
.data-table td.metric-excellent,
.data-table td.metric-good,
.data-table td.metric-average,
.data-table td.metric-poor,
.data-table td.metric-very-poor,
.data-table td.metric-not-visible,
.data-table td.metric-no-data,
.data-table td.metric-sentiment-positive,
.data-table td.metric-sentiment-slightly-positive,
.data-table td.metric-sentiment-negative,
.data-table td.metric-sentiment-slightly-negative,
.data-table td.metric-sentiment-neutral,
.data-table td.metric-sentiment-mixed {
    padding: 12px 16px !important;
    text-align: center !important;
    vertical-align: middle !important;
    transition: all 0.2s ease-in-out !important;
}


/* Topic Title Styling */
.topic-title {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 16px !important;
    font-weight: 600 !important;
    color: #495057 !important;
}

.topic-title h4 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #212529 !important;
}

/* AI-Powered Recommendations Section Styles */
.recommendations-section {
    margin: 30px 0;
    padding: 0;
}

.recommendations-header {
    margin-bottom: 25px;
}

.recommendations-title h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recommendation-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7F56D9, #10B981);
    opacity: 0;
    transition: opacity 0.3s ease;
}


.recommendation-card.priority-high {
    border-left: 4px solid #ef4444;
}

.recommendation-card.priority-high::before {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.recommendation-card.priority-medium {
    border-left: 4px solid #f59e0b;
}

.recommendation-card.priority-medium::before {
    background: linear-gradient(90deg, #f59e0b, #10b981);
}

.recommendation-card.priority-low {
    border-left: 4px solid #10b981;
}

.recommendation-card.priority-low::before {
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

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

.recommendation-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.recommendation-priority {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
}

.recommendation-priority.high-priority {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.recommendation-priority.medium-priority {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.recommendation-priority.low-priority {
    background: linear-gradient(135deg, #10b981, #059669);
}

.recommendation-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.recommendation-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.recommendation-metric {
    margin: 0 0 16px 0;
}

.metric-label {
    display: inline-block;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Responsive Design for Recommendations */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .recommendation-card {
        padding: 20px;
    }
    
    .recommendations-title h3 {
        font-size: 20px;
    }
    
    .recommendation-icon {
        font-size: 28px;
    }
    

}

@media (max-width: 480px) {
    .recommendation-card {
        padding: 16px;
    }
    
    .recommendation-title {
        font-size: 16px;
    }
    
    .recommendation-description {
        font-size: 13px;
    }
    
    .btn-action {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Animation for recommendation cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendation-card {
    animation: slideInUp 0.6s ease-out;
}

.recommendation-card:nth-child(1) { animation-delay: 0.1s; }
.recommendation-card:nth-child(2) { animation-delay: 0.2s; }
.recommendation-card:nth-child(3) { animation-delay: 0.3s; }
.recommendation-card:nth-child(4) { animation-delay: 0.4s; }
.recommendation-card:nth-child(5) { animation-delay: 0.5s; }
.recommendation-card:nth-child(6) { animation-delay: 0.6s; }
.recommendation-card:nth-child(7) { animation-delay: 0.7s; }
.recommendation-card:nth-child(8) { animation-delay: 0.8s; }





.recommendation-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* AI Models Grid */
.ai-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ai-model-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

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

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

.model-name {
    font-weight: 600;
    font-size: 16px;
    color: #374151;
}

.confidence-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.model-pattern {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    word-break: break-all;
}

.model-type {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-data {
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

/* Model Configuration Page Styles */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.config-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.config-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-value {
    font-size: 16px;
    color: #1e293b;
}

.config-value code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #0f172a;
}

/* Security Information Styles */
.security-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.security-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.security-content p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Performance Metrics Styles */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.performance-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.performance-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.performance-period {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

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

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

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* User Links in Sidebar Footer */
.user-links {
    margin-top: 8px;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.user-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.user-link i {
    opacity: 0.7;
}

/* Keyword Explorer Filter Styles */
.filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

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

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

.timeframe-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.timeframe-input:focus {
    outline: none;
    border-color: #7F56D9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

/* LLMO Recommendations Styles */
.recommendations-section {
    margin: 30px 0;
    padding: 0;
}

.recommendations-header {
    text-align: center;
    margin-bottom: 30px;
}

.recommendations-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.recommendations-subtitle {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recommendation-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recommendation-card.high-priority {
    border-left: 4px solid #ef4444;
}

.recommendation-card.medium-priority {
    border-left: 4px solid #f59e0b;
}

.recommendation-card.low-priority {
    border-left: 4px solid #10b981;
}

.recommendation-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.recommendation-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.recommendation-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.recommendation-impact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.impact-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.impact-value {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impact-value.High {
    background: #fef2f2;
    color: #dc2626;
}

.impact-value.Medium {
    background: #fffbeb;
    color: #d97706;
}

.impact-value.Low {
    background: #f0fdf4;
    color: #16a34a;
}

.recommendation-action {
    margin-top: 16px;
}

.btn-recommendation {
    display: inline-block;
    padding: 8px 16px;
    background: #7F56D9;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .recommendation-card {
        padding: 20px;
    }
    
    .recommendations-header h3 {
        font-size: 20px;
    }
    
    .recommendations-subtitle {
        font-size: 14px;
    }
}

.timeframe-input::placeholder {
    color: #9ca3af;
}

/* Raw HTML Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* Modern Dashboard Filter Loader */
.dashboard-filter-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.dashboard-filter-loader .spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(127, 86, 217, 0.1);
}

.dashboard-filter-loader .modern-spinner {
    width: 48px;
    height: 48px;
    position: relative;
}

.dashboard-filter-loader .modern-spinner::before,
.dashboard-filter-loader .modern-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.dashboard-filter-loader .modern-spinner::before {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #7F56D9;
    animation: spin 1s linear infinite;
}

.dashboard-filter-loader .modern-spinner::after {
    width: 32px;
    height: 32px;
    top: 8px;
    left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid #a78bfa;
    animation: spin 0.8s linear infinite reverse;
}

.dashboard-filter-loader .loading-text {
    color: #374151;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.dashboard-filter-loader .loading-subtext {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Removed conflicting loading-spinner style */

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

.modal-content-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.modal-actions button {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-actions .btn-primary {
    background-color: #7F56D9;
    color: white;
}

.modal-actions .btn-primary:hover {
    background-color: #6d47c7;
}

.modal-actions .btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.modal-actions .btn-secondary:hover {
    background-color: #e5e7eb;
}

.raw-html-container {
    flex: 1;
    overflow: auto;
    background: #f8fafc;
}

.raw-html-container pre {
    margin: 0;
    padding: 20px 24px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #1f2937;
    background: transparent;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.modal-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #dc2626;
    text-align: center;
}

.modal-error p {
    margin: 0;
    font-size: 16px;
}

/* Small button styles for the code button */
.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-small i {
    width: 12px;
    height: 12px;
}

/* Responsive modal styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-actions {
        padding: 12px 20px;
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .raw-html-container pre {
        padding: 16px 20px;
        font-size: 11px;
    }
}

/* Visibility Rankings Preview Styles */
.rankings-preview {
    padding: 20px 0;
}

.preview-rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.preview-topic-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.preview-topic-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.leader-badge-small {
    background: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.preview-rankings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-ranking-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.preview-ranking-item.brand-item {
    background: #fef3c7;
    border-color: #f59e0b;
}

.ranking-position-small {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    min-width: 20px;
    margin-right: 8px;
}

.entity-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.entity-logo-small {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    object-fit: cover;
}

.entity-name-small {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.entity-name-small.brand-name {
    font-weight: 600;
    color: #92400e;
}

.visibility-rate-small {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
}

.no-preview-data {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-preview-data p {
    margin-top: 12px;
    font-style: italic;
}

/* Preview Rankings Table Styles */
.preview-rankings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-rankings-table th {
    background: #f9fafb;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 14px;
}

.preview-rankings-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    text-align: center;
}

.preview-topic-column {
    text-align: left;
    font-weight: 500;
    color: #1f2937;
    min-width: 150px;
    padding-left: 16px;
    vertical-align: top;
}

.preview-ranking-column {
    min-width: 60px;
    position: relative;
}

.preview-ranking-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 8px;
}

.preview-entity-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    margin-bottom: 6px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-brand-name {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    word-wrap: break-word;
}

/* Additional responsive styles for visibility rankings */
@media (max-width: 768px) {
    .preview-rankings-table {
        font-size: 12px;
    }
    
    .preview-rankings-table th,
    .preview-rankings-table td {
        padding: 8px 4px;
    }
    
    .preview-entity-logo {
        width: 31px;
        height: 31px;
    }
    
    .preview-brand-name {
        font-size: 10px;
        max-width: 60px;
    }
    
    .preview-topic-column {
        min-width: 120px;
        padding-left: 12px;
    }
    
    .preview-ranking-column {
        min-width: 50px;
    }
    
    .preview-ranking-cell {
        min-height: 50px;
        padding: 4px;
    }
}
