
/* =========================================================
   PREMIUM STATS DASHBOARD
   ========================================================= */

.stats-page {
    --stats-radius: 16px;
    --stats-border: rgba(0, 0, 0, .07);
    --stats-muted: #6c757d;

    --stats-primary: #0d6efd;
    --stats-success: #198754;
    --stats-warning: #d99b00;
    --stats-info: #079bb7;
    --stats-danger: #dc3545;

    padding-bottom: 2rem;
}


/* =========================================================
   HEADER
   ========================================================= */

.stats-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.stats-eyebrow {
    display: flex;
    align-items: center;
    gap: .45rem;

    margin-bottom: .45rem;

    color: var(--stats-primary);

    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.stats-eyebrow i {
    font-size: .75rem;
}

.stats-page .page-title {
    font-weight: 750;
    letter-spacing: -.035em;
}

.stats-page .text-body-reset {
    color: var(--stats-muted);
}


/* =========================================================
   CARDS
   ========================================================= */

.stats-page .card {
    position: relative;

    overflow: hidden;

    border: 1px solid var(--stats-border);
    border-radius: var(--stats-radius);

    background: var(--bs-body-bg);

    box-shadow:
        0 1px 2px rgba(0, 0, 0, .025),
        0 5px 18px rgba(0, 0, 0, .025);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.stats-page .card:hover {
    border-color: rgba(13, 110, 253, .12);

    box-shadow:
        0 3px 8px rgba(0, 0, 0, .04),
        0 12px 32px rgba(0, 0, 0, .055);
}


/* =========================================================
   PERIOD CARDS
   ========================================================= */

.stats-period-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    opacity: .8;
}

.stats-period-day::before {
    background: var(--stats-primary);
}

.stats-period-week::before {
    background: var(--stats-success);
}

.stats-period-month::before {
    background: var(--stats-warning);
}


/* =========================================================
   ICONS
   ========================================================= */

.stats-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 1.15rem;
}

.stats-icon-primary {
    color: var(--stats-primary);
    background: rgba(13, 110, 253, .09);
}

.stats-icon-success {
    color: var(--stats-success);
    background: rgba(25, 135, 84, .09);
}

.stats-icon-warning {
    color: #c58b00;
    background: rgba(255, 193, 7, .13);
}

.stats-icon-info {
    color: var(--stats-info);
    background: rgba(13, 202, 240, .11);
}


/* =========================================================
   CARD TITLES
   ========================================================= */

.stats-page .card-title {
    font-weight: 650;
    letter-spacing: -.015em;
}


/* =========================================================
   PERIOD LIST
   ========================================================= */

.stats-list {
    display: flex;
    flex-direction: column;
}

.stats-list-row {
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(0, 0, 0, .045);

    transition:
        background-color .15s ease,
        padding .15s ease;
}

.stats-list-row:last-child {
    border-bottom: 0;
}

.stats-list-row:hover {
    margin-left: -.35rem;
    margin-right: -.35rem;

    padding-left: .35rem;
    padding-right: .35rem;

    border-radius: 9px;

    background: rgba(13, 110, 253, .025);
}


/* =========================================================
   ROW ICONS
   ========================================================= */

.row-icon {
    width: 31px;
    height: 31px;

    margin-right: .65rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: .8rem;
}

.row-icon-primary {
    color: var(--stats-primary);
    background: rgba(13, 110, 253, .08);
}

.row-icon-warning {
    color: #c58b00;
    background: rgba(255, 193, 7, .12);
}

.row-icon-info {
    color: var(--stats-info);
    background: rgba(13, 202, 240, .1);
}


/* =========================================================
   VALUES
   ========================================================= */

.stat-value {
    color: var(--bs-emphasis-color);

    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.comments-value {
    color: var(--bs-emphasis-color);

    font-size: 2.65rem;
    line-height: 1;

    font-weight: 800;
    letter-spacing: -.055em;
}

.database-value {
    color: var(--bs-emphasis-color);

    font-size: 1.35rem;
    line-height: 1.2;

    font-weight: 750;
    letter-spacing: -.025em;
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.stats-section-title {
    min-height: 38px;
}

.section-line {
    height: 1px;

    background: var(--bs-border-color);

    opacity: .75;
}


/* =========================================================
   MAIN STATISTICS
   ========================================================= */

.main-stats-list {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.main-stat-row {
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: .35rem .65rem;

    border-radius: 9px;

    transition: background-color .15s ease;
}

.main-stat-row:hover {
    background: rgba(13, 110, 253, .025);
}


/* =========================================================
   COMMENTS
   ========================================================= */

.comments-total {
    padding-top: .25rem;
}

.comments-button {
    min-height: 40px;

    border-radius: 9px;

    font-weight: 550;

    transition:
        transform .15s ease,
        background-color .15s ease,
        border-color .15s ease;
}

.comments-button:hover {
    transform: translateY(-1px);
}

.comments-button i:last-child {
    transition: transform .15s ease;
}

.comments-button:hover i:last-child {
    transform: translateX(3px);
}


/* =========================================================
   DATABASE
   ========================================================= */

.stats-database-card {
    background:
        linear-gradient(
            120deg,
            rgba(13, 110, 253, .035),
            transparent 55%
        );
}


/* =========================================================
   TOP USERS
   ========================================================= */

.stats-topusers-card {
    overflow: hidden;
}

.stats-users-table {
    --bs-table-bg: transparent;
}

.stats-users-table > tbody > tr {
    transition: background-color .15s ease;
}

.stats-users-table > tbody > tr:hover {
    background-color: rgba(13, 110, 253, .035);
}

.stats-users-table > tbody > tr > td {
    border-color: rgba(0, 0, 0, .055);
}

.stats-users-table a {
    color: var(--bs-emphasis-color);

    font-weight: 600;

    text-decoration: none;

    transition: color .15s ease;
}

.stats-users-table a:hover {
    color: var(--stats-primary);
}


/* =========================================================
   DARK MODE
   ========================================================= */

[data-bs-theme="dark"] .stats-page {
    --stats-border: rgba(255, 255, 255, .08);
    --stats-muted: #9aa0a6;
}

[data-bs-theme="dark"] .stats-page .card {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .15),
        0 7px 22px rgba(0, 0, 0, .14);
}

[data-bs-theme="dark"] .stats-page .card:hover {
    border-color: rgba(255, 255, 255, .12);

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .2),
        0 14px 34px rgba(0, 0, 0, .2);
}

[data-bs-theme="dark"] .stats-list-row {
    border-bottom-color: rgba(255, 255, 255, .06);
}

[data-bs-theme="dark"] .stats-list-row:hover,
[data-bs-theme="dark"] .main-stat-row:hover {
    background: rgba(255, 255, 255, .025);
}

[data-bs-theme="dark"] .stats-database-card {
    background:
        linear-gradient(
            120deg,
            rgba(13, 110, 253, .075),
            transparent 60%
        );
}

[data-bs-theme="dark"] .stats-users-table > tbody > tr:hover {
    background-color: rgba(255, 255, 255, .035);
}

[data-bs-theme="dark"] .stats-users-table > tbody > tr > td {
    border-color: rgba(255, 255, 255, .06);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767.98px) {

    .stats-page {
        padding-bottom: 1rem;
    }

    .stats-page .card-body {
        padding: 1.25rem !important;
    }

    .stats-icon {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .comments-value {
        font-size: 2.25rem;
    }
}


@media (max-width: 575.98px) {

    .stats-header {
        align-items: flex-start;
    }

    .stats-page .page-title {
        font-size: 1.3rem;
    }

    .stats-eyebrow {
        font-size: .62rem;
    }

    .stats-page .card-title {
        font-size: .94rem;
    }

    .stats-page .small.text-body-reset {
        font-size: .77rem;
    }

    .stat-value {
        font-size: .98rem;
    }

    .comments-value {
        font-size: 2rem;
    }

    .database-value {
        font-size: 1.15rem;
    }

    .stats-section-title {
        gap: .7rem !important;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .stats-page *,
    .stats-page *::before,
    .stats-page *::after {
        transition: none !important;
    }
}

