/* =====================================================
   STATYSTYKI — MODERN COMPACT PURPLE
   Shared across all pages
===================================================== */

#box_statystyki {
  background: linear-gradient(135deg, #3b2f7f 0%, #2f2559 40%, #4a3d99 100%);
  color: #fff;
  padding: 0;
  overflow: hidden;
  position: relative;
}

#box_statystyki::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(255,255,255,.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 50%, rgba(255,255,255,.03) 0%, transparent 50%);
  pointer-events: none;
}

.bstat-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* ---- ITEM (horizontal: icon + text) ---- */
.bstat-item {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  min-width: 0;
}

/* ---- SEPARATOR ---- */
.bstat-sep {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent 5%, rgba(255,255,255,.2) 50%, transparent 95%);
  flex-shrink: 0;
}

/* ---- ICON ---- */
.bstat-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
  transition: background .2s ease;
}

.bstat-item:hover .bstat-icon {
  background: rgba(255,255,255,.18);
}

.bstat-icon svg {
  stroke: #fff;
  display: block;
}

/* ---- TEXT GROUP ---- */
.bstat-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

/* ---- VALUE ---- */
.bstat-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---- LABEL ---- */
.bstat-label {
  font-size: 11px;
  font-weight: 400;
  opacity: .65;
  white-space: nowrap;
}

/* ---- TODAY BADGE ---- */
.bstat-today {
  font-size: 10px;
  font-weight: 600;
  color: #a5f3c4;
  background: rgba(46,125,50,.3);
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1.4;
}

/* =====================================================
   TABLET (max 900px)
===================================================== */
@media screen and (max-width: 900px) {
  .bstat-inner {
    padding: 8px 6px;
    flex-wrap: wrap;
    gap: 2px;
  }

  .bstat-sep {
    display: none;
  }

  .bstat-item {
    flex: 0 1 auto;
    padding: 5px 8px;
    gap: 6px;
  }

  .bstat-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }

  .bstat-icon svg {
    width: 15px;
    height: 15px;
  }

  .bstat-value {
    font-size: 13px;
  }

  .bstat-label {
    font-size: 10px;
  }
}

/* =====================================================
   PHONE (max 550px)
===================================================== */
@media screen and (max-width: 550px) {
  .bstat-inner {
    padding: 6px 4px;
    justify-content: space-around;
  }

  .bstat-item {
    padding: 4px 4px;
    gap: 4px;
  }

  .bstat-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
  }

  .bstat-icon svg {
    width: 13px;
    height: 13px;
  }

  .bstat-value {
    font-size: 12px;
  }

  .bstat-label {
    font-size: 9px;
  }

  .bstat-today {
    font-size: 9px;
    padding: 0 4px;
  }
}

/* =====================================================
   STATYSTYKI KATEGORIA  (osobna sekcja)
===================================================== */
#box_statystyki_kategoria {
  overflow: hidden;
}

.stat-kategoria-lista {
  flex-wrap: wrap !important;
}

.stat-item {
  flex: 1 1 120px;
  min-width: 100px;
}

@media screen and (max-width: 900px) {
  .stat-kategoria-lista {
    gap: 10px !important;
  }
  .stat-item {
    flex: 1 1 calc(33% - 20px) !important;
  }
  .stat-item + .stat-item {
    border-left: none;
  }
}

@media screen and (max-width: 550px) {
  .stat-item {
    flex: 1 1 calc(50% - 16px) !important;
  }
  .stat-item strong {
    font-size: 18px !important;
  }
}
