
/* =========================================
   CSSPLAYER ANALYTICS DASHBOARD
========================================= */

.analytics-dashboard {
    max-width: 1250px;
    margin: 110px auto 60px;
    padding: 25px;
    font-family: inherit;
    color: #171717;
}

/* Dashboard Header */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.dashboard-eyebrow {
    display: inline-block;
    color: #673ab7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.dashboard-header h1 {
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #171717;
}

.dashboard-header p {
    color: #777;
    font-size: 14px;
    margin: 0;
}

/* Refresh Button */

.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 23px;
    border: none;
    border-radius: 7px;
    background: linear-gradient(to right, #673ab7 0%, #2196f3 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(56, 0, 189, .15);
    transition: .3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(56, 0, 189, .22);
}

.refresh-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Analytics Cards */

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.analytics-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 12px;
    padding: 25px;
    min-height: 155px;
    box-shadow: 0 5px 25px rgba(20, 20, 50, .035);
    transition: .3s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    border-color: #d9d0f4;
    box-shadow: 0 12px 30px rgba(20, 20, 50, .07);
}

.analytics-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(103, 58, 183, .08),
        rgba(33, 150, 243, .08)
    );
}

.analytics-card span {
    display: block;
    position: relative;
    z-index: 1;
    color: #777a9c;
    font-size: 13px;
    font-weight: 600;
}

.analytics-card h2 {
    position: relative;
    z-index: 1;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: #171717;
    margin: 18px 0 9px;
}

.analytics-card small {
    position: relative;
    z-index: 1;
    color: #999;
    font-size: 12px;
}

/* Analytics Sections */

.analytics-section {
    margin-top: 25px;
    padding: 28px;
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(20, 20, 50, .035);
}

.analytics-section h3 {
    margin: 0 0 25px;
    color: #171717;
    font-size: 18px;
    font-weight: 700;
}

/* Category Distribution */

.category-row {
    margin-bottom: 21px;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 9px;
}

.category-info span {
    color: #555;
    font-size: 13px;
}

.category-info strong {
    color: #171717;
    font-size: 13px;
}

.progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    background: #f0eff5;
    border-radius: 20px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #673ab7, #2196f3);
    border-radius: 20px;
    transition: width .8s ease;
}

/* Daily Activity */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 17px;
    background: #f8f8fb;
    border: 1px solid #f0eff5;
    border-radius: 8px;
    transition: .2s ease;
}

.activity-row:hover {
    background: #f2effb;
}

.activity-row span {
    color: #555;
    font-size: 13px;
}

.activity-row strong {
    color: #673ab7;
    font-size: 13px;
}

/* Status Message */

#analyticsStatus {
    margin-top: 20px;
    color: #777;
    font-size: 12px;
    text-align: right;
}

/* Responsive */

@media (max-width: 991px) {
    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .analytics-dashboard {
        margin-top: 90px;
        padding: 16px;
    }

    .dashboard-header {
        align-items: flex-start;
    }

    .dashboard-header h1 {
        font-size: 26px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .analytics-card {
        min-height: 135px;
        padding: 21px;
    }

    .analytics-section {
        padding: 20px;
    }

    .analytics-section h3 {
        font-size: 16px;
    }

    .refresh-btn {
        width: 100%;
    }
}
