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

:root {
    /* Primary Colors - Professional Blue & Orange */
    --primary-blue: #0066cc;
    --primary-blue-dark: #004c99;
    --primary-blue-light: #3385d6;
    --accent-orange: #ff6b35;
    --accent-orange-dark: #e55a2b;
    
    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    
    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: var(--spacing-lg) 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    width: 48px;
    height: 48px;
    stroke-width: 2;
}

.header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-meta {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.header-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.header-meta i {
    width: 18px;
    height: 18px;
}

/* Section Titles */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title i {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
    stroke-width: 2;
}

/* Market Overview Section */
.market-overview {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue-light);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 28px;
    height: 28px;
    color: white;
    stroke-width: 2;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Competitors Section */
.competitors-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.competitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--spacing-lg);
}

.competitor-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.competitor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue-light);
}

.competitor-card.featured {
    border: 2px solid var(--accent-orange);
    position: relative;
}

.competitor-card.featured::before {
    content: 'FEATURED';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: var(--spacing-lg);
    color: white;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.company-logo {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.company-logo i {
    width: 36px;
    height: 36px;
    stroke-width: 2;
}

.company-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.badge.pioneer {
    background: var(--accent-orange);
}

.badge.leader {
    background: #28a745;
}

.badge.specialist {
    background: #6f42c1;
}

.badge.mobile {
    background: #17a2b8;
}

.badge.hybrid {
    background: #fd7e14;
}

.card-body {
    padding: var(--spacing-lg);
}

.metric-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--bg-tertiary);
    font-size: 0.95rem;
}

.metric-row:last-of-type {
    border-bottom: none;
}

.metric-row i {
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
    flex-shrink: 0;
    stroke-width: 2;
}

.strengths, .services {
    margin-top: var(--spacing-lg);
}

.strengths h4, .services h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.strengths h4 i, .services h4 i {
    width: 20px;
    height: 20px;
    color: var(--success);
    stroke-width: 2;
}

.strengths ul {
    list-style: none;
    padding-left: 0;
}

.strengths li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.strengths li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.service-tags span {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.service-tags span:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Comparison Matrix */
.comparison-matrix {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.matrix-container {
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
}

.comparison-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.comparison-table th:first-child {
    border-radius: 16px 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 16px 0 0;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--bg-tertiary);
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: var(--bg-secondary);
}

.comparison-table td {
    padding: var(--spacing-md);
    text-align: left;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table i.check {
    color: var(--success);
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.comparison-table i.cross {
    color: var(--danger);
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.comparison-table i.partial {
    color: var(--warning);
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Charts Section */
.charts-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--spacing-lg);
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.chart-card h3 i {
    width: 24px;
    height: 24px;
    color: var(--primary-blue);
    stroke-width: 2;
}

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

/* Insights Section */
.insights-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.insight-card {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-blue);
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-orange);
}

.insight-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.insight-icon i {
    width: 28px;
    height: 28px;
    color: white;
    stroke-width: 2;
}

.insight-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.insight-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Footer */
.dashboard-footer {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, #001a33 100%);
    color: white;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-info p, .footer-meta p {
    margin: 4px 0;
    opacity: 0.9;
}

.footer-meta {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .competitors-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .matrix-container {
        overflow-x: scroll;
    }
    
    .comparison-table {
        min-width: 800px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-meta {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .competitor-card {
        min-width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .competitor-card, .chart-card, .insight-card {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .dashboard-header {
        position: static;
    }
    
    .competitor-card, .chart-card, .insight-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}