/*
 * Bộ đếm truy cập ở chân trang cổng thông tin (nền footer: --accent-color, chữ trắng).
 */
.tk-widget {
    display: inline-flex;
    align-items: stretch;
    margin: 16px auto 0;
    padding: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-family: "Be Vietnam Pro", sans-serif;
    text-align: left;
}

.tk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 10px;
    min-width: 0;
}

.tk-item + .tk-item {
    border-left: 1px solid rgba(255, 255, 255, .16);
}

.tk-icon {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    font-size: 14px;
    color: #fff;
}

.tk-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.tk-label {
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
}

.tk-value {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Chấm trạng thái trực tuyến */
.tk-live-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 2px var(--accent-color, #4753bf);
}

.tk-live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #34d399;
    animation: tk-pulse 2s ease-out infinite;
}

@keyframes tk-pulse {
    0% { transform: scale(1); opacity: .7; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* Hiệu ứng khi số liệu thay đổi */
.tk-value.tk-updated {
    animation: tk-flash .8s ease-out;
}

@keyframes tk-flash {
    0% { color: #a7f3d0; }
    100% { color: #fff; }
}

@media (max-width: 575.98px) {
    .tk-widget {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        padding: 4px;
    }

    .tk-item {
        flex-direction: column;
        gap: 6px;
        padding: 8px 4px;
        text-align: center;
    }

    .tk-text {
        align-items: center;
    }

    .tk-label {
        font-size: 11px;
        white-space: normal;
    }

    .tk-value {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tk-live-dot::after,
    .tk-value.tk-updated {
        animation: none;
    }
}
