/* Analytics Layout */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.analytics-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.analytics-chart {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.analytics-chart__title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.analytics-chart__canvas {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: var(--space-xs);
    padding-top: var(--space-md);
}

.analytics-bar {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.analytics-bar__fill {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height var(--transition-slow);
    min-height: 4px;
}

.analytics-bar__fill--youtube { background: var(--platform-youtube); }
.analytics-bar__fill--instagram { background: var(--platform-instagram); }
.analytics-bar__fill--tiktok { background: var(--platform-tiktok); }
.analytics-bar__fill--purple { background: var(--brand-purple); }

.analytics-bar__label {
    font-size: 10px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Top Engaged Posts */
.top-posts {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.top-posts__title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.top-post-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.top-post-item__rank {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.top-post-item__info {
    flex: 1;
    min-width: 0;
}

.top-post-item__title {
    font-size: var(--text-sm);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-post-item__stats {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    display: flex;
    gap: var(--space-md);
    margin-top: 2px;
}

.top-post-item__stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.top-post-item__stat svg {
    width: 12px;
    height: 12px;
}

/* Response Time Widget */
.response-time {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.response-time__value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--brand-purple);
}

.response-time__label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.period-selector__btn {
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.period-selector__btn:hover {
    color: var(--text-primary);
}

.period-selector__btn--active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
