/* ============================================================
   Бизнес Холл — общие стили внутренних страниц
   ============================================================ */
:root {
  --text: #1F2328;
  --text-2: #5C6470;
  --accent: #2E6BE6;
  --accent-dark: #1F55C4;
  --bg: #F4F5F7;
  --surface: #ffffff;
  --border: #DDE1E7;
  --green: #00C255;
  --green-dark: #009A43;
  --orange: #FF6B2C;
  --violet: #9257E8;
  --blue-soft: #EAF0FD;
  --green-soft: #E6F9EE;
  --orange-soft: #FFF0E8;
  --violet-soft: #F4EDFD;
  --bh-blue: #2E6BE6;
  --bh-blue-soft: #EAF0FD;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border); background: var(--surface);
  backdrop-filter: saturate(1.2) blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }

.nav { display: flex; gap: 2px; flex: 1; justify-content: flex-start; }
/* меню сдвигаем на величину внутреннего отступа: первый пункт встаёт вровень
   с логотипом, но подложка при наведении остаётся такой же, как у остальных */
.nav { margin-left: -12px; }
.nav a { padding: 7px 12px; border-radius: 6px; color: var(--text); font-size: 14.5px; white-space: nowrap; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--blue-soft); color: var(--accent); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-name {
  display: inline-block;
  /* обрезаем только когда шапке реально тесно, а не по жёсткому лимиту */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--text-2);
}
[data-auth-slot] { min-width: 0; flex: 0 1 auto; }
/* меню отдаёт место названию компании, а не занимает всё подряд */
.nav { flex: 0 1 auto; }
.header-inner > .header-actions { margin-left: auto; }
.logo-img {
  width: 52px; height: 52px; object-fit: contain;
  padding: 5px; border: 3px solid #EF3124; border-radius: 8px;
}
.logo-word {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700; font-size: 23px; letter-spacing: .14em;
  color: #1A2940; white-space: nowrap;
}
.logo-word em { font-style: normal; color: #B8860B; }
.fav-link {
  position: relative; padding: 8px 12px 8px 10px; border-radius: 8px;
  font-size: 14.5px; color: var(--text); flex-shrink: 0;
}
.fav-link:hover { background: var(--bg); }
.fav-count {
  position: absolute; top: -1px; right: -3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #EF3124; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px;
  font-size: 14.5px; font-weight: 600;
  padding: 9px 16px; min-height: 40px;
  transition: background .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Модальные окна ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 24, 30, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface); border-radius: 14px;
  width: 100%; max-width: 420px;
  padding: 24px;
  max-height: 90vh; overflow-y: auto;
}
.modal-wide { max-width: 560px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { font-size: 19px; font-weight: 800; }
.modal-close { background: none; border: none; padding: 6px; color: var(--text-2); border-radius: 6px; }
.modal-close:hover { background: var(--bg); color: var(--text); }

.field { margin-bottom: 14px; position: relative; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface); min-height: 42px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field-hint { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.field-error { font-size: 12.5px; color: #D3382F; margin-top: 4px; }
.geo-suggest {
  position: absolute; z-index: 60; left: 0; right: 0; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; max-height: 240px; overflow-y: auto;
}
.search-bar .geo-suggest { position: fixed; }
.geo-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 9px 12px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
}
.geo-item:hover { background: var(--bg); }
.geo-item--region { color: var(--text-2); font-size: 13px; }
.geo-item--all { font-weight: 600; border-bottom: 1px solid var(--border); }

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--bg); border-radius: 8px; padding: 4px;
}
.auth-tab {
  flex: 1; border: none; background: none; border-radius: 6px;
  padding: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 14px; }
.auth-foot button {
  border: none; background: none; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 0;
}
.auth-foot button:hover { text-decoration: underline; }

.company-card {
  background: var(--blue-soft); border: 1px solid #C7DAF8; border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.45;
}
.company-card span { color: var(--text-2); font-size: 12.5px; }

.vf-badge {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
  border: none; white-space: nowrap;
}
.vf-ok { background: var(--green-soft); color: var(--green-dark, #009A43); }
.vf-no { background: #FFF0E8; color: #B45309; cursor: pointer; }
.vf-no:hover { background: #FFE4D5; }



/* ---------- Страничный каркас ---------- */
.page { background: var(--bg); min-height: calc(100vh - 61px); padding: 24px 0 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* ---------- Поиск в ленте ---------- */
.search-bar {
  display: flex; gap: 0; margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.search-bar .sf { flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 12px; min-width: 0; }
.search-bar .sf + .sf { border-left: 1px solid var(--border); flex: .6; }
.search-bar .sf svg { color: var(--text-2); flex-shrink: 0; }
.search-bar input {
  width: 100%; border: none; outline: none; background: none;
  font: inherit; font-size: 14.5px; color: var(--text); min-height: 44px;
}
.search-bar input::placeholder { color: #9aa1ab; }
.search-bar .sf-cat select {
  width: 100%; border: none; outline: none; background: none;
  font: inherit; font-size: 14.5px; color: var(--text); min-height: 44px; cursor: pointer;
}
.search-bar .btn { border-radius: 0; padding: 0 22px; }

/* ---------- Просмотр объявления ---------- */
.item-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--bg); }
.item-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.item-thumbs img {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
}
.item-thumbs img.active { border-color: var(--accent); }
.item-price-lg { font-size: 24px; font-weight: 800; margin-top: 14px; font-variant-numeric: tabular-nums; }
.item-title-lg { font-size: 17px; font-weight: 700; margin-top: 2px; }
.item-meta { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.item-desc { font-size: 14.5px; margin-top: 12px; white-space: pre-line; }
.desc-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.desc-link:hover { color: var(--accent-dark); }
.more-btn {
  display: block; margin: 4px auto 24px; padding: 0 26px; min-height: 44px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600;
}
.more-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Плашка автоопределённого региона над лентой */
.geo-note {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--blue-soft); border: 1px solid #C7DAF8; border-radius: 8px;
  padding: 9px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--text);
}
.geo-note-reset {
  border: none; background: none; padding: 0;
  color: var(--accent); font: inherit; font-weight: 600; cursor: pointer;
}
.geo-note-reset:hover { text-decoration: underline; }

/* Карточка объявления: кнопки и контакты — один закреплённый низ окна,
   чтобы связаться можно было не прокручивая описание и фото.
   Именно один блок: два подряд «прилипших» выталкивали контакты за край. */
.modal-item { display: flex; flex-direction: column; padding-bottom: 0; }
.modal-item > .item-foot {
  position: sticky; bottom: 0; z-index: 2;
  background: var(--surface);
  padding: 4px 0 16px;
  margin-top: auto;
  box-shadow: 0 -10px 16px -10px rgba(20,24,30,.18);
}
.item-foot .item-contacts { margin-top: 10px; }
.item-foot .item-cta { margin-top: 10px; }

.item-cta { display: flex; gap: 10px; margin-top: 14px; }
.item-cta .btn { flex: 1; min-height: 44px; }
@media (max-width: 520px) { .item-cta { flex-direction: column; } }

.item-phone-btn {
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
}
.item-phone-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

/* блок раскрытых контактов — свободный список строк */
.item-contacts {
  margin-top: 14px; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--surface);
}
.contact-row {
  display: block; padding: 10px 14px; font-size: 15px; font-weight: 600;
  color: var(--text); word-break: break-word;
}
.contact-row + .contact-row { border-top: 1px solid var(--border); }
a.contact-row { color: var(--accent); }
a.contact-row:hover { background: var(--bg); }


/* Красный счётчик на пункте меню. Пульсирует при изменении числа. */
.nav a { position: relative; }
.nav-badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 999px; background: #EF3124; color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1;
  vertical-align: middle;
}
.nav-badge[hidden] { display: none; }
@keyframes badgePop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); box-shadow: 0 0 0 0 rgba(239,49,36,.55); }
  100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(239,49,36,0); }
}
.badge-pop { animation: badgePop .55s ease-out; }
@media (prefers-reduced-motion: reduce) { .badge-pop { animation: none; } }

/* пометка о незаполненном договоре на карточке в кабинете */
.lst-warn {
  margin-top: 8px; padding: 6px 9px; border-radius: 6px;
  background: #FFF0E8; color: #B45309;
  font-size: 12px; font-weight: 600; line-height: 1.35;
}
.lst-warn--off { background: var(--bg); color: var(--text-2); }
.listing-card--archived { opacity: .72; }
.listing-card--archived img { filter: grayscale(.55); }

/* ---------- Личный кабинет ---------- */
.cab-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.cab-tab {
  border: none; background: none; border-radius: 7px;
  padding: 8px 16px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--text-2); display: inline-flex; align-items: center; gap: 7px;
}
.cab-tab:hover { color: var(--text); }
.cab-tab.active { background: var(--text); color: #fff; }
.cab-tab-count { font-size: 12px; font-weight: 700; opacity: .75; }

.btn-red { background: #D3382F; color: #fff; }
.btn-red:hover { background: #B92E26; }

.cab-profile {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 22px;
}
.cab-avatar {
  width: 54px; height: 54px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--blue-soft); color: var(--accent);
  font-size: 22px; font-weight: 800;
}
.cab-profile-main { flex: 1; min-width: 0; }
.cab-profile-main h1 { font-size: 20px; font-weight: 800; }
.cab-profile-meta { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.cab-stats { display: flex; gap: 26px; }
.cab-stats div { display: flex; flex-direction: column; }
.cab-stats b { font-size: 19px; font-weight: 800; }
.cab-stats span { font-size: 12.5px; color: var(--text-2); }

.cab-actions { display: flex; gap: 8px; margin-top: 10px; }
.cab-actions .btn {
  flex: 1; min-height: 34px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--border);
}
.cab-actions .btn:hover { border-color: #b9c6d8; }
.cab-actions .cab-del:hover { border-color: #E8A19B; color: #D3382F; }

@media (max-width: 640px) {
  .cab-stats { width: 100%; }
}
.item-seller {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 13.5px;
  min-width: 0;
}
.item-seller > span { min-width: 0; flex: 1; overflow: hidden; }
.item-seller b {
  font-size: 15px; font-weight: 800; display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.chat-head-sub {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.chat-head > div { min-width: 0; flex: 1; }
.chat-head-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Фильтр категорий ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
/* display:flex перебивает атрибут hidden — без этого разделы прошлой
   категории остаются висеть после перехода во «Все категории» */
.chips[hidden] { display: none; }
.subchips { margin-top: -6px; margin-bottom: 20px; }
.subchips .chip {
  font-size: 13px; font-weight: 700; padding: 7px 16px;
  background: linear-gradient(135deg, #FFF0E8 0%, #FFE3D2 100%);
  border: 1.5px solid #FFC4A3; color: #C2410C;
  box-shadow: 0 1px 4px rgba(255,107,44,.10);
  transition: all .2s ease;
}
.subchips .chip:hover { background: #FFE0CC; border-color: #FF9E6B; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(255,107,44,.15); }
.subchips .chip.active { background: linear-gradient(135deg, var(--orange) 0%, #E8551C 100%); border-color: var(--orange); color: #fff; box-shadow: 0 2px 8px rgba(255,107,44,.30); transform: translateY(-1px); }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 7px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: #b9c6d8; }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Карточки объявлений ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.listing-grid--top { margin-bottom: 18px; }
.listing-grid--promo { margin-bottom: 18px; }
.listing-card--top {
  border-color: #f0c84a;
  background: linear-gradient(180deg, #fffaf0 0%, var(--surface) 60%);
}
.listing-card--top:hover { border-color: #e0b13a; }
.listing-ph--top { position: relative; background: linear-gradient(135deg, #fff4cc 0%, #fde68a 100%); }
.top-badge {
  position: absolute; top: 8px; left: 8px;
  background: #f0c84a; color: #4a3500;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.listing-card--promo {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f5f7ff 0%, var(--surface) 60%);
}
.listing-card--promo:hover { border-color: #93a4f4; }
.listing-ph--promo { position: relative; background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%); }
.promo-badge {
  position: absolute; top: 8px; left: 8px;
  background: #4f6bff; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.promo-tag {
  display: inline-block; background: #e0e7ff; color: #1e3a8a;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
  margin-bottom: 6px;
}
.listing-card--promo .offer-title { font-size: 14.5px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; }
.listing-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s;
  position: relative;
}
.fav-dot {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 2px solid #EF3124;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: transform .12s, background .15s;
  padding: 0;
}
.fav-dot:hover { transform: scale(1.12); }
.fav-dot.active { background: #EF3124; }
.listing-card:hover { border-color: #b9c6d8; }
.listing-card img, .listing-ph {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.listing-ph { display: grid; place-items: center; color: #aeb6c2; }
/* карточка без фото не должна «схлопываться» — держим ту же высоту */
.listing-card > .listing-ph { flex-shrink: 0; }

/* 1-я линия: логотипы брендов не обрезаем — вписываем в то же по размеру
   поле (aspect-ratio 3/2 сохраняется), просто без cover-кропа. */
.listing-grid--top .listing-card img {
  object-fit: contain;
  padding: 14px;
  background: #fff;
}

/* Платформенные продукты (банковские услуги) — текстовые карточки */
.offer-card .listing-body { padding: 16px 14px 14px; }
.offer-tag {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #9A7B2D; background: #FAF3E3;
  border-radius: 6px; padding: 3px 8px; margin-bottom: 10px;
}
.offer-title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.offer-desc {
  font-size: 13px; color: var(--text-2); margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.offer-card .listing-price { margin-top: 8px; font-size: 15px; }
.listing-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.listing-price { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.listing-title {
  font-size: 14.5px; font-weight: 600; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.9em;
}
.listing-card:hover .listing-title { color: var(--accent); }
.listing-meta {
  font-size: 12.5px; color: var(--text-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.listing-meta.stock-ok { color: var(--green); font-weight: 600; }
.listing-meta.stock-out { color: var(--orange); }
.listing-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.listing-actions .btn { min-height: 34px; padding: 5px 12px; font-size: 13.5px; flex: 1; }

/* ---------- Модальное окно выбора банка ---------- */
.bank-variants {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--bh-gray-200);
}
.bank-variants .chip {
  flex: 1; min-width: 140px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 12px;
  font-size: 13.5px; font-weight: 600; text-align: center;
}
.bank-variants .chip.active { background: var(--bh-blue); border-color: var(--bh-blue); color: #fff; }
.bank-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}

/* ---------- Кабинет: вкладки активные / архив ---------- */
.cab-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.cab-tabs .chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; }
.cab-tabs .chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.cab-tabs-count { font-size: 12px; font-weight: 700; opacity: .8; }
.bank-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px 10px 18px; text-align: center;
  background: var(--surface); border: 2px solid transparent;
  border-radius: var(--radius-md); cursor: pointer;
  font: inherit; color: inherit;
  transition: border-color .15s, background .15s;
}
.bank-tile:hover,
.bank-tile:focus-visible {
  border-color: #EF3124;
  background: var(--surface);
  outline: none;
}
.bank-logo {
  width: 96px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.bank-logo img { width: 100%; height: 100%; object-fit: contain; }
.bank-initial {
  width: 64px; height: 64px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bh-blue); color: #fff;
  font-size: 26px; font-weight: 800;
}
.bank-logo--empty {
  background: var(--bh-blue-soft); border: 1px dashed var(--bh-blue);
  box-shadow: none;
}
.bank-plus {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bh-blue); color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1;
}
.bank-name { font-size: 13px; font-weight: 600; color: var(--bh-gray-900); line-height: 1.2; }
.bank-go {
  position: absolute; top: 8px; right: 10px;
  font-size: 15px; color: var(--bh-gray-400);
  transition: color .15s, transform .15s;
}
.bank-tile:hover .bank-go { color: var(--bh-blue); transform: translateX(2px); }
.bank-variants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bank-variants--stack { display: grid; gap: 10px; }
.bank-variant-card {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 16px;
  background: var(--bh-blue-soft);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s;
}
.bank-variant-card:hover { border-color: var(--bh-blue); background: #fff; }
.bank-variant-name { flex: 1; }
.bank-variant-card .bank-go { position: static; }

.bank-tile--empty { cursor: default; border-style: dashed; background: var(--bh-blue-soft); min-height: 168px; }
.bank-tile--empty:hover { border-color: var(--bh-blue); box-shadow: none; transform: none; background: var(--bh-blue-soft); }
.bank-tile--empty .bank-name { color: var(--bh-blue); font-weight: 700; font-size: 16px; }
.bank-tile--empty .bank-name .free-note {
  display: block; margin-top: 6px; font-size: 14px; font-weight: 800;
  color: #00863A; animation: bankFreeBlink 1.8s ease-in-out infinite;
}
@keyframes bankFreeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.empty-note {
  text-align: center; color: var(--text-2); padding: 48px 0; font-size: 14.5px;
}

/* ---------- Фото-превью в форме ---------- */
.photo-drop {
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 14px; text-align: center; font-size: 13.5px; color: var(--text-2);
  cursor: pointer; transition: border-color .15s;
}
.photo-drop:hover { border-color: var(--accent); color: var(--accent); }
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-previews img {
  width: 72px; height: 54px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
}
.photo-previews:empty { margin-top: 0; }

/* превью с кнопкой удаления — в кабинете */
.photo-thumb { position: relative; line-height: 0; }
.photo-thumb .photo-del {
  position: absolute; top: -5px; right: -5px;
  width: 20px; height: 20px; padding: 0;
  display: grid; place-items: center;
  border: none; border-radius: 999px;
  background: var(--text); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer;
}
.photo-thumb .photo-del:hover { background: #D3382F; }
.photo-thumb .photo-main {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(20,24,30,.72); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 14px;
  text-align: center; border-radius: 0 0 6px 6px;
}
.photo-drop[hidden] { display: none; }

/* ---------- Чаты ---------- */
.chat-layout {
  display: grid; grid-template-columns: 320px 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; height: calc(100vh - 170px); min-height: 420px;
}
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-list-item {
  display: flex; gap: 10px; padding: 12px 14px; width: 100%;
  border: none; background: none; text-align: left;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.chat-list-item:hover { background: var(--bg); }
.chat-list-item.active { background: var(--blue-soft); }
.chat-list-item img, .chat-list-thumb {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: var(--bg);
}
.chat-list-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-last { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-body { min-width: 0; flex: 1; }

.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.chat-head img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.chat-head-title { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-sub { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 72%; padding: 8px 12px; border-radius: 12px; font-size: 14px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-time { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.msg-guest-badge {
  display: inline-block; margin-bottom: 4px; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; background: #FFF0E8; color: #B45309;
}
.msg.me .msg-guest-badge { background: rgba(255,255,255,.2); color: #fff; }
.chat-guest-note {
  margin: 0 16px 10px; padding: 8px 12px; border-radius: 8px;
  background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; font-size: 13px;
}
.msg img { max-width: 220px; width: 100%; border-radius: 8px; margin-top: 6px; display: block; }
.msg-file {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  font-size: 13px; padding: 7px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .08);
}
.msg.me .msg-file { background: rgba(255, 255, 255, .18); }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-input textarea {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font: inherit; font-size: 14px; resize: none; max-height: 120px; min-height: 40px;
}
.chat-input textarea:focus { outline: none; border-color: var(--accent); }
.attach-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-2); flex-shrink: 0;
}
.attach-btn:hover { border-color: var(--accent); color: var(--accent); }
.attach-preview { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; }
.attach-preview span {
  font-size: 12px; background: var(--blue-soft); color: var(--accent);
  border-radius: 6px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px;
}
.attach-preview button { background: none; border: none; color: inherit; font-size: 13px; padding: 0; }

.chat-empty { display: grid; place-items: center; height: 100%; color: var(--text-2); font-size: 14.5px; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; z-index: 300;
  animation: toastIn .25s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Новости ---------- */
.news-grid { display: flex; flex-direction: column; gap: 16px; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  transition: border-color .15s, box-shadow .15s;
}
.news-card:hover { border-color: #b9c6d8; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.news-badge {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--blue-soft); color: var(--accent);
  margin-bottom: 8px;
}
.news-date { font-size: 13px; color: var(--text-2); }
.news-title { font-size: 18px; font-weight: 700; margin: 6px 0 8px; }
.news-excerpt { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 240px; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 0; gap: 12px; justify-content: flex-start; }
  .header-inner > .logo { flex: 0 0 auto; }
  .header-inner > .header-actions { margin-left: auto; }
  .nav { order: 3; width: 100%; flex: 0 0 100%; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 0 12px; border-top: 1px solid var(--border); margin-top: 4px; display: flex; }
  .nav a { width: 100%; padding: 8px 0; }
  .burger { display: none; }
}
@media (max-width: 580px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .bank-grid { grid-template-columns: repeat(2, 1fr); }
  .cab-grid { grid-template-columns: 1fr; }
  .fav-grid { grid-template-columns: 1fr; }
  .fav-card { flex-direction: column; align-items: flex-start; }
  .chat-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.btn-auth-login { font-weight: 700; white-space: nowrap; }
.header-actions .btn-auth-login { flex-shrink: 0; }

.nav-badge-dot{min-width:10px;width:10px;height:10px;padding:0;margin-left:5px;font-size:0;line-height:0;vertical-align:middle;position:relative;top:2px}
.chat-list-item{align-items:center}.chat-list-unread{flex-shrink:0;width:10px;height:10px;border-radius:50%;background:#EF3124;margin-left:4px;align-self:center;position:relative;top:2px}.chat-list-item.has-unread .chat-list-title{font-weight:800}.chat-list-item.has-unread .chat-list-last{color:var(--text);font-weight:600}
