/* ==================== */
/* Analytics Page       */
/* ==================== */

.analytics-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.analytics-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c6d73 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.analytics-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.analytics-subtitle {
    font-size: 16px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Metrics Summary */
.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.metric-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

.metric-card.highlight-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon svg {
    color: white;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-percentage {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #10b981;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.chart-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chart-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.chart-card.full-width .chart-container {
    height: 400px;
}

/* Data Table Section */
.data-table-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

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

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

.data-table thead {
    background: #f9fafb;
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

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

/* Table Cell Styles */
.table-market-type {
    font-weight: 600;
    color: var(--text-primary);
}

.table-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
}

.table-badge.high {
    background: #d1fae5;
    color: #065f46;
}

.table-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.table-badge.low {
    background: #f3f4f6;
    color: #6b7280;
}

.table-badge.stryker {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.table-competitor {
    font-weight: 500;
    color: var(--text-primary);
}

.table-number {
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-header {
        padding: 24px 16px;
    }

    .analytics-header h1 {
        font-size: 28px;
    }

    .analytics-subtitle {
        font-size: 14px;
    }

    .metrics-summary {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 28px;
    }

    .chart-card,
    .data-table-section {
        padding: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .chart-card.full-width .chart-container {
        height: 300px;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .analytics-header h1 {
        font-size: 24px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-icon {
        width: 50px;
        height: 50px;
    }

    .metric-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ==================== */
/* GPO Charts Grid      */
/* ==================== */

.gpo-section {
    padding: 32px;
}

.gpo-charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.gpo-chart-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gpo-chart-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gpo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.gpo-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.gpo-chart-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chart-container-small {
    height: 300px;
    position: relative;
}

@media (max-width: 1400px) {
    .gpo-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gpo-charts-grid {
        grid-template-columns: 1fr;
    }

    .gpo-section {
        padding: 24px 16px;
    }
}
