.stats-container {
    max-width: 1600px;
    margin: auto;
    padding: 20px;
}

.stats-header {
    text-align: center;
    margin-bottom: 40px;
}

.stats-header h1 {
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 10px;
}

.stats-header p {
    color: var(--ink-subtle);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--surface-1);
    border-radius: var(--rounded-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--hairline);
}

.summary-card .card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.summary-card .card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.summary-card .card-label {
    font-size: 0.875rem;
    color: var(--ink-subtle);
}

.chart-container {
    background: var(--surface-1);
    border-radius: var(--rounded-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--hairline);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title svg {
    width: 20px;
    height: 20px;
}

.mini-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.mini-chart {
    background: var(--surface-2);
    border-radius: var(--rounded-md);
    padding: 16px;
}

.mini-chart-title {
    font-size: 0.875rem;
    color: var(--ink-subtle);
    margin-bottom: 16px;
    text-align: center;
}

.line-chart {
    position: relative;
    height: 180px;
    padding: 10px 0;
}

.line-chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.grid-line {
    border-bottom: 1px dashed var(--hairline);
}

.line-chart-content {
    position: relative;
    height: 100%;
}

.line-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.area-fill {
    fill-opacity: 0.1;
}

.chart-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.chart-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s;
}

.chart-dot:hover {
    transform: translate(-50%, -50%) scale(1.5);
}

.chart-tooltip {
    position: absolute;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--ink);
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.2s;
}

.chart-dot:hover + .chart-tooltip {
    opacity: 1;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.625rem;
    color: var(--ink-subtle);
}

.chart-labels span {
    flex: 1;
    text-align: center;
}

.table-container {
    background: var(--surface-1);
    border-radius: var(--rounded-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--hairline);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.stats-table th {
    padding: 12px 12px;
    text-align: right;
    font-weight: 600;
    color: var(--ink-subtle);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--hairline);
}

.stats-table th:first-child {
    text-align: left;
}

.stats-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid var(--hairline);
}

.stats-table td:first-child {
    text-align: left;
}

.stats-table tr:hover {
    background: var(--bg-hover);
}

.stats-table .date-cell {
    font-weight: 600;
    color: var(--ink);
}

.stats-table .num-value {
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--ink);
    text-align: right;
}

.stats-table .highlight {
    color: var(--primary);
    font-weight: 600;
}

.no-data {
    text-align: center;
    color: var(--ink-subtle);
    padding: 60px 20px;
}

.no-data-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.color-visitors {
    color: var(--primary);
}

.color-chars {
    color: var(--primary);
}

.legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--ink-subtle);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .mini-charts {
        grid-template-columns: 1fr;
    }

    .stats-table th,
    .stats-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .stats-container {
        margin: 60px auto;
        padding: 16px;
    }
}
