/* stats.css — локально для вкладки "Настройки"
   ЦЕЛЬ:
   - убрать :root (не ломаем глобальные токены)
   - вернуть читаемость/контраст карточек
   - не трогать другие вкладки
*/

/* ===== Контейнер вкладки ===== */
#stats-tab .stats-settings{
  max-width: 100%;
  margin: 0 auto;
  padding: 15px;
  padding-bottom: calc(200px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  height: auto;
}

/* Заголовок */
#stats-tab .stats-settings h2{
  margin: 8px 0 14px;
  color: var(--text-primary);
}

/* ===== Карточки "Настроек" (статы) ===== */
#stats-tab .stat-item{
  /* делаем светлее, чтобы не сливалось */
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  border-radius: 16px;
  padding: 14px 12px;
  margin: 12px 0;

  box-shadow: 0 6px 18px rgba(0,0,0,.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition: transform .15s ease, box-shadow .15s ease;
}

#stats-tab .stat-item:active{
  transform: scale(1.01);
  box-shadow: 0 8px 22px rgba(0,0,0,.26);
}

#stats-tab .stat-item h3{
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  text-shadow: 0 1px 2px var(--shadow);
}

#stats-tab .stat-item p{
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  letter-spacing: .2px;
}

/* если где-то внутри .stat-item есть второстепенный текст */
#stats-tab .stat-item .muted,
#stats-tab .stat-item small{
  display: block;
  margin-top: 6px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== Telegram карточка ===== */
#stats-tab .settings-card{
  display:flex;
  align-items:center;
  gap:12px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;

  padding: 12px 12px;
  margin: 10px 0 14px;

  box-shadow: 0 6px 18px rgba(0,0,0,.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#stats-tab .tg-card__icon{ width:32px; height:32px; }
#stats-tab .tg-card__text{ line-height:1.15; color: var(--text-primary); }
#stats-tab .tg-card__title{ font-weight: 900; color: var(--text-primary); }
#stats-tab .tg-card__sub{ font-size: 12px; opacity: .75; color: var(--text-secondary); }

/* TG кнопка */
#stats-tab .tg-card__btn{
  margin-left:auto;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;

  background: linear-gradient(180deg, #2aa7e7, #1c8cd6);
  color: #fff;
  border: none;

  box-shadow:
    0 2px 8px rgba(0,0,0,.22),
    inset 0 0 0 1px rgba(255,255,255,.10);

  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
#stats-tab .tg-card__btn:hover{
  filter: brightness(1.06);
  box-shadow:
    0 3px 12px rgba(0,0,0,.26),
    inset 0 0 0 1px rgba(255,255,255,.14);
}
#stats-tab .tg-card__btn:active{ transform: translateY(1px) scale(.98); }
#stats-tab .tg-card__btn:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,167,231,.28);
}

/* ===== Мобилка ===== */
@media (max-width: 480px){
  #stats-tab .stats-settings{
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
  #stats-tab .tg-card__sub{ display:none; }
  #stats-tab .tg-card__btn{ padding: 6px 10px; font-size: 12px; border-radius: 11px; }
}
