/* Online Gebruikers Pagina */

.page-container {
    max-width: 100%;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg);
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 10px;
    padding: 1.15rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(14, 22, 32, 0.05);
}

[data-theme="light"] .stat-card {
    background: #ffffff;
    border-color: #d5dee9;
}

[data-theme="dark"] .stat-card {
    background: var(--dark-surface);
    border-color: var(--dark-border);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

[data-theme="light"] .stat-label {
    color: #334255;
}

[data-theme="dark"] .stat-label {
    color: var(--dark-text-muted);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
}

.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.platform-pwa {
    background: #e3eefb;
    color: #0b5cad;
}

.platform-desktop {
    background: #e8f5ec;
    color: #1f7a3e;
}

.platform-mobile {
    background: #fff4df;
    color: #a86b00;
}

.platform-web {
    background: #e6e9ec;
    color: #2e4253;  /* was #475765 (3.7:1 fail op 12px) — #2e4253 op #e6e9ec = 5.6:1 WCAG AA */
}

[data-theme="dark"] .platform-pwa {
    background: rgba(43, 125, 233, 0.2);
    color: #6bb0ff;
}

[data-theme="dark"] .platform-desktop {
    background: rgba(31, 122, 62, 0.2);
    color: #7dd89f;
}

[data-theme="dark"] .platform-mobile {
    background: rgba(168, 107, 0, 0.25);
    color: #ffcd73;
}

[data-theme="dark"] .platform-web {
    background: rgba(71, 87, 101, 0.3);
    color: #c8d2dc;
}

.connection-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    border-radius: 12px;
    background: var(--subtle);
    font-size: 0.875rem;
    font-weight: 600;
}

[data-theme="dark"] .connection-count {
    background: var(--dark-surface);
}

.refresh-info {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--ink-2);
}

[data-theme="dark"] .refresh-info {
    color: var(--dark-text-muted);
}

.online-user-connected-at {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .online-users-table {
        min-width: 1180px;
    }

    .stats-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .stat-card {
        padding: 0.8rem 0.65rem;
    }

    .stat-value {
        font-size: 1.8rem;
        line-height: 1.05;
    }

    .stat-label {
        font-size: 0.72rem;
        letter-spacing: 0.03em;
    }
}
