/* Страница аккаунта (/user/account): профиль, «Требует внимания», плитки
   «Моё» (сами плитки - .sections-block__* из home.css), статистика,
   настройки.

   Отдельный файл по той же причине, что base.css и остальные: style.css
   собирается из LESS-проекта, правки в нём затрутся при сборке. */

.account {
  max-width: 1024px;
}

.account-block {
  margin: 0 0 34px;
}

.account-block__title {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: #1c1c1c;
}

.account-block__hint {
  margin: -8px 0 14px;
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
}

/* ------------------ профиль ------------------ */
.account-profile {
  display: flex;
  /* сверху, а не по центру: под «Активировать» раскрывается поле кода */
  align-items: flex-start;
  gap: 24px;
  margin: 0 0 34px;
  padding: 24px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 5px;
  background-color: #ffffff;
}

.account-profile__info {
  flex: 1 1 auto;
  min-width: 0;
}

.account-profile__name {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
  color: #1c1c1c;
  overflow-wrap: anywhere;
}

.account-profile__email,
.account-profile__meta {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: #5d5f61;
  overflow-wrap: anywhere;
}

/* заголовок блока с кнопкой справа («Моё» + «Добавить») */
.account-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.account-block__head .account-block__title {
  margin: 0;
}

.account-block__add {
  flex: none;
  padding: 7px 18px;
  border-radius: 5px;
  background-color: #3ebce6;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.15s;
}

.account-block__add:hover {
  background-color: #1a9cc7;
  color: #ffffff;
}

.account-chip {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 20px;
}

.account-chip--ok {
  background-color: #e6f6ec;
  color: #1c8c4a;
}

.account-chip--warn {
  background-color: #fff3d6;
  color: #8a6200;
}

.account-chip--off {
  background-color: #eef1f4;
  color: #5d5f61;
}

/* ------------------ требует внимания ------------------ */
.account-attention {
  padding: 20px 24px;
  border-left: 6px solid #e0a800;
  border-radius: 5px;
  background-color: #fff8e6;
}

.account-attention__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-attention__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(224, 168, 0, 0.25);
  font-size: 15px;
  line-height: 22px;
  color: #2d2e30;
}

.account-attention__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.account-attention__form {
  flex: none;
  margin: 0;
}

.account-attention__link {
  flex: none;
  text-decoration: none;
}

/* ------------------ моё ------------------ */
.account-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ------------------ статистика ------------------ */
.account-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.account-stats__item {
  flex: 1 1 200px;
  padding: 18px 20px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 5px;
}

.account-stats__num {
  display: block;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  color: #3ebce6;
}

.account-stats__label {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 20px;
  color: #5d5f61;
}

.account-stats__top-title {
  margin: 20px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1c;
}

.account-stats__top {
  max-width: 560px;
  margin: 0;
  padding: 0 0 0 20px;
}

.account-stats__top-item {
  padding: 4px 0;
  font-size: 15px;
  line-height: 22px;
}

.account-stats__top-item::marker {
  color: #9aa3ab;
}

.account-stats__top-views {
  float: right;
  margin-left: 12px;
  color: #5d5f61;
}

/* ------------------ настройки ------------------ */
.account-settings {
  max-width: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 5px;
}

.account-settings__item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(174, 174, 174, 0.3);
  font-size: 15px;
  line-height: 22px;
}

.account-settings__item:first-child {
  border-top: 0;
}

.account-settings__label {
  color: #6b7280;
}

.account-settings__value {
  color: #1c1c1c;
  overflow-wrap: anywhere;
}

/* ------------------ выйти / удалить ------------------ */
.account-exit {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(174, 174, 174, 0.3);
}

.account-exit__logout,
.account-exit__delete {
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}

.account-exit__delete {
  color: #c0392b;
}

@media (max-width: 767px) {
  .account-profile {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px;
  }

  .account-tiles {
    grid-template-columns: 1fr;
  }

  .account-attention__item {
    flex-wrap: wrap;
  }

  .account-settings__item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-settings__label {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 18px;
  }
}

/* ------------------ код подтверждения email (view/user/v_activation_form.php) ------------------
   С JS поле превращается в 6 клеток (3 - 3), assets/js/activation.js. */
.activation-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 340px;
}

/* без JS - обычное поле */
.activation-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d4dbe1;
  border-radius: 8px;
  font: inherit;
  font-size: 22px;
  letter-spacing: 6px;
  text-align: center;
}

/* страница удаления аккаунта (view/user/v_account_delete.php) */
.account-delete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.account-delete__text {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

.account-delete__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 260px;
}

.account-delete .button {
  margin: 0;
  width: 250px;
  padding-left: 16px;    /* у общей .button по 50px - «Удалить аккаунт» не влезал в строку */
  padding-right: 16px;
  white-space: nowrap;
}

.account-delete .account-delete__button {
  background-color: #e53935;
}

.account-delete__resend {
  font-size: 15px;
}

.account-delete__cancel {
  font-size: 15px;
}

/* одна рамка на 6 клеток (как и код в письме - сплошной, 482913) */
.activation-form__boxes {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* 6 клеток одной рамкой, внутри - тонкие перегородки; клетки только
   рисуют цифры, вводят в прозрачное поле поверх них */
.activation-form__group {
  display: flex;
  border: 1px solid #d4dbe1;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.activation-form__boxes:focus-within .activation-form__group {
  border-color: #3ebce6;
}

.activation-form__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 56px;
  box-sizing: border-box;
  border-left: 1px solid #e3e8ec;
  background-color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  color: #1c1c1c;
}

.activation-form__cell:first-child {
  border-left: 0;
}

/* куда встанет следующая цифра - подсветка и мигающая черта */
.activation-form__cell--active {
  background-color: #f0f9fd;
}

.activation-form__cell--active:empty::after {
  content: "";
  width: 2px;
  height: 26px;
  background-color: #3ebce6;
  animation: activation-caret 1s steps(1) infinite;
}

@keyframes activation-caret {
  50% { opacity: 0; }
}

/* настоящее поле: прозрачное, поверх всех клеток - нажатие в любом месте
   открывает клавиатуру; шрифт 16px - иначе iPhone приближает страницу */
.activation-form__input--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 0;
  text-align: left;
  opacity: 0.01;
  cursor: text;
  z-index: 1;
}

.activation-form--error .activation-form__group {
  border-color: #e8a29a;
}

.activation-form__message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  line-height: 20px;
}

.activation-form__message svg {
  flex: none;
  margin-top: 2px;
}

.activation-form__message:empty {
  display: none;
}

.activation-form__message--error {
  color: #c0392b;
}

.activation-form__message--ok {
  color: #1d8a4e;
}

.activation-form__button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background-color: #3ebce6;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s;
}

.activation-form__button:hover {
  background-color: #1a9cc7;
}

.activation-form__button:disabled {
  opacity: 0.6;
  cursor: default;
}

.activation-form__resend {
  align-self: center;
  font-size: 15px;
  color: #1a9cc7;
  text-decoration: none;
}

.activation-form__resend:hover {
  text-decoration: underline;
}

/* аккаунт: под плашкой «не активирован» - «Активировать», раскрывается прямо в карточке */
.account-activate-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.account-activate-row .account-chip {
  margin-top: 0;
}

.account-activate {
  width: 100%;
}

.account-activate__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 14px;
  border-radius: 20px;
  background-color: #3ebce6;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.account-activate__toggle::-webkit-details-marker {
  display: none;
}

.account-activate__toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.account-activate[open] .account-activate__toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

/* отступ сверху - внутри панели (padding), а не margin: так анимация высоты
   (assets/js/activation.js) идёт ровно от нуля */
.account-activate__panel {
  box-sizing: border-box;   /* height: 0 - вместе с отступом, без рывка в начале */
  padding-top: 16px;
  overflow: hidden;
}

.account-activate__panel--animating {
  transition: height 0.25s ease, opacity 0.25s ease;
}

/* пояснение над полем кода: что не работает, пока аккаунт не активирован */
.account-activate__note {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 20px;
  color: #4b5563;
}

/* окно после регистрации (view/base/v_main.php) */
.activation-popup.header__login-popup--popup_content {
  width: 400px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 36px 32px 26px;
  border-radius: 12px;
}

.activation-popup__title.header__login-popup--title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  color: #1c1c1c;
}

.activation-popup__text {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 24px;
  color: #4b5563;
  overflow-wrap: anywhere;
}

.activation-popup__text b {
  color: #1c1c1c;
}

.activation-popup .activation-form {
  max-width: none;
}

@media (max-width: 400px) {
  .activation-popup.header__login-popup--popup_content {
    padding: 30px 18px 20px;
  }

  .activation-form__cell {
    width: 40px;
    height: 50px;
    font-size: 22px;
  }

  .activation-form__boxes {
    gap: 12px;
  }
}

/* ------------------ статистика бизнесов (/user/stats, view/user/v_stats*.php) ------------------ */
.stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.stats-list__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s;
}

.stats-list__link:hover {
  border-color: #3ebce6;
}

.stats-list__img {
  flex: none;
  width: 105px;
  aspect-ratio: 7 / 4;   /* как визитка в каталоге (700x400) */
  border-radius: 6px;
  object-fit: cover;
}


.stats-list__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-list__title {
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  color: #1c1c1c;
  overflow-wrap: anywhere;
}

.stats-list__status {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 10px;
  background-color: #fff4e5;
  color: #b5651d;
  font-size: 12px;
  line-height: 18px;
}

.stats-list__score {
  font-size: 14px;
  line-height: 20px;
  color: #5d5f61;
}

.stats-list__score b {
  color: #3ebce6;
  font-size: 16px;
}

/* шапка страницы бизнеса: визитка 7:4, под ней тонкая полоска индекса влияния */
.stats-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 350px;
  margin: 0 0 22px;
}

.stats-head__card {
  display: block;
  width: 100%;
}

.stats-head__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 4;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(174, 174, 174, 0.3);
}

.stats-head__bar {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background-color: #eef1f4;
  overflow: hidden;
}

.stats-head__bar span {
  display: block;
  height: 100%;
  background-color: #3ebce6;
}

/* ссылки под полоской - с отступом побольше, чтобы полоска не слипалась с ними */
.stats-head__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 8px;
  font-size: 14px;
}

.stats-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.stats-periods__link {
  padding: 6px 14px;
  border: 1px solid rgba(174, 174, 174, 0.5);
  border-radius: 18px;
  font-size: 14px;
  line-height: 20px;
  color: #484b4e;
  text-decoration: none;
}

.stats-periods__link--active {
  border-color: #3ebce6;
  background-color: #3ebce6;
  color: #ffffff;
}

.stats-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stats-metric {
  flex: 1 1 200px;
  padding: 16px 18px;
  border: 1px solid rgba(174, 174, 174, 0.3);
  border-radius: 7px;
}

.stats-metric__num {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  color: #1c1c1c;
}

.stats-metric__change {
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
}

.stats-metric__change--up {
  background-color: #e7f6ec;
  color: #1e8a4c;
}

.stats-metric__change--down {
  background-color: #fdecec;
  color: #c0392b;
}

.stats-metric__change--same {
  background-color: #eef1f4;
  color: #5d5f61;
}

.stats-metric__label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: #484b4e;
}

.stats-metric__sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: #8a8f94;
}

/* график: шкала слева, столбики, даты снизу (core/item_stats.php, itemStatsChartHtml) */
.stats-chart {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 200px auto;
  column-gap: 8px;
}

.stats-chart__scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
  line-height: 1;
  color: #8a8f94;
  transform: translateY(-6px);
  height: calc(100% + 12px);
}

.stats-chart__plot {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border-bottom: 1px solid #c9ced3;
  /* линии сетки: верх и середина шкалы */
  background-image: linear-gradient(#eef1f4 1px, transparent 1px);
  background-size: 100% 50%;
}

.stats-chart__plot--dense {
  gap: 1px;
}

.stats-chart__col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stats-chart__col:hover {
  background-color: rgba(62, 188, 230, 0.08);
}

.stats-chart__bar {
  display: block;
  width: 100%;
}

.stats-chart__bar--web {
  background-color: #3ebce6;
}

.stats-chart__bar--app {
  background-color: #222161;
}

.stats-chart__dates {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #8a8f94;
}

.stats-legend {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin: 0 2px 0 6px;
  vertical-align: middle;
}

.stats-legend--web {
  background-color: #3ebce6;
  margin-left: 0;
}

.stats-legend--app {
  background-color: #222161;
}

.stats-position {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.stats-position b {
  font-size: 22px;
}

/* индекс: полоска на каждую составляющую */
.stats-score {
  max-width: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.stats-score__item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label points" "bar bar";
  gap: 4px 12px;
  align-items: end;
}

.stats-score__label {
  grid-area: label;
}

.stats-score__points {
  grid-area: points;
}

.stats-score__label {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}

.stats-score__label small {
  font-weight: 400;
  color: #8a8f94;
  font-size: 13px;
}

.stats-score__points {
  font-size: 14px;
  color: #484b4e;
  white-space: nowrap;
}

.stats-score__bar {
  grid-area: bar;
  height: 8px;
  border-radius: 4px;
  background-color: #eef1f4;
  overflow: hidden;
}

.stats-score__bar span {
  display: block;
  height: 100%;
  background-color: #3ebce6;
}

.stats-tips {
  margin: 0;
  padding: 0 0 0 20px;
  max-width: 640px;
}

.stats-tips__item {
  padding: 3px 0;
  font-size: 15px;
  line-height: 22px;
}

.stats-tips__points {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background-color: #e7f6ec;
  color: #1e8a4c;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .stats-chart {
    grid-template-rows: 160px auto;
  }

  .stats-metric__num {
    font-size: 24px;
  }
}

/* мини-график в карточке итога (itemStatsSparkHtml): только для вида, без шкалы */
.stats-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 36px;
  margin-top: 12px;
}

.stats-spark--dense {
  gap: 1px;
}

.stats-spark span {
  flex: 1;
  min-width: 0;
  border-radius: 1px;
  background-color: #3ebce6;
  opacity: 0.85;
}

/* пустой день - тонкая серая черта, чтобы ряд был виден и при нулях */
.stats-spark .stats-spark__zero {
  background-color: #dfe3e7;
}
