:root {
    --stats-accent: #0d6efd;
    --stats-accent-soft: rgba(13, 110, 253, 0.08);
    --stats-ticket: #0f766e;
    --stats-ticket-soft: rgba(15, 118, 110, 0.1);
    --stats-card-bg: #fff;
    --stats-border: rgba(0, 0, 0, 0.08);
    --stats-muted: #6c757d;
    --stats-radius: 14px;
    --stats-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stats-page {
    padding-bottom: 3rem;
}

.stats-hero {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--stats-radius);
    background:
        linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(13, 110, 253, 0.02) 55%),
        #fff;
    border: 1px solid var(--stats-border);
    box-shadow: var(--stats-shadow);
    text-align: center;
}

.stats-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stats-hero p {
    margin: 0 auto;
    color: var(--stats-muted);
    max-width: 42rem;
}

.stats-nav {
    position: sticky;
    top: 58px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.65rem 0;
    margin-bottom: 1.25rem;
    background: rgba(248, 249, 250, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--stats-border);
}

.stats-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--stats-border);
    background: #fff;
    color: #212529;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.stats-nav a:hover,
.stats-nav a:focus-visible {
    background: var(--stats-accent-soft);
    border-color: rgba(13, 110, 253, 0.35);
    color: var(--stats-accent);
    transform: translateY(-1px);
}

.stats-nav a.is-ticket {
    background: var(--stats-ticket-soft);
    border-color: rgba(15, 118, 110, 0.28);
    color: var(--stats-ticket);
}

.stats-nav a.is-ticket:hover,
.stats-nav a.is-ticket:focus-visible {
    background: rgba(15, 118, 110, 0.16);
    border-color: rgba(15, 118, 110, 0.45);
    color: var(--stats-ticket);
}

.stats-section {
    margin-bottom: 2rem;
    scroll-margin-top: 120px;
}

.stats-section-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.stats-section-head h2 {
    margin: 0;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.stats-section-head .badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 8px;
    background: var(--stats-accent-soft);
    color: var(--stats-accent);
    font-size: 0.95rem;
    line-height: 1;
}

.stats-section-head .badge-icon i {
    display: block;
    line-height: 1;
    width: 1em;
    height: 1em;
}

.stats-section-head .badge-icon i::before {
    vertical-align: 0;
    line-height: 1;
}

.stats-section.is-ticket .stats-section-head .badge-icon {
    background: var(--stats-ticket-soft);
    color: var(--stats-ticket);
}

.stats-section-desc {
    margin: -0.35rem 0 1rem;
    color: var(--stats-muted);
    font-size: 0.95rem;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stats-kpi {
    padding: 0.9rem 1rem;
    border-radius: var(--stats-radius);
    background: linear-gradient(180deg, #fff, #f8fffe);
    border: 1px solid rgba(15, 118, 110, 0.18);
    box-shadow: var(--stats-shadow);
}

.stats-kpi-label {
    display: block;
    font-size: 0.78rem;
    color: var(--stats-muted);
    margin-bottom: 0.2rem;
}

.stats-kpi-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--stats-ticket);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.stats-kpi-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--stats-muted);
}

.stats-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 992px) {
    .stats-charts.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.stats-card {
    position: relative;
    background: var(--stats-card-bg);
    border: 1px solid var(--stats-border);
    border-radius: var(--stats-radius);
    box-shadow: var(--stats-shadow);
    padding: 1rem 1rem 0.75rem;
    min-height: 100%;
}

.stats-card.is-ticket {
    border-color: rgba(15, 118, 110, 0.2);
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.04), transparent 4.5rem),
        #fff;
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 2rem;
    margin-bottom: 0.75rem;
    padding-right: 2.25rem;
}

.stats-card-title {
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 650;
    text-align: center;
}

.stats-card-header .choco-fs-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.stats-card-chart {
    position: relative;
    width: 100%;
    height: 300px;
}

.stats-card canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.stats-card.full-screen {
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 1.25rem 1.5rem 1.5rem;
}

.stats-card.full-screen .stats-card-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
    padding-right: 2.75rem;
}

.stats-card.full-screen .stats-card-title {
    font-size: 1.35rem;
}

.stats-card.full-screen .stats-card-chart {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    display: flex;
    align-items: stretch;
}

.stats-card.full-screen canvas {
    width: 100% !important;
    height: 100% !important;
}

.stats-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--stats-muted);
    border: 1px dashed var(--stats-border);
    border-radius: var(--stats-radius);
    background: #fafbfc;
}
