/* CSS Custom Properties for Theme */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* 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-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-btn, .user-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.theme-btn:hover, .user-btn:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Theme Panel */
.theme-panel {
    position: fixed;
    top: 80px;
    right: 2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.theme-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-panel h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.color-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.color-picker label {
    font-weight: 500;
    color: var(--text-secondary);
}

.color-picker input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Container Layout */
.container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    min-height: calc(100vh - 80px);
    gap: 0;
}

/* Sidebar */
.sidebar {
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    overflow-y: auto;
}

.nav-menu {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    position: relative;
}

.nav-item:hover {
    background: var(--background-color);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-item.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon-badge {
    background: var(--warning-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.nav-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* Upload Section */
.upload-section {
    padding: 0 1rem;
}

.upload-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--background-color);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color)10, var(--secondary-color)10);
}

.upload-area i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    padding: 2rem;
    overflow-y: auto;
    background: var(--background-color);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Date Selector */
.date-selector {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.date-presets {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.date-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.date-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.date-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.custom-date-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.custom-date-picker input {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.custom-date-picker button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.kpi-card:hover::before {
    transform: scaleX(1);
}

.kpi-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.x-icon { background: linear-gradient(135deg, #000000, #333333); }
.instagram-icon { background: linear-gradient(135deg, #e4405f, #833ab4); }
.facebook-icon { background: linear-gradient(135deg, #1877f2, #42a5f5); }
.telegram-icon { background: linear-gradient(135deg, #0088cc, #229ed9); }
.website-icon { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.community-icon { background: linear-gradient(135deg, var(--success-color), #059669); }

.kpi-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kpi-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.help-icon {
    position: relative;
    cursor: help;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.kpi-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.metric-change.positive {
    background: #dcfce7;
    color: var(--success-color);
}

.metric-change.negative {
    background: #fef2f2;
    color: var(--error-color);
}

.sparkline-container {
    height: 60px;
    position: relative;
}

.sparkline {
    width: 100%;
    height: 100%;
}

/* Charts Section */
.charts-section {
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#mainChart {
    height: 400px !important;
    max-height: 400px;
}

#demographicsChart,
#engagementChart,
#trafficSourcesChart,
#conversionChart,
#correlationChart,
#roiChart,
#campaignChart {
    height: 300px !important;
    max-height: 300px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-controls select {
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
}

.platform-toggles {
    display: flex;
    gap: 0.5rem;
}

.platform-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.platform-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.platform-toggle.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-controls {
    display: flex;
    gap: 1rem;
}

.platform-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Timeline Filter Styles */
.timeline-filter {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.timeline-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    min-width: 50px;
    text-align: center;
}

.timeline-btn:hover {
    background: var(--background-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.timeline-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.timeline-btn.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

/* Custom Date Picker for Timeline */
.timeline-custom-picker {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    min-width: 300px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.timeline-custom-picker.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.timeline-custom-picker h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline-date-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-date-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-date-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.timeline-date-group input {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.timeline-date-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.timeline-picker-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.timeline-picker-actions .btn-secondary,
.timeline-picker-actions .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Enhanced Section Controls */
.section-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.section-controls .platform-filter {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.section-controls .filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    min-width: 80px;
    text-align: center;
}

.section-controls .filter-btn:hover {
    background: var(--background-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.section-controls .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* Timeline Filter Animation */
@keyframes timelineSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-filter {
    animation: timelineSlide 0.3s ease;
}

/* Timeline Filter Responsive */
@media (max-width: 768px) {
    .section-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .timeline-filter,
    .section-controls .platform-filter {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .timeline-btn,
    .section-controls .filter-btn {
        flex: 1;
        min-width: 60px;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .timeline-custom-picker {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        margin: 0;
    }
    
    .timeline-custom-picker.active {
        transform: translate(-50%, -50%);
    }
}

/* Timeline Filter Loading State */
.timeline-filter.loading .timeline-btn {
    opacity: 0.6;
    cursor: not-allowed;
}

.timeline-filter.loading .timeline-btn.active {
    position: relative;
    overflow: hidden;
}

.timeline-filter.loading .timeline-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

/* Analytics Grids */
.social-analytics-grid,
.community-grid,
.website-grid,
.marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.analytics-card,
.community-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.analytics-card:hover,
.community-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.analytics-card.full-width,
.community-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Top Posts List */
.top-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.post-item:hover {
    background: var(--border-color);
}

.post-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.post-content {
    flex: 1;
}

.post-platform {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.post-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0.25rem 0;
    line-height: 1.4;
}

.post-metrics {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Top Accounts List */
.top-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.account-item:hover {
    background: var(--border-color);
}

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.account-info {
    flex: 1;
}

.account-handle {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.account-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Spotlight Account */
.spotlight-account {
    text-align: center;
    padding: 1rem;
}

.spotlight-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}

.spotlight-handle {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.spotlight-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.spotlight-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.875rem;
}

.spotlight-stat {
    text-align: center;
}

.spotlight-stat-value {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.spotlight-stat-label {
    color: var(--text-secondary);
}

/* Sentiment Feed */
.sentiment-feed {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sentiment-item {
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--border-color);
}

.sentiment-item.positive {
    border-left-color: var(--success-color);
}

.sentiment-item.negative {
    border-left-color: var(--error-color);
}

.sentiment-item.neutral {
    border-left-color: var(--warning-color);
}

.sentiment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sentiment-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.sentiment-score {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.sentiment-score.positive {
    background: #dcfce7;
    color: var(--success-color);
}

.sentiment-score.negative {
    background: #fef2f2;
    color: var(--error-color);
}

.sentiment-score.neutral {
    background: #fef3c7;
    color: var(--warning-color);
}

.sentiment-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Referral List */
.referral-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referral-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.referral-item:hover {
    background: var(--border-color);
}

.referral-source {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.referral-metrics {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Right Sidebar */
.right-sidebar {
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.insights-panel,
.quick-actions,
.anomaly-alerts {
    margin-bottom: 2rem;
}

.insights-panel h3,
.quick-actions h3,
.anomaly-alerts h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.insight-item,
.alert-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.insight-item:hover,
.alert-item:hover {
    background: var(--border-color);
}

.insight-icon,
.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.insight-icon.positive,
.alert-icon.positive {
    background: var(--success-color);
}

.insight-icon.warning,
.alert-icon.warning {
    background: var(--warning-color);
}

.insight-icon.negative,
.alert-icon.negative {
    background: var(--error-color);
}

.insight-content,
.alert-content {
    flex: 1;
}

.insight-content h4,
.alert-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.insight-content p,
.alert-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

.action-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Report Builder */
.report-builder {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.report-widgets {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.widget-category h4,
.report-canvas h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    cursor: grab;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.widget-item:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.widget-item:active {
    cursor: grabbing;
}

.canvas-area {
    min-height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.canvas-area.dragover {
    border-color: var(--primary-color);
    background: var(--background-color);
}

.report-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-primary.disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Coming Soon Section */
.coming-soon-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.coming-soon-content {
    max-width: 500px;
}

.coming-soon-content i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.coming-soon-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.coming-soon-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    max-width: 200px;
    line-height: 1.4;
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar,
    .right-sidebar {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }
    
    .social-analytics-grid,
    .community-grid,
    .website-grid,
    .marketing-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .date-presets {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .date-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .platform-toggles {
        flex-wrap: wrap;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slide-in {
    animation: slideIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.3s ease;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus States */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Data Management Styles */
.data-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.data-overview-card,
.upload-manager-card,
.manual-entry-card,
.data-editor-card,
.export-import-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.data-overview-card:hover,
.upload-manager-card:hover,
.manual-entry-card:hover,
.data-editor-card:hover,
.export-import-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.data-editor-card.full-width {
    grid-column: 1 / -1;
}

.data-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.data-status-card {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.status-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.status-indicator.has-data {
    color: var(--success-color);
}

.status-indicator.no-data {
    color: var(--text-muted);
}

.status-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-details p {
    margin-bottom: 0.25rem;
}

.upload-manager {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-selector,
.metric-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.platform-selector label,
.metric-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.platform-selector select,
.metric-selector select {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--background-color);
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color)10, var(--secondary-color)10);
}

.upload-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.upload-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    font-size: 0.875rem;
}

.upload-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--error-color);
    font-size: 0.875rem;
}

.manual-entry-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.metrics-input {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-danger {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.data-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.editor-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.editor-filters select {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.data-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: var(--background-color);
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.backup-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-overview-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.data-overview-actions button {
    width: 100%;
}

/* Tutorials Styles */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.tutorial-card,
.sample-data-card,
.step-guide-card,
.faq-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tutorial-card:hover,
.sample-data-card:hover,
.step-guide-card:hover,
.faq-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.step-guide-card.full-width {
    grid-column: 1 / -1;
}

.platform-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.platform-guide-content {
    line-height: 1.6;
}

.platform-guide-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.platform-guide-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.format-details h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.format-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.format-details li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
}

.format-details code {
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.format-example {
    margin-top: 1rem;
}

.format-example pre {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.4;
}

.format-example code {
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', monospace;
}

.sample-downloads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sample-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.sample-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.sample-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.step-content ul {
    list-style: none;
    padding: 0;
}

.step-content li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.step-content li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.step-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-item.active {
    border-color: var(--primary-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background: var(--background-color);
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--border-color);
}

.faq-question span {
    font-weight: 500;
    color: var(--text-primary);
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.faq-answer {
    display: none;
    padding: 1rem;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Login Screen Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    margin: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-logo i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-error {
    background: #fef2f2;
    color: var(--error-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #fecaca;
    font-size: 0.875rem;
    text-align: center;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.demo-credentials {
    text-align: center;
}

.demo-credentials h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.demo-credentials p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.demo-credentials strong {
    color: var(--text-primary);
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 250px;
    z-index: 200;
    margin-top: 0.5rem;
    overflow: hidden;
}

.user-info {
    padding: 1.5rem;
    background: var(--background-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.menu-item:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.menu-item i {
    width: 16px;
    text-align: center;
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    margin: 2rem;
    position: relative;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.settings-section .form-group {
    margin-bottom: 1rem;
}

.settings-section .form-group:last-child {
    margin-bottom: 0;
}

.settings-section .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.settings-section .form-group input {
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--background-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.settings-section .form-group input[readonly] {
    cursor: not-allowed;
}

.settings-section .btn-secondary,
.settings-section .btn-danger {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

/* Heatmap Styles */
.heatmap-container {
    padding: 1rem;
    overflow-x: auto;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 12px);
    gap: 2px;
    margin-bottom: 1rem;
}

.heatmap-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.heatmap-day:hover {
    transform: scale(1.2);
    border: 1px solid var(--text-primary);
}

.heatmap-day.level-0 {
    background: var(--border-color);
}

.heatmap-day.level-1 {
    background: #c6f6d5;
}

.heatmap-day.level-2 {
    background: #9ae6b4;
}

.heatmap-day.level-3 {
    background: #68d391;
}

.heatmap-day.level-4 {
    background: var(--success-color);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.heatmap-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Print Styles */
@media print {
    .login-screen,
    .user-menu-dropdown,
    .settings-modal {
        display: none !important;
    }
    
    .sidebar,
    .right-sidebar,
    .header {
        display: none;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 0;
    }
    
    .kpi-card,
    .analytics-card,
    .community-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Add slide out animation */
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Metric Controls Styles */
.metric-controls {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.metric-toggles h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.toggle-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.metric-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.metric-toggle-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.metric-toggle-btn i {
    font-size: 0.75rem;
}

/* Multiple Charts Container */
.multiple-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.metric-chart-card {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.metric-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.metric-chart-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-chart-canvas {
    height: 200px !important;
    max-height: 200px;
}

/* Enhanced Heatmap Styles */
.heatmap-container .heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 12px);
    gap: 2px;
    margin-bottom: 1rem;
    justify-content: center;
}

.heatmap-square {
    width: 12px;
    height: 12px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    background: var(--background-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.heatmap-square:hover {
    transform: scale(1.2);
    border-color: var(--text-primary);
    z-index: 10;
    position: relative;
}

.heatmap-square.level-1 {
    background: #0e4429;
}

.heatmap-square.level-2 {
    background: #006d32;
}

.heatmap-square.level-3 {
    background: #26a641;
}

.heatmap-square.level-4 {
    background: #39d353;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-colors {
    display: flex;
    gap: 2px;
}

.legend-square {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    border: 1px solid var(--border-color);
}

.legend-square.level-0 {
    background: var(--background-color);
}

.legend-square.level-1 {
    background: #0e4429;
}

.legend-square.level-2 {
    background: #006d32;
}

.legend-square.level-3 {
    background: #26a641;
}

.legend-square.level-4 {
    background: #39d353;
}

/* X Dashboard Styles */
.x-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
}

.x-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.x-metrics-row.secondary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.x-metric-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.x-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.x-metric-card.primary {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
    color: white;
    border: none;
}

.x-metric-card.primary .metric-label,
.x-metric-card.primary .metric-value {
    color: white;
}

.x-metric-card.small {
    padding: 1rem;
}

.x-metric-card .metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.x-metric-card.primary .metric-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-content .metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-content .metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-content .metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    align-self: flex-start;
    margin-top: 0.5rem;
}

.x-charts-row {
    display: grid;
    gap: 1rem;
}

.x-charts-row:not(.bottom) {
    grid-template-columns: 2fr 1fr;
}

.x-charts-row.bottom {
    grid-template-columns: repeat(4, 1fr);
}

.x-chart-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.x-chart-container:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.x-chart-container .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.x-chart-container .chart-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.x-chart-container .chart-controls select {
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.75rem;
}

.x-chart-container canvas {
    height: 200px !important;
    max-height: 200px;
}

.x-chart-container.main canvas {
    height: 300px !important;
    max-height: 300px;
}

.x-chart-container.quarter canvas {
    height: 150px !important;
    max-height: 150px;
}

/* All Platforms Overview Styles */
.all-platforms-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
}

.platform-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.platform-summary-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
}

.platform-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.platform-header i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.platform-summary-card.x .platform-header i {
    background: #000000;
}

.platform-summary-card.instagram .platform-header i {
    background: linear-gradient(135deg, #e4405f, #833ab4);
}

.platform-summary-card.facebook .platform-header i {
    background: #1877f2;
}

.platform-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.platform-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-item .metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-item .metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.no-data-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.no-data-message p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.no-data-message small {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.platform-chart-container {
    height: 80px;
    position: relative;
}

.platform-chart-container canvas {
    height: 80px !important;
    max-height: 80px;
}

.combined-charts-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.combined-chart-container {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.combined-chart-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.combined-chart-container .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.combined-chart-container .chart-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.combined-chart-container canvas {
    height: 300px !important;
    max-height: 300px;
}

.performance-summary {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.performance-summary h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.summary-item:hover {
    background: var(--border-color);
}

.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.summary-icon.positive {
    background: var(--success-color);
}

.summary-icon.info {
    background: var(--primary-color);
}

.summary-icon.warning {
    background: var(--warning-color);
}

.summary-content {
    flex: 1;
}

.summary-content h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.summary-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive adjustments for new dashboard styles */
@media (max-width: 1024px) {
    .x-charts-row:not(.bottom) {
        grid-template-columns: 1fr;
    }
    
    .x-charts-row.bottom {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-summary-row {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .multiple-charts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .toggle-buttons {
        justify-content: center;
    }
    
    .metric-toggle-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .heatmap-container .heatmap-grid {
        grid-template-columns: repeat(53, 10px);
        gap: 1px;
    }
    
    .heatmap-square {
        width: 10px;
        height: 10px;
    }
    
    .x-metrics-row {
        grid-template-columns: 1fr;
    }
    
    .x-charts-row.bottom {
        grid-template-columns: 1fr;
    }
    
    .x-dashboard {
        padding: 0.5rem;
        gap: 1rem;
    }
    
    .all-platforms-overview {
        padding: 0.5rem;
        gap: 1rem;
    }
}

/* Telegram Integration Styles */
.telegram-integration-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.telegram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0088cc, #229ed9);
    border-radius: var(--radius-xl);
    color: white;
    box-shadow: var(--shadow-md);
}

.telegram-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.telegram-logo i {
    font-size: 2rem;
}

.telegram-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.integration-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.upload-section {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.upload-instructions {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-instructions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-instructions p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.supported-formats {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.format-tag {
    background: var(--background-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.image-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--background-color);
}

.image-upload-zone:hover,
.image-upload-zone.dragover {
    border-color: #0088cc;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.05), rgba(34, 158, 217, 0.05));
}

.upload-icon {
    margin-bottom: 1rem;
}

.upload-icon i {
    font-size: 3rem;
    color: var(--text-muted);
}

.upload-text h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-text p {
    color: var(--text-secondary);
    margin: 0;
}

.browse-btn {
    background: none;
    border: none;
    color: #0088cc;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.browse-btn:hover {
    color: #229ed9;
}

.upload-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 2rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0088cc, #229ed9);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.image-organization-section {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.organization-header {
    text-align: center;
    margin-bottom: 2rem;
}

.organization-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.organization-header p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.expected-order {
    margin-bottom: 2rem;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: grid;
    grid-template-columns: 60px 1fr 300px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.order-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc, #229ed9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.order-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.order-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
}

.drop-zone.drag-over {
    border-color: #0088cc;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(34, 158, 217, 0.1));
    color: #0088cc;
}

.drop-zone.has-image {
    border-color: var(--success-color);
    background: var(--surface-color);
    padding: 0.5rem;
}

.assigned-image {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.assigned-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.assigned-info {
    flex: 1;
    text-align: left;
}

.assigned-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.unassign-btn {
    background: var(--error-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.unassign-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.uploaded-images-pool {
    margin-bottom: 2rem;
}

.uploaded-images-pool h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.images-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    min-height: 120px;
}

.uploaded-image {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.uploaded-image:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.uploaded-image.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.uploaded-image img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-image {
    background: var(--error-color);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.625rem;
    transition: all 0.2s ease;
}

.remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.organization-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.processing-section {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.processing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.processing-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.processing-spinner i {
    font-size: 2rem;
    color: #0088cc;
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.processing-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.processing-step.completed {
    background: #dcfce7;
    border-color: var(--success-color);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-muted);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.processing-step.completed .step-icon {
    background: var(--success-color);
}

.step-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: left;
}

.results-section {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.results-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.success-icon i {
    font-size: 3rem;
    color: var(--success-color);
}

.results-summary {
    margin-bottom: 2rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-card .summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc, #229ed9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.summary-card .summary-content {
    text-align: left;
}

.summary-card .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.summary-card .summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.integration-details {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.integration-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.integration-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.integration-details li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.integration-details li i {
    color: var(--success-color);
    font-size: 1rem;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Responsive adjustments for Telegram integration */
@media (max-width: 1024px) {
    .order-item {
        grid-template-columns: 50px 1fr 250px;
        gap: 0.75rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .telegram-integration-container {
        padding: 0.5rem;
        gap: 1rem;
    }
    
    .telegram-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .order-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .drop-zone {
        min-height: 100px;
    }
    
    .images-pool {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .organization-actions,
    .results-actions {
        flex-direction: column;
    }
    
    .processing-steps {
        max-width: 100%;
    }
}
