/* Zavier theme-owned stylesheet; visual tokens are finalized by css/theme.css. */
/* Source: app/Modules/Opac/Views/statistics_anggota.php */

.member-statistics-page {
    min-height: 100vh;
    padding: 32px 20px 76px;
    color: var(--member-text);
    background: transparent
}

.member-statistics-shell {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto
}

.member-statistics-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 24px 32px;
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03)
}

.member-statistics-back,.member-statistics-heading-icon,.member-statistics-print,.member-panel-header>span,.member-kpi-card>span {
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.member-statistics-back {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--member-blue-dark);
    background: var(--member-blue-soft);
    border: 1px solid #c8dbef;
    border-radius: 10px;
    text-decoration: none
}

.member-statistics-back:hover,.member-statistics-back:focus {
    color: #fff;
    background: var(--member-blue);
    border-color: var(--member-blue)
}

.member-statistics-heading-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    color: var(--member-blue);
    background: var(--member-blue-soft);
    border-radius: 10px
}

.member-statistics-header svg {
    width: 20px;
    height: 20px
}

.member-statistics-heading {
    min-width: 0;
    flex: 1
}

.member-statistics-heading h1 {
    margin: 0;
    color: var(--member-text);
    font-size: clamp(1.3rem,2.3vw,1.75rem);
    font-weight: 700;
    line-height: 1.25
}

.member-statistics-heading p {
    margin: 3px 0 0;
    color: var(--member-muted);
    font-size: .86rem
}

.member-statistics-print {
    gap: 7px;
    min-height: 42px;
    padding: 8px 14px;
    color: var(--member-blue-dark);
    background: #fff;
    border: 1px solid #9bbbdc;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700
}

.member-statistics-print:hover {
    color: #fff;
    background: var(--member-blue)
}

.member-kpi-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px
}

.member-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s
}

.member-kpi-card:hover { transform: translateY(-2px); }

.member-kpi-card>span {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--member-blue);
    background: var(--member-blue-soft);
    border-radius: 10px
}

.member-kpi-card svg {
    width: 21px;
    height: 21px
}

.member-kpi-card>div {
    display: flex;
    min-width: 0;
    flex-direction: column
}

.member-kpi-card small {
    color: var(--member-muted);
    font-size: .74rem;
    font-style: normal;
    font-weight: 600
}

.member-kpi-card strong {
    color: var(--member-text);
    font-size: 1.5rem;
    line-height: 1.2
}

.member-kpi-card em {
    margin-top: 3px;
    color: #7a8b9d;
    font-size: .68rem;
    font-style: normal
}

.member-statistics-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px
}

.member-demographic-grid,.member-table-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))
}

.member-location-grid {
    grid-template-columns: minmax(0,2fr) minmax(280px,1fr)
}

.member-summary-grid {
    grid-template-columns: minmax(0,1.5fr) minmax(310px,1fr)
}

.member-side-column {
    display: grid;
    align-content: start;
    gap: 16px
}

.member-panel {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03)
}

.member-trend-panel {
    margin-bottom: 16px
}

.member-panel-header {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 70px;
    padding: 14px 17px;
    border-bottom: 1px solid #e6edf5
}

.member-panel-header>span {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--member-blue);
    background: var(--member-blue-soft);
    border-radius: 10px
}

.member-panel-header svg {
    width: 19px;
    height: 19px
}

.member-panel-header h2 {
    margin: 0;
    color: var(--member-text);
    font-size: .96rem;
    font-weight: 700
}

.member-panel-header p {
    margin: 2px 0 0;
    color: var(--member-muted);
    font-size: .73rem
}

.member-panel-body {
    padding: 17px
}

.member-mini-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none
}

.member-mini-stats::-webkit-scrollbar {
    display: none
}

.member-mini-stats>div {
    display: flex;
    min-width: 110px;
    padding: 10px;
    flex: 1;
    flex-direction: column;
    text-align: center;
    background: #f5f8fb;
    border: 1px solid #e0e8f0;
    border-radius: 10px
}

.member-mini-stats strong {
    color: var(--member-blue-dark);
    font-size: 1.05rem
}

.member-mini-stats span {
    overflow: hidden;
    color: #3f566d;
    font-size: .72rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap
}

.member-mini-stats small {
    color: var(--member-muted);
    font-size: .66rem
}

.member-chart {
    position: relative;
    height: 300px
}

.member-chart-doughnut {
    height: 230px
}

.member-progress-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none
}

.member-progress-list li>div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px
}

.member-progress-list span {
    color: #354d64;
    font-size: .78rem;
    font-weight: 600
}

.member-progress-list strong {
    color: #253c53;
    font-size: .76rem
}

.member-progress-list strong small {
    color: var(--member-muted);
    font-size: .68rem;
    font-weight: 500
}

.member-progress-list progress,.member-table-progress progress {
    display: block;
    width: 100%;
    height: 7px;
    overflow: hidden;
    appearance: none;
    background: #e9eff5;
    border: 0;
    border-radius: 999px
}

.member-progress-list progress::-webkit-progress-bar,.member-table-progress progress::-webkit-progress-bar {
    background: #e9eff5;
    border-radius: 999px
}

.member-progress-list progress::-webkit-progress-value,.member-table-progress progress::-webkit-progress-value {
    background: var(--member-blue);
    border-radius: 999px
}

.member-progress-list progress::-moz-progress-bar,.member-table-progress progress::-moz-progress-bar {
    background: var(--member-blue);
    border-radius: 999px
}

.member-progress-list.compact {
    gap: 12px
}

.member-table-body {
    padding: 0
}

.member-table-wrap {
    width: 100%;
    overflow-x: auto
}

.member-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem
}

.member-table-wrap th {
    padding: 11px 14px;
    color: #52687e;
    background: #f3f7fa;
    border-bottom: 1px solid #dbe5ef;
    font-size: .68rem;
    text-transform: uppercase;
    white-space: nowrap
}

.member-table-wrap th:not(:first-child),.member-table-wrap td:not(:first-child) {
    text-align: right
}

.member-table-wrap td {
    padding: 11px 14px;
    color: #415970;
    border-bottom: 1px solid #e9eff5
}

.member-table-wrap tbody tr:last-child td {
    border-bottom: 0
}

.member-table-wrap td>svg {
    width: 14px;
    height: 14px;
    margin-right: 7px;
    color: var(--member-blue);
    vertical-align: middle
}

.member-table-wrap td strong {
    color: #263e56;
    font-weight: 650
}

.member-table-wrap td>span {
    display: inline-block;
    padding: 4px 7px;
    color: var(--member-blue-dark);
    background: var(--member-blue-soft);
    border-radius: 7px;
    font-size: .68rem;
    font-weight: 700
}

.member-table-progress {
    display: grid;
    grid-template-columns: minmax(90px,1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 150px
}

.member-table-progress small {
    color: var(--member-muted);
    font-size: .66rem
}

.member-trend-kpis {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin-bottom: 16px
}

.member-trend-kpis>div {
    display: flex;
    padding: 12px;
    flex-direction: column;
    background: #f5f8fb;
    border: 1px solid #e0e8f0;
    border-radius: 10px;
    text-align: center
}

.member-trend-kpis small {
    color: var(--member-muted);
    font-size: .7rem
}

.member-trend-kpis strong {
    color: var(--member-blue-dark);
    font-size: 1.05rem
}

.member-trend-kpis strong.is-positive {
    color: #24704c
}

.member-trend-kpis strong.is-negative {
    color: #b44141
}

.member-empty {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--member-muted);
    font-size: .78rem;
    text-align: center
}

.member-empty.small {
    min-height: 80px
}

.member-empty svg {
    width: 30px;
    height: 30px;
    color: #91a5ba
}

.member-summary-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none
}

.member-summary-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #455c72;
    font-size: .8rem;
    line-height: 1.5
}

.member-summary-list svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--member-blue)
}

.member-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 16px
}

.member-export-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 43px;
    padding: 8px 11px;
    color: var(--member-blue-dark);
    background: #fff;
    border: 1px solid #9bbbdc;
    border-radius: 10px;
    font-size: .76rem;
    font-weight: 700
}

.member-export-actions button:hover {
    color: #fff;
    background: var(--member-blue);
    border-color: var(--member-blue)
}

.member-export-actions svg {
    width: 16px;
    height: 16px
}

@media(max-width:992px) {
    .member-demographic-grid,.member-table-grid,.member-location-grid,.member-summary-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:768px) {
    .member-statistics-page {
        padding: 76px 0 calc(92px + env(safe-area-inset-bottom))
    }
    .member-statistics-header {
        gap: 10px;
        margin: 0 0 12px;
        padding: 13px;
        border-radius: 10px;
        border: 1px solid #e8eef4;
    }
    .member-statistics-heading-icon {
        display: none
    }
    .member-statistics-heading p {
        font-size: .74rem
    }
    .member-statistics-print {
        flex: 0 0 40px;
        width: 40px;
        padding: 0
    }
    .member-statistics-print span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0)
    }
    .member-kpi-list {
        display: flex;
        gap: 10px;
        margin: 0 0 12px;
        padding: 2px 12px 10px;
        overflow-x: auto;
        scroll-padding-inline: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none
    }
    .member-kpi-list::-webkit-scrollbar {
        display: none
    }
    .member-kpi-card {
        flex: 0 0 178px;
        min-height: 108px;
        padding: 14px;
        scroll-snap-align: start
    }
    .member-statistics-grid,.member-side-column {
        gap: 12px
    }
    .member-statistics-grid,.member-trend-panel {
        margin: 0 0 12px;
    }
    .member-panel {
        border-radius: 10px;
        border: 1px solid #e8eef4;
        box-shadow: none
    }
    .member-panel-header {
        min-height: 65px;
        padding: 12px 14px
    }
    .member-panel-body {
        padding: 14px
    }
    .member-table-body {
        padding: 0
    }
    .member-chart {
        height: 270px
    }
    .member-chart-doughnut {
        height: 225px
    }
    .member-trend-kpis {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none
    }
    .member-trend-kpis::-webkit-scrollbar {
        display: none
    }
    .member-trend-kpis>div {
        flex: 0 0 155px;
        scroll-snap-align: start
    }
    .member-export-actions {
        padding: 14px
    }
}

@media print {
    .member-statistics-page {
        padding: 0;
        background: #fff
    }
    .no-print,.main-header,.mobile-bottom-nav,.main-footer {
        display: none!important
    }
    .member-statistics-header,.member-panel,.member-kpi-card {
        box-shadow: none;
        break-inside: avoid
    }
    .member-demographic-grid,.member-table-grid,.member-location-grid,.member-summary-grid {
        grid-template-columns: 1fr
    }
    .member-panel {
        margin-bottom: 12px
    }
}
