/*
 * Персофин: hotfix главного экрана (пакет persofin-home-hotfix-v2 + правка плашки).
 * Стили карточки ограничены тёмной темой, чтобы не менять светлую.
 */

/* Горизонтальный выход бюста обрезаем только на уровне страницы. */
html,
body {
  overflow-x: hidden;
}

html[data-theme-eff="dark"] .pf-home-screen,
html[data-theme-eff="dark"] .pf-home-screen > *,
html[data-theme-eff="dark"] .pf-net-card,
html[data-theme-eff="dark"] .pf-net-card__content {
  overflow-y: visible !important;
}

html[data-theme-eff="dark"] .pf-home-screen {
  overflow-x: visible !important;
}

html[data-theme-eff="dark"] .pf-net-card {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  min-height: 0 !important;
  overflow: visible !important;
  clip-path: inset(0 round 14px);
  border: 0 !important;
  border-radius: 14px !important;
  /* Тёмный левый край и мягкий зелёный переток за бюстом, как в образце. */
  background:
    radial-gradient(64% 108% at 88% 32%, rgba(34, 219, 170, 0.34) 0%, rgba(0, 122, 88, 0.20) 40%, rgba(0, 60, 44, 0.08) 66%, rgba(0, 0, 0, 0) 82%),
    linear-gradient(100deg, #060c0e 0%, #08191a 24%, #04332a 56%, #022e22 82%, #031d17 100%) !important;
  box-shadow: none !important;
}

/* Аккуратный замкнутый контур 1 px по всему периметру, скругления как у карточки. */
html[data-theme-eff="dark"] .pf-net-card::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  box-sizing: border-box;
  padding: 0 !important;
  border: 1.5px solid rgba(45, 226, 176, 0.85) !important;
  border-radius: inherit;
  background: transparent !important;
  content: "";
  pointer-events: none;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  -webkit-mask-composite: initial !important;
  mask-composite: initial !important;
}

/* Бюст растворяется в плашке: левый край уходит в градиент без жёсткой кромки. */
html[data-theme-eff="dark"] .pf-net-card__bust {
  z-index: 4;
  top: -34px;
  right: -6px;
  width: auto;
  height: calc(100% + 32px) !important;
  max-height: none !important;
  object-fit: contain;
  object-position: top right;
  overflow: visible !important;
  filter: drop-shadow(0 0 16px rgba(32, 215, 167, 0.28));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.25) 10%, rgba(0, 0, 0, 0.85) 26%, #000 42%, #000 100%) !important;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.25) 10%, rgba(0, 0, 0, 0.85) 26%, #000 42%, #000 100%) !important;
}

/* Текст карточки всегда выше бюста, иначе подписи метрик уходят под статую. */
html[data-theme-eff="dark"] .pf-net-card__content {
  z-index: 5;
  padding: 21px 17px 10px !important;
}

html[data-theme-eff="dark"] .pf-net-card__label,
html[data-theme-eff="dark"] .pf-net-card__label.muted {
  color: #f1f7f6 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

html[data-theme-eff="dark"] .pf-net-card__total,
html[data-theme-eff="dark"] .pf-net-card .big-num {
  margin-top: 6px !important;
  font-size: clamp(24px, 7.2vw, 32px) !important;
  letter-spacing: -0.012em !important;
  line-height: 1.05 !important;
}

html[data-theme-eff="dark"] .pf-net-card__divider {
  width: 100% !important;
  margin-top: 14px !important;
  background: rgba(198, 226, 220, 0.34) !important;
}

html[data-theme-eff="dark"] .pf-net-card .hero-row,
html[data-theme-eff="dark"] .pf-net-card__metrics {
  width: 100% !important;
  margin-top: 17px !important;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr) !important;
}

html[data-theme-eff="dark"] .pf-net-card .hero-cell + .hero-cell,
html[data-theme-eff="dark"] .pf-net-card__metric + .pf-net-card__metric {
  padding-left: 13px !important;
  border-left-color: rgba(190, 220, 214, 0.18) !important;
}

html[data-theme-eff="dark"] .pf-net-card .hero-label,
html[data-theme-eff="dark"] .pf-net-card__metric span {
  color: #e9f1f1 !important;
  font-size: 11.5px !important;
}

html[data-theme-eff="dark"] .pf-net-card .hero-num,
html[data-theme-eff="dark"] .pf-net-card__metric strong {
  font-size: clamp(14px, 4vw, 17px) !important;
}

/* Значки остаются на прежнем уровне, подписи неактивных вкладок выравниваются по «Главной». */
.pf-bottom-nav__item:not(.pf-bottom-nav__item--active):not(.pf-bottom-nav__item--plus) .pf-bottom-nav__label {
  transform: translateY(2px);
}

.pf-bottom-nav__item--active .pf-bottom-nav__label {
  transform: none;
}

@media (max-width: 374px) {
  html[data-theme-eff="dark"] .pf-net-card {
    margin-top: 16px;
  }

  html[data-theme-eff="dark"] .pf-net-card__bust {
    top: -30px;
    right: -8px;
  }
}
