.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

.hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero__avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.hero__username-link {
    font-size: 2.25rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.hero__status {
    display: inline-flex;
    align-items: center;
    height: 1.875rem;
    gap: 0.625rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    transition: border-color var(--t),
    background var(--t),
    color var(--t),
    box-shadow var(--t),
    opacity var(--t);
}

.hero__status-dot {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.hero__status--online {
    color: #b7f7cb;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.10), rgba(34, 197, 94, 0.06));
    border: 1px solid rgba(34, 197, 94, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(34, 197, 94, 0.02),
    0 4px 12px rgba(34, 197, 94, 0.05);
}

.hero__status--online .hero__status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14),
    0 0 6px rgba(34, 197, 94, 0.30);
}

.hero__status--online .hero__status-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.28);
    opacity: 0;
    transform: scale(0.7);
    animation: livePulse 1.8s ease-out infinite;
}

@keyframes livePulse {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    20% {
        opacity: 0.55;
    }
    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}

.hero__badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.badge-pill {
    position: relative;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    height: 1.875rem;
    gap: 0.5rem;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.badge-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.badge-pill--gold {
    background: #4a3200;
    border: 1px solid #b8871b;
    color: #ffd27a;
}

.badge-pill--silver {
    background: #3a4658;
    border: 1px solid #b8c6d8;
    color: #f3f7fd;
}

.badge-pill--bronze {
    background: #442113;
    border: 1px solid #b86438;
    color: #dfb89d;
}

.badge-pill--blue {
    background: #0f2447;
    border: 1px solid #1a6fd4;
    color: #60aaff;
}

.badge-pill--default {
    background: #27303a;
    border: 1px solid #536273;
    color: #b4c0cf;
}

.badge-pill:after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    background: var(--neutral-750);
    color: var(--neutral-100);
    border: 1px solid var(--neutral-600);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 80ms ease, transform 80ms ease, visibility 80ms ease;
    z-index: 50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.badge-pill:hover::after,
.badge-pill:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--neutral-800);
    border: 1px solid var(--neutral-700);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--t);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-500), var(--sky-400));
    opacity: 0;
    transition: opacity var(--t);
}

.stat-card:hover {
    border-color: var(--neutral-600);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card__label {
    font-size: 12px;
    color: var(--neutral-300);
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.stat-card__value {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.charts-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: start;
}

.dist-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.chart-card {
    background: var(--neutral-800);
    border: 1px solid var(--neutral-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--neutral-750);
    flex-wrap: wrap;
}

.chart-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-100);
}

.chart-card__sub {
    font-size: 12px;
    color: var(--neutral-400);
}

.chart-card__body {
    padding: 16px;
    height: 260px;
    position: relative;
}

.chart-card__body--sm {
    height: 160px;
}

.chart-card__body canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-legend {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.chart-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--neutral-300);
}

.chart-legend__item::before {
    content: '';
    width: 10px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.chart-legend__item--blue::before {
    background: var(--blue-400);
}

.chart-legend__item--sky::before {
    background: var(--sky-400);
}

.chart-legend__item--hidden {
    opacity: 0.35;
}

.chart-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 24px;
}

.chart-empty-state__title {
    font-size: 28px;
    font-weight: 600;
    color: var(--neutral-100);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.chart-empty-state__subtitle {
    margin-top: 10px;
    font-size: 13px;
    color: var(--neutral-400);
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        var(--neutral-700) 25%,
        var(--neutral-600) 50%,
        var(--neutral-700) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.hero--loading {
    gap: 0.75rem;
}

.hero--loading {
    align-items: center;
}

.hero__title-skeleton {
    width: 15rem;
    height: 2rem;
    border-radius: 0.5rem;
}

.skeleton-row td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.skeleton-row:hover td {
    background: transparent !important;
}

.stat-card__value--loading {
    display: flex;
    align-items: center;
    min-height: 2rem;
}

.stat-card__value--loading .skeleton-line {
    height: 1.25rem;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 700px) {
    .page-header-row {
        flex-direction: column;
    }

    .hero {
        flex-shrink: 1;
        min-width: 0;
        gap: 0.5rem;
    }

    .hero__avatar {
        width: 2.25rem;
        height: 2.25rem;
    }

    .hero__username-link {
        font-size: 1.625rem;
    }

    .hero__status {
        height: 1.625rem;
        gap: 0.5rem;
        padding: 0 0.6rem;
        letter-spacing: 0.35px;
    }

    .hero__status-dot {
        width: 0.375rem;
        height: 0.375rem;
    }

    .hero__status--online {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 0 1px rgba(34, 197, 94, 0.02),
        0 3px 8px rgba(34, 197, 94, 0.04);
    }

    .hero__status--online .hero__status-dot {
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12),
        0 0 4px rgba(34, 197, 94, 0.24);
    }

    .hero__status--online .hero__status-dot::after {
        inset: -4px;
    }

    .hero__badges {
        gap: 0.5rem;
    }

    .badge-pill {
        height: 1.625rem;
        gap: 0.375rem;
        padding: 0 10px;
        font-size: 11px;
        letter-spacing: 0.35px;
    }

    .badge-pill svg {
        width: 12px;
        height: 12px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card__label {
        font-size: 11px;
        margin-bottom: 0.375rem;
    }

    .stat-card__value {
        font-size: 22px;
    }

    .charts-layout {
        gap: 0.5rem;
    }

    .dist-col {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .hero--loading {
        min-height: 2.25rem;
    }

    .hero__title-skeleton {
        width: 10rem;
        height: 1.5rem;
    }

    .stat-card__value--loading .skeleton-line {
        height: 1rem;
    }
}
