/* Candy BKK V2.6.8 — dedicated last-load mobile statistics override */
@media (max-width:700px) {
  body.candy-admin-shell .admin-stat-grid,
  body.candy-admin-shell .module-stat-grid,
  body.candy-admin-shell .module-stat-grid.three,
  body.candy-admin-shell .module-stat-grid.four,
  body.candy-admin-shell .module-stat-grid.five,
  body.candy-admin-shell .member-stat-grid,
  body.candy-admin-shell .stats-grid,
  body.candy-admin-shell .modern-stats-grid,
  body.candy-admin-shell .tracer-summary-grid,
  body.candy-admin-shell .school-profile-summary-grid,
  body.candy-admin-shell .uikit-stat-grid,
  body.candy-admin-shell .patch-preview-summary,
  body.candy-admin-shell .ats-simple-current-summary {
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    grid-template-columns:none !important;
    gap:7px !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    padding:1px 1px 5px !important;
    margin-bottom:9px !important;
  }

  body.candy-admin-shell .admin-stat-grid::-webkit-scrollbar,
  body.candy-admin-shell .module-stat-grid::-webkit-scrollbar,
  body.candy-admin-shell .member-stat-grid::-webkit-scrollbar,
  body.candy-admin-shell .stats-grid::-webkit-scrollbar,
  body.candy-admin-shell .modern-stats-grid::-webkit-scrollbar,
  body.candy-admin-shell .tracer-summary-grid::-webkit-scrollbar,
  body.candy-admin-shell .school-profile-summary-grid::-webkit-scrollbar,
  body.candy-admin-shell .uikit-stat-grid::-webkit-scrollbar,
  body.candy-admin-shell .patch-preview-summary::-webkit-scrollbar,
  body.candy-admin-shell .ats-simple-current-summary::-webkit-scrollbar {
    display:none;
  }

  body.candy-admin-shell .admin-stat-grid > .admin-stat-card,
  body.candy-admin-shell .module-stat-grid > .admin-stat-card,
  body.candy-admin-shell .member-stat-grid > .admin-stat-card {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:62px !important;
    height:62px !important;
    padding:8px 9px !important;
    gap:7px !important;
    border-radius:13px !important;
    scroll-snap-align:start;
  }

  body.candy-admin-shell .admin-stat-icon,
  body.candy-admin-shell .module-stat-grid .admin-stat-icon {
    width:31px !important;
    height:31px !important;
    min-width:31px !important;
    border-radius:9px !important;
  }

  body.candy-admin-shell .admin-stat-icon .candy-icon,
  body.candy-admin-shell .module-stat-grid .admin-stat-icon .candy-icon {
    width:15px !important;
    height:15px !important;
  }

  body.candy-admin-shell .admin-stat-copy {
    min-width:0 !important;
    display:grid !important;
    align-content:center !important;
  }

  body.candy-admin-shell .admin-stat-copy span {
    font-size:6.2px !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body.candy-admin-shell .admin-stat-copy b,
  body.candy-admin-shell .module-stat-grid .admin-stat-copy b {
    font-size:16px !important;
    line-height:1 !important;
    margin:2px 0 0 !important;
  }

  body.candy-admin-shell .admin-stat-copy small {
    display:none !important;
  }

  body.candy-admin-shell .admin-stat-accent {
    width:46px !important;
    height:46px !important;
    right:-18px !important;
    bottom:-22px !important;
  }

  body.candy-admin-shell .stats-grid > .stat-card {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:62px !important;
    padding:8px 9px !important;
    border-radius:13px !important;
    scroll-snap-align:start;
  }

  body.candy-admin-shell .stats-grid > .stat-card > span {
    font-size:6.5px !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body.candy-admin-shell .stats-grid > .stat-card > b {
    font-size:17px !important;
    line-height:1 !important;
    margin:3px 0 0 !important;
  }

  body.candy-admin-shell .stats-grid > .stat-card > small {
    display:none !important;
  }

  body.candy-admin-shell .modern-stats-grid > .modern-stat {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:62px !important;
    padding:8px 9px !important;
    gap:7px !important;
    border-radius:13px !important;
    scroll-snap-align:start;
  }

  body.candy-admin-shell .modern-stat-icon {
    width:31px !important;
    height:31px !important;
    min-width:31px !important;
    border-radius:9px !important;
  }

  body.candy-admin-shell .modern-stat-icon .candy-icon {
    width:15px !important;
    height:15px !important;
  }

  body.candy-admin-shell .modern-stat b {
    font-size:16px !important;
    line-height:1 !important;
    margin:2px 0 !important;
  }

  body.candy-admin-shell .modern-stat small {
    font-size:6.2px !important;
    line-height:1.15 !important;
  }

  body.candy-admin-shell .tracer-summary-grid > .tracer-stat {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:62px !important;
    height:62px !important;
    padding:8px 9px !important;
    gap:7px !important;
    border-radius:13px !important;
    scroll-snap-align:start;
  }

  body.candy-admin-shell .tracer-stat > span {
    width:31px !important;
    height:31px !important;
    min-width:31px !important;
    border-radius:9px !important;
  }

  body.candy-admin-shell .tracer-stat small {
    font-size:6.1px !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  body.candy-admin-shell .tracer-stat b {
    font-size:16px !important;
    margin-top:2px !important;
  }

  body.candy-admin-shell .school-profile-summary-grid > article {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:62px !important;
    height:62px !important;
    padding:8px 9px !important;
    gap:7px !important;
    border-radius:13px !important;
    scroll-snap-align:start;
  }

  body.candy-admin-shell .school-profile-summary-grid article > span {
    width:31px !important;
    height:31px !important;
    min-width:31px !important;
    border-radius:9px !important;
  }

  body.candy-admin-shell .school-profile-summary-grid small {
    font-size:6.1px !important;
  }

  body.candy-admin-shell .school-profile-summary-grid b {
    font-size:16px !important;
    margin-top:2px !important;
  }

  body.candy-admin-shell .uikit-stat-grid > *,
  body.candy-admin-shell .patch-preview-summary > article,
  body.candy-admin-shell .ats-simple-current-summary > div {
    flex:0 0 132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    min-height:58px !important;
    scroll-snap-align:start;
  }

  /* The summary row itself should not reserve extra vertical space. */
  body.candy-admin-shell .module-stat-grid,
  body.candy-admin-shell .admin-stat-grid,
  body.candy-admin-shell .tracer-summary-grid,
  body.candy-admin-shell .school-profile-summary-grid {
    min-height:0 !important;
  }
}


/* =========================================================
   CANDY BKK V2.6.9 — COMPACT SWIPE FILTER / ATS STAGE CARDS
   ========================================================= */
@media(max-width:700px){
  body.candy-admin-shell .ats-pipeline{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:1px 1px 5px!important;
    margin:0 0 9px!important;
    grid-template-columns:none!important;
  }

  body.candy-admin-shell .ats-pipeline::-webkit-scrollbar{
    display:none;
  }

  body.candy-admin-shell .ats-pipeline>.ats-stage-pill{
    flex:0 0 126px!important;
    width:126px!important;
    min-width:126px!important;
    max-width:126px!important;
    min-height:44px!important;
    height:44px!important;
    padding:7px 8px!important;
    border-radius:12px!important;
    scroll-snap-align:start;
    transform:none!important;
  }

  body.candy-admin-shell .ats-stage-pill span{
    min-width:0;
    font-size:7.2px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.candy-admin-shell .ats-stage-pill b{
    min-width:20px!important;
    height:20px!important;
    padding:0 5px!important;
    border-radius:7px!important;
    font-size:7.2px!important;
    flex:0 0 auto;
  }

  /* Filter toolbar itself remains compact and opens the global mobile filter UI;
     no extra vertical gap above the results. */
  body.candy-admin-shell .ats-pipeline + .module-panel{
    margin-top:0!important;
  }
}
