
/* ============================================================
   UI FIXES & POLISH LAYER · 2026-09-04
   Исправления косметических дефектов всех блоков и элементов
   ============================================================ */

/* --- 1. Поиск в каталоге: иконка не наезжает на placeholder --- */
form.catalog-toolbar .catalog-search input[type="search"],
form.catalog-toolbar .catalog-search input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  padding-left: 46px !important;
  padding-right: 16px;
}
form.catalog-toolbar .catalog-search svg {
  left: 16px;
}

/* --- 2. Обложки объявлений: аккуратный кроп скриншотов --- */
.listing-card .listing-cover {
  background: linear-gradient(160deg, #141a2e, #1d2640);
}
.listing-card .listing-cover img {
  object-position: top center;
}
.listing-card {
  grid-template-columns: 260px minmax(0, 1fr);
}
@media (max-width: 860px) {
  .listing-card { grid-template-columns: 1fr; }
}
.asset-main-image {
  background: linear-gradient(160deg, #141a2e, #1d2640);
}
.asset-main-image img {
  object-position: top center;
}

/* --- 3. Инфо-страницы: центрирование и комфортная ширина --- */
main.form-page > .content-page {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding: 40px 44px;
}
@media (max-width: 640px) {
  main.form-page > .content-page { padding: 26px 20px; border-radius: 18px; }
}
main.form-page > .content-page h1 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* --- 4. FAQ: структурированные вопросы-ответы --- */
.faq-list { display: grid; gap: 6px; margin-top: 6px; }
.faq-item {
  padding: 16px 18px;
  border: 1px solid var(--line, #e7eaf2);
  border-left: 3px solid #5b3df5;
  border-radius: 14px;
  background: #fbfbfe;
}
.faq-q {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: #11182b;
  line-height: 1.35;
}
.faq-a {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #3a4558;
}
.faq-more {
  margin: 18px 0 0;
  font-size: 14px;
  color: #596176;
}
.faq-more a { color: #5b3df5; font-weight: 700; text-decoration: none; }
.faq-more a:hover { text-decoration: underline; }

/* --- 5. Пустые состояния: заметный центрированный блок --- */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 240px;
  padding: 40px 28px;
  border: 1px dashed #d8dce8;
  border-radius: 20px;
  background: linear-gradient(145deg, #fbfcff, #f4f7fb);
  text-align: center;
}
.empty-state h2 { font-size: 20px; letter-spacing: -0.02em; }
.empty-state .btn { margin-top: 10px; }
.reviews-page .empty-state { min-height: 300px; }

/* --- 6. Фокус-состояния для доступности --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(91, 61, 245, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- 7. Хлебные крошки: единый отступ и кликабельность --- */
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: #5b3df5; text-decoration: underline; }

/* --- 8. Карточка объявления: заголовок-ссылка без подчёркивания --- */
.listing-body h2 a:hover { color: #5b3df5; }

/* --- 9. Миниатюры галереи: перенос строк вместо обрезки --- */
.asset-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- 10. Подписка в футере: кнопка по центру input --- */
.subscribe form button { cursor: pointer; transition: background 0.2s; }
.subscribe form button:hover { background: #4c31dd; }

/* --- 11. Категорийные карточки: счётчик не прыгает --- */
.category-card b { font-variant-numeric: tabular-nums; }
.stat strong { font-variant-numeric: tabular-nums; }

/* --- 12. Пагинация: крупнее цели клика --- */
.pagination a {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line, #e7eaf2);
  border-radius: 10px;
  color: #343c4e;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.pagination a:hover { border-color: #5b3df5; color: #5b3df5; }
.pagination span { display: inline-flex; align-items: center; padding: 0 10px; }

/* --- 13. Таблицы цен/метрик: выравнивание чисел --- */
.deal-quote strong,
.auction-price-grid strong,
.metric-card strong { font-variant-numeric: tabular-nums; }

/* --- 14. Отзывы: карточки ровной высоты сетки --- */
.reviews-grid { align-items: stretch; }
.review-card { display: flex; flex-direction: column; }
.review-card p { flex: 1; }

/* --- 15. Кнопки: плавный hover на всех основных --- */
.btn { transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* --- 16. Активный пункт меню --- */
.main-nav a[aria-current="page"] { color: #5b3df5; }
.main-nav a[aria-current="page"]:after { right: 0; }

/* --- 17. Ключевые показатели: карточки KPI --- */
.metric-grid { gap: 14px; }
.metric-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-radius: 14px;
  padding: 14px 16px 14px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #5b3df5, #8f7bff);
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  border-color: #d8d2fb;
}
.metric-card small {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  color: #667085;
}
.metric-card strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #101828;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card strong { font-size: 17px; }
}

/* --- 18. Страница актива: каркас контента и внутренние отступы --- */
.asset-content { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .75fr); gap: 28px; align-items: start; margin-bottom: 8px; }
.content-card { padding: 28px; border-radius: 24px; }
.content-card > h2:first-child { margin: 0 0 18px; font-size: 20px; }
.content-card > h3 { margin: 30px 0 14px; padding-top: 22px; border-top: 1px solid #eef0f6; font-size: 17px; }
.content-card > :last-child { margin-bottom: 0; }
@media (max-width: 980px) {
  .asset-content { grid-template-columns: 1fr; }
  .content-card { padding: 20px; }
}

/* --- 19. Страница актива: блоки внутри карточки контента --- */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.feature-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #e7ebf3; border-radius: 12px; background: #fbfcff; font-size: 14px; line-height: 1.5; }
.feature-item span { flex-shrink: 0; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: #e7f8f0; color: #12855f; font-size: 11px; font-weight: 800; }
.price-history { display: grid; gap: 8px; }
.price-history > div { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid #e7ebf3; border-radius: 12px; background: #fbfcff; }
.price-history span { color: #8e98aa; font-size: 13px; white-space: nowrap; }
.price-history strong { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price-history b { margin-left: auto; color: #d92d20; font-size: 15px; }
.price-history b.up { color: #12855f; }
.traffic-public-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.traffic-public-metrics span { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #e7ebf3; border-radius: 12px; background: #fbfcff; }
.traffic-public-metrics small { font-size: 11px; color: #8e98aa; }
.traffic-public-metrics strong { font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .traffic-public-metrics { grid-template-columns: repeat(2, 1fr); } }
.auction-bid-form { display: grid; gap: 10px; margin-top: 14px; }
.auction-bid-form small { text-align: center; }
.auction-user-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: #f2f0ff; }
.auction-user-state span { font-size: 12px; color: #5f6a85; }
.auction-user-state b { font-size: 12px; font-weight: 800; color: #12855f; }
.auction-history { margin-top: 12px; }
.auction-history summary { cursor: pointer; font-size: 13px; font-weight: 800; color: #5b3df5; }
.bid-list { display: grid; gap: 6px; margin-top: 10px; }
.bid-list > div { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #f7f8fc; font-size: 13px; }
.bid-list small { margin-left: auto; color: #8e98aa; }
.report-card summary { cursor: pointer; }

/* --- 20. Главная: иконки, статистика, CTA --- */
.eyebrow-icon { color: #5b3df5; }
.dynamic-icon { background-size: cover; background-position: center; color: transparent; }
.stat-icon.violet { background: #efeaff; color: #5b3df5; }
.stat-icon.green, .adv-icon.green { background: #e7f8f0; color: #12855f; }
.stat-icon.blue { background: #e8efff; color: #2563eb; }
.stat-icon.amber { background: #fdf3e0; color: #b45309; }
.stat-icon.pink { background: #fdeaf1; color: #db2777; }
.stat-icon.mint, .adv-icon.mint { background: #e6faf4; color: #0d9488; }
.offer-controls a { font-size: 13px; font-weight: 700; color: #5b3df5; text-decoration: none; }
.offer-controls a:hover { text-decoration: underline; }
.btn.cta-white { background: #fff; color: #1c1440; }
.btn.cta-white:hover { background: #f3f0ff; }
.btn.cta-outline { border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn.cta-outline:hover { background: rgba(255, 255, 255, .12); }

/* --- 21. Кабинет, сделки, поддержка, модерация, трафик --- */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: #5b3df5; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #f1f3f9; color: #4a5568; font-size: 12px; font-weight: 700; }
.notice-card { padding: 16px 18px; border: 1px solid #e4e0fb; border-radius: 14px; background: #faf9ff; }
.notice-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.notice-card p { margin: 0 0 8px; font-size: 13px; color: #5f6a85; }
.notice-card code { display: inline-block; padding: 2px 8px; border-radius: 8px; background: #eef0fb; font-size: 12px; }
.status-note { font-size: 13px; color: #5f6a85; }
.form-error-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #b42318; font-size: 13px; }
.legal-document-list { display: grid; gap: 14px; }
.legal-accept-form { margin-top: 16px; padding: 16px 18px; border: 1px dashed #d8cef9; border-radius: 14px; background: #fbfaff; }
.deal-shell { max-width: 980px; }
.deal-progress-line { flex: 1; height: 2px; min-width: 24px; border-radius: 2px; background: #e5e9f3; }
.party-swap { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; background: #f1edff; color: #5b3df5; font-weight: 800; }
.party-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e8efff; color: #2563eb; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.summary-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #101731; color: #fff; }
.summary-total span { font-size: 13px; }
.summary-total strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.handover-secret.state-purged { border-left: 3px solid #d92d20; }
.handover-secret.state-invalid { border-left: 3px solid #b45309; }
.handover-secret.state-revealed { border-left: 3px solid #12855f; }
.handover-secret.state-sealed { border-left: 3px solid #5362ff; }
.evidence-answer { margin-top: 10px; padding: 8px 14px; border: 1px solid #d8cef9; border-radius: 10px; background: #fff; color: #5b3df5; font-size: 13px; font-weight: 700; cursor: pointer; }
.evidence-answer:hover { background: #f6f3ff; }
.support-message + .support-message { margin-top: 10px; }
.support-message.own { background: #f8f7ff; }
.support-message.agent { background: #fff; }
.support-message.client { background: #fbfcff; }
.traffic-source-list { display: grid; gap: 12px; }
.traffic-source { padding: 16px 18px; border: 1px solid #e7ebf3; border-radius: 16px; background: #fff; }
.gallery-layout { grid-template-columns: minmax(0, 1fr); }
.fee-compare-card.market { border-color: #c9bffb; box-shadow: 0 10px 30px rgba(91, 61, 245, .10); }
.section-head.compact { margin-bottom: 12px; }
.section-head.compact h2 { font-size: 16px; }
.danger { color: #d92d20; }
.positive { color: #12855f; }
.negative { color: #d92d20; }
.muted-copy { color: #707b93; }

/* --- 22. Гармонизация акцентов восстановленных блоков с фирменным фиолетовым --- */
.offer-box summary, .report-card summary, .price-watch summary { color: #5b3df5; }
.traffic-proof-link { color: #5b3df5; }
