/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Insights Container */
.insights-container {
    display: flex;
    height: 100vh;
}

/* Sidebar - Reusing from dashboard */
.sidebar {
    width: 240px;
    background: #f5f4f0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e5e5;
}

.sidebar-header {
    padding: 24px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo-text {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.logo-arabic {
    font-size: 16px;
    color: #716d52;
    font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: #e8e7e3;
    color: #1a1a1a;
}

.nav-item.active {
    background: #e8e7e3;
    color: #1a1a1a;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e5e5;
}

.nav-item.support {
    margin-bottom: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-bottom: 16px;
    color: #666;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #e8e7e3;
    border-radius: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.user-role {
    font-size: 12px;
    color: #666;
}

.dropdown-icon {
    color: #666;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #ffffff;
}

.content-header {
    padding: 40px 48px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
}


/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 48px 32px;
}

.metric-card {
    background: #f5f4f0;
    padding: 28px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: none;
}

.metric-header {
    margin-bottom: 16px;
}

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

.metric-content {
    margin-bottom: 8px;
}

.metric-value {
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.percent {
    font-size: 24px;
    font-weight: 400;
}

.metric-change {
    font-size: 13px;
    color: #666;
}

.metric-change.positive {
    color: #95b70f;
}

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

.metric-chart {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 140px;
    height: 70px;
}

/* Market Opportunity Alert */
.opportunity-alert {
    margin: 0 48px 40px;
    padding: 28px;
    background: #E8F2FF;
    border-radius: 16px;
    display: flex;
    gap: 20px;
}

.alert-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Tables Section */
.tables-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 48px 48px;
    align-items: start;
}

.table-container {
    background: #f5f4f0;
    border-radius: 16px;
    padding: 28px;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.table-header p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Views List */
.profile-views-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.views-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.view-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.company-icon {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-icon svg {
    color: #666;
}

.company-info {
    flex: 1;
}

.company-info h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.company-info p {
    font-size: 13px;
    color: #666;
}

.view-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.views-count {
    font-size: 14px;
    font-weight: 500;
}

.time {
    font-size: 13px;
    color: #999;
}

/* Recommendations List */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}

.recommendation-item {
    /* Styles are now in JavaScript file */
}

.recommendation-icon {
    width: 36px;
    height: 36px;
    background: #f0fdf4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recommendation-icon svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.3;
}

.recommendation-content p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.recommendation-impact {
    margin-left: auto;
    flex-shrink: 0;
}

.impact-value {
    font-size: 14px;
    font-weight: 600;
    color: #95b70f;
}

/* View All Link */
.view-all {
    display: inline-block;
    font-size: 13px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.view-all:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

/* Insights Footer */
.insights-footer {
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e5e5;
    background: white;
    margin-top: auto;
}

.footer-logo {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.copyright {
    font-size: 13px;
    color: #999;
}

/* Responsive */
@media (max-width: 1400px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1200px) {
    .tables-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .nav-item span,
    .user-info,
    .dropdown-icon,
    .logo-arabic {
        display: none;
    }
    
    .content-header,
    .metrics-grid,
    .opportunity-alert,
    .tables-section,
    .insights-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Fix notification button clickability and alignment */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 999 !important;
}

/* Ensure dropdown is positioned correctly */
.notification-dropdown {
    z-index: 1000 !important;
}