.stats-page-workbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.stats-page-back {
    flex-shrink: 0;
    margin-top: 4px;
}

.stats-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.stats-page-title > span {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-hover, var(--accent));
    font-size: 20px;
    font-weight: 700;
}

.stats-page-title h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.stats-page-title p {
    margin: 5px 0 0;
    color: var(--text-secondary, var(--text-muted));
    font-size: 13px;
}

.stats-page-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stats-card {
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--surface-elevated, var(--surface-panel));
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.stats-card-label {
    display: block;
    color: var(--text-muted, #6b7280);
    font-size: 0.84rem;
    margin-bottom: 6px;
}

.stats-card-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

.stats-page-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.stats-panel {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--surface-elevated, var(--surface-panel));
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.stats-panel h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.stats-panel-text {
    margin: 0;
    color: var(--text-muted, #6b7280);
    font-size: 0.92rem;
}

.stats-panel-empty {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-subtle, rgba(0, 0, 0, 0.02));
    border: 1px dashed var(--border-subtle, rgba(0, 0, 0, 0.1));
}

.stats-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 160px;
    padding-top: 4px;
}

.stats-bar-item {
    flex: 1;
    min-width: 0;
    max-width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 140px;
    justify-content: flex-end;
}

.stats-bar-fill {
    width: 100%;
    min-height: 4px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--accent-soft), var(--accent));
}

.stats-bar-label {
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
}

.stats-table-wrap {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.stats-table th,
.stats-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    text-align: left;
    vertical-align: top;
}

.stats-table th {
    color: var(--text-muted, #6b7280);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--surface-subtle, rgba(0, 0, 0, 0.02));
}

.stats-table tbody tr:last-child td {
    border-bottom: 0;
}

.stats-table th:nth-child(1),
.stats-table td:nth-child(1) {
    width: 22%;
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2) {
    width: auto;
}

.stats-table th:nth-child(3),
.stats-table td:nth-child(3) {
    width: 88px;
    text-align: right;
}

.stats-table th:nth-child(4),
.stats-table td:nth-child(4) {
    width: 150px;
    white-space: nowrap;
}

.stats-empty {
    color: var(--text-muted, #6b7280);
    text-align: center;
}

.stats-table td.stats-empty {
    padding: 28px 14px;
}

.stats-link-url {
    color: var(--text-muted, #6b7280);
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-planner-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.stats-planner-metric {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface-subtle, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.stats-planner-metric span {
    display: block;
    color: var(--text-muted, #6b7280);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.stats-planner-metric strong {
    font-size: 1.45rem;
    line-height: 1.1;
}
