/* STEP 112 — Database statistics block inspired by About page */
.stores-db-stats{
    margin:30px 0 26px;
}
.stores-db-stats-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    margin-bottom:13px;
}
.stores-db-stats-head span{
    display:block;
    margin-bottom:3px;
    color:#7c3aed;
    font-size:11px;
    font-weight:950;
}
.stores-db-stats-head h2{
    margin:0;
    color:#17111d;
    font-size:21px;
    font-weight:950;
}
.stores-db-stats-head p{
    margin:0;
    color:#7b7081;
    font-size:10px;
    line-height:1.8;
}
.stores-db-stat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    overflow:hidden;
    border:1px solid #ece8f5;
    border-radius:20px;
    background:#fff;
    box-shadow:0 18px 50px rgba(15,23,42,.075);
}
.stores-db-stat-card{
    position:relative;
    display:flex;
    flex-direction:column;
    min-width:0;
    min-height:150px;
    padding:20px 22px;
    border-left:1px solid #eef0f3;
    color:inherit;
    text-decoration:none;
    background:#fff;
}
.stores-db-stat-card:last-child{border-left:0}
.stores-db-stat-card::after{
    content:"";
    position:absolute;
    left:-38px;
    bottom:-55px;
    width:126px;
    height:126px;
    border-radius:50%;
    background:rgba(124,58,237,.04);
    pointer-events:none;
}
.stores-db-stat-card>a{color:inherit}
.stores-db-stat-label{
    color:#667085;
    font-size:11px;
    font-weight:850;
}
.stores-db-stat-main{
    position:relative;
    z-index:1;
    display:flex;
    align-items:baseline;
    gap:6px;
    margin:5px 0 7px;
}
.stores-db-stat-main strong{
    color:#4c1d95;
    font-size:31px;
    line-height:1.2;
    font-weight:950;
    font-variant-numeric:tabular-nums;
}
.stores-db-stat-main small{
    color:#8b8191;
    font-size:9px;
    font-weight:850;
}
.stores-db-stat-sub{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:auto;
    padding-top:10px;
    border-top:1px dashed #ece7f1;
}
.stores-db-stat-sub span{
    color:#776c7d;
    font-size:9px;
    font-weight:850;
}
.stores-db-stat-sub strong{
    color:#7c3aed;
    font-size:17px;
    font-weight:950;
    font-variant-numeric:tabular-nums;
}
.stores-db-stat-card.is-store .stores-db-stat-main{
    margin-top:8px;
}
.stores-db-stat-card.is-store .stores-db-stat-main strong{
    font-size:34px;
}
.stores-db-stat-foot{
    position:relative;
    z-index:1;
    margin-top:auto;
    color:#98a2b3;
    font-size:9px;
}
.stores-db-counter{
    display:inline-block;
    min-width:1ch;
}

/* Dark mode */
html[data-theme="dark"] .stores-db-stats-head h2{color:#f5f1f7!important}
html[data-theme="dark"] .stores-db-stats-head p{color:#aaa0b0!important}
html[data-theme="dark"] .stores-db-stat-grid{
    border-color:#332b3e!important;
    background:#15121a!important;
    box-shadow:0 18px 50px rgba(0,0,0,.16)!important;
}
html[data-theme="dark"] .stores-db-stat-card{
    background:#15121a!important;
    border-color:#2c2634!important;
}
html[data-theme="dark"] .stores-db-stat-label,
html[data-theme="dark"] .stores-db-stat-sub span,
html[data-theme="dark"] .stores-db-stat-foot{color:#aaa0b0!important}
html[data-theme="dark"] .stores-db-stat-main strong{color:#c4b5fd!important}
html[data-theme="dark"] .stores-db-stat-sub strong{color:#d8b4fe!important}
html[data-theme="dark"] .stores-db-stat-sub{border-color:#37303f!important}

@media(max-width:991.98px){
    .stores-db-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .stores-db-stat-card{
        border-bottom:1px solid #eef0f3;
    }
    .stores-db-stat-card:nth-child(2n){border-left:0}
    .stores-db-stat-card:nth-last-child(-n+2){border-bottom:0}
}
@media(max-width:575.98px){
    .stores-db-stats{margin:22px 0}
    .stores-db-stats-head{
        align-items:flex-start;
        flex-direction:column;
        gap:5px;
        margin-bottom:10px;
    }
    .stores-db-stats-head h2{font-size:17px}
    .stores-db-stats-head p{font-size:9px}
    .stores-db-stat-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        border-radius:16px;
    }
    .stores-db-stat-card{
        min-height:128px;
        padding:14px 12px;
    }
    .stores-db-stat-label{font-size:9px}
    .stores-db-stat-main{gap:4px;margin:4px 0 6px}
    .stores-db-stat-main strong,
    .stores-db-stat-card.is-store .stores-db-stat-main strong{font-size:24px}
    .stores-db-stat-main small{font-size:8px}
    .stores-db-stat-sub{gap:5px;padding-top:8px}
    .stores-db-stat-sub span{font-size:8px;line-height:1.6}
    .stores-db-stat-sub strong{font-size:15px}
    .stores-db-stat-foot{font-size:8px;line-height:1.6}
}
