/* Доработки страниц: кнопки без теней, капча, помощь, портфолио, публичный профиль. Подключается последним, старые файлы не трогаем. */

/* ===== ЗАГОЛОВКИ КАТАЛОГОВ ===== */
/* заголовки разделов стали h1 (для поисковиков) — снимаем отступы и размер, которые h1 получал из старых стилей */
h1.section-title, h1.pubp-name { margin: 0; padding: 0; line-height: 1.25; }

/* ===== КНОПКИ: БЕЗ ТЕНЕЙ ===== */
/* цветные «свечения» под кнопками выглядели грязно на светлой теме; !important — потому что у .hero-btn-green тень тоже с !important */
:is(.btn, button, .btn-accent, .btn-primary, .btn-green, .btn-blue, .btn-red, .hero-btn-primary, .hero-btn-green, .hero-search-btn, .icon-btn, .yandex-btn, .tabs > ul li.active), :is(.btn, button, .btn-accent, .btn-primary, .btn-green, .btn-blue, .btn-red, .hero-btn-primary, .hero-btn-green, .hero-search-btn, .icon-btn, .yandex-btn, .tabs > ul li.active):hover { box-shadow: none !important; }

/* ===== КАПЧА НА РЕГИСТРАЦИИ ===== */
/* виджет масштабируется скриптом под ширину формы (внутренний #anchor живёт в чужом iframe) */
.registration__form-capcha { width: 100%; margin: 0 0 16px; }

/* регистрация: выбор роли «исполнитель / заказчик» */
.reg-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reg-role-card { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.reg-role-card:hover { border-color: var(--border-strong); }
.reg-role-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.reg-role-card input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.reg-role-card span { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.reg-role-card small { color: var(--muted); font-size: 12px; }
@media (max-width: 420px) { .reg-role { grid-template-columns: 1fr; } }
.registration__form-capcha .ddg-captcha-container { min-height: 60px; } /* место под виджет до загрузки скрипта — форма не прыгает */

/* ===== ПОМОЩЬ ===== */
.help-page { max-width: 1180px; margin: 0 auto; }
.help-hero { margin: 18px; padding: 36px 36px 30px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.help-title { margin: 4px 0 8px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.help-sub { max-width: 640px; margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.help-search { display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2); transition: border-color .15s; }
.help-search:focus-within { border-color: var(--accent); }
.help-search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.help-search input[type="text"] { margin: 0; padding: 13px 0; border: none; background: transparent; box-shadow: none; font-size: 15px; }
.help-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.help-cat { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.help-cat:hover { background: var(--accent); color: #fff; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin: 0 18px 18px; }
.help-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.help-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.help-section-head h2 { margin: 0; font-size: 19px; font-weight: 750; color: var(--text); }
.help-dot { width: 10px; height: 10px; flex: none; border-radius: 3px; }
.help-dot.tint-sky { background: var(--c-sky); }
.help-dot.tint-amber { background: var(--c-amber); }
.help-dot.tint-green { background: var(--c-green); }
.help-dot.tint-violet { background: var(--c-violet); }
.help-dot.tint-rose { background: var(--c-rose); }
.help-dot.tint-cyan { background: var(--c-cyan); }
.help-main .faq-list { max-width: none; }
.help-empty { display: none; padding: 24px; border-radius: 12px; background: var(--surface); color: var(--muted); text-align: center; }
.help-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.help-card { padding: 22px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.help-card-accent { border-top: 3px solid var(--accent); }
.help-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 750; color: var(--text); }
.help-card p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.help-card-ico { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.help-card-ico svg { width: 22px; height: 22px; }
.help-btn { display: block; text-align: center; }
.help-link { display: block; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.help-link:last-child { border-bottom: 0; }
.help-link:hover { color: var(--accent); }

/* ===== ЛИЧНЫЙ КАБИНЕТ: СОЦСЕТИ ===== */
.pf-social-grid { margin: 6px 0 8px; }
.pf-social-hint { margin-bottom: 18px; }
.pubp-social-locked { color: var(--muted); }

/* ===== РЕДАКТОР ПОРТФОЛИО: НЕСКОЛЬКО КАРТИНОК ===== */
.pe-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pe-images:empty { display: none; }
.pe-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pe-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pe-cover { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.pe-thumb-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .15s; }
.pe-thumb:hover .pe-thumb-actions, .pe-thumb:focus-within .pe-thumb-actions { opacity: 1; }
.pe-thumb-actions button { flex: 1; margin: 0; padding: 4px 6px; border: none; border-radius: 6px; background: rgba(255, 255, 255, .94); color: #0f172a; font-size: 11px; }
.pe-thumb-actions button:hover { background: #fff; color: var(--accent); }
.pe-thumb-actions .pe-remove, .pe-thumb-actions .pe-remove:hover { color: #b91c1c; }
.pe-empty { margin-bottom: 10px; padding: 18px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.pe-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pe-add .btn { margin: 0; }
.pe-add input[type="text"] { flex: 1; min-width: 200px; margin: 0; }
.pe-or { color: var(--muted); font-size: 13px; }
@media (hover: none) { .pe-thumb-actions { opacity: 1; } }

/* ===== КАРТОЧКИ ПОРТФОЛИО ===== */
.portfolio-cover-link { display: block; width: 100%; height: 100%; }
.portfolio-item-title a { color: inherit; }
.portfolio-item-title a:hover { color: var(--accent); }
.portfolio-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.pp-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 7px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 11.5px; font-weight: 600; }
/* растянутая ссылка: вся карточка кликабельна без вложенных <a>, ссылка на проект лежит слоем выше */
.pp-card { position: relative; }
.pp-stretch { color: inherit; }
.pp-stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pp-above { position: relative; z-index: 2; }
.pp-card:hover .portfolio-public-title { color: var(--accent); }

/* ===== СТРАНИЦА РАБОТЫ ===== */
.portfolio-item-visual { background: var(--surface-2); }
.portfolio-item-visual > a { display: block; width: 100%; height: 100%; }
.portfolio-item-image { object-fit: contain; }
.pi-thumbs { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.pi-thumbs .pi-thumb { flex: none; width: 88px; height: 62px; margin: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.pi-thumbs .pi-thumb:hover, .pi-thumbs .pi-thumb.active { border-color: var(--accent); }
.pi-thumbs .pi-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portfolio-item-description .rich-text { margin-bottom: 30px; font-size: 15.5px; color: var(--text); }
.author-name a { color: inherit; }
.author-name a:hover { color: var(--accent); }

/* ===== ПУБЛИЧНЫЙ ПРОФИЛЬ ===== */
/* раньше отзывы и проекты получали padding 10px 2px от .review — текст прилипал к краям */
.pubp-bio.rich-text { white-space: normal; }
.pubp-section { padding: 26px 28px; }
.pubp-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pubp-section-head h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.01em; color: var(--text); }
.pubp-count { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; text-align: center; }
.pubp-avg { color: #d9a441; font-size: 14px; font-weight: 700; }
.pubp-page .portfolio-public-grid { margin-top: 0; }
.pubp-list { display: flex; flex-direction: column; gap: 12px; }
.pubp-item { padding: 16px 20px; border-radius: 12px; background: var(--surface-2); }
.pubp-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pubp-item-head .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; }
.pubp-item-title { font-weight: 700; color: var(--text); }
.pubp-item-title:hover { color: var(--accent); }
.pubp-item-price { color: var(--text); white-space: nowrap; }
.pubp-item-text { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--text); }
.pubp-item-meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.pubp-item-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pubp-empty { padding: 4px 0; color: var(--muted); }
.pubp-socials { display: flex; flex-direction: column; gap: 6px; }
/* публичный профиль: цифры и уровень в основной карточке, боковая — по высоте содержимого (контакты и кнопки) */
.pubp-top { align-items: start; }
.pubp-side { position: sticky; top: 80px; }
.pubp-side .pubp-cta { margin-top: 0; }
.pubp-stats.pubp-stats-row { grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.pubp-level { margin: 12px 0 0 !important; }
@media (max-width: 900px) { .pubp-side { position: static; } }
@media (max-width: 560px) { .pubp-stats.pubp-stats-row { grid-template-columns: 1fr 1fr; } }
.pubp-social { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 9px; background: var(--surface-2); font-size: 13px; }
.pubp-social-name { flex: none; color: var(--muted); }
.pubp-social > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== ПОСАДОЧНЫЕ СТРАНИЦЫ КАТЕГОРИЙ ===== */
.catl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.catl-crumbs a { color: var(--muted); }
.catl-crumbs a:hover { color: var(--accent); }
.catl-crumbs b { color: var(--text); font-weight: 600; }
.catl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.catl-actions .btn { margin: 0; }
.catl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.catl-chips-top { margin-top: -4px; }
.catl-chip { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.catl-chip:hover { background: var(--accent); color: #fff; }
.catl-text { margin-top: 24px; padding: 26px 28px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--text); font-size: 15px; }
.catl-text h2 { margin: 18px 0 8px; font-size: 19px; font-weight: 750; color: var(--text); }
.catl-text ul { margin: 0 0 10px; padding-left: 22px; }
.catl-others { margin-top: 24px; }
.catl-others-title { margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--text); }

/* ===== БЛОГ: ОБЛОЖКИ И КАРТИНКИ В СТАТЬЯХ ===== */
.blog-card { overflow: hidden; }
.blog-card-cover { display: block; width: calc(100% + 48px); max-width: none; aspect-ratio: 16 / 9; margin: -24px -24px 16px; object-fit: cover; background: var(--surface-2); }
.blog-card-title a { color: inherit; }
.blog-card:hover .blog-card-title { color: var(--accent); }
.post-draft-bar { margin-bottom: 18px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--c-amber) 16%, transparent); color: var(--text); font-size: 14px; }
.post-draft-bar a { font-weight: 700; }
.post-cover { display: block; width: 100%; aspect-ratio: 16 / 9; margin: 20px 0 8px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.post-content figure { margin: 24px 0; }
.post-content figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.post-content figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* ===== АДАПТИВ ===== */
.portfolio-item-content > * { min-width: 0; }
/* сетка «работа + автор» (1fr 380px) в index.css не складывалась: на планшете основная колонка сжималась в полоску */
@media screen and (max-width: 1100px) {
  .portfolio-item-content { grid-template-columns: 1fr; gap: 24px; }
}
@media screen and (max-width: 768px) {
  .blog-card-cover { width: calc(100% + 40px); margin: -20px -20px 14px; }
  .catl-text { padding: 18px 16px; }
}
@media screen and (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-side { position: static; }
}
@media screen and (max-width: 600px) {
  .help-hero { margin: 0 0 16px; padding: 24px 18px; }
  .help-title { font-size: 24px; }
  .help-layout { margin: 0; }
  .pubp-section { padding: 18px 16px; }
  .pubp-item { padding: 14px; }
  .pe-add input[type="text"] { min-width: 100%; }
}

/* сроки сделки в блоке статуса проекта */
.deal-deadline { padding: 10px 12px; border-radius: 10px; background: rgba(2, 132, 199, .07); border: 1px solid rgba(2, 132, 199, .18); display: flex; flex-direction: column; gap: 4px; }

/* баланс в шапке и в профиле, пополнение вверху кошелька */
.header-balance { display: inline-flex !important; align-items: center; gap: 6px; padding: 5px 12px !important; border-radius: 999px; background: rgba(2, 132, 199, .10); color: #0284c7 !important; font-weight: 600; white-space: nowrap; }
[data-theme="dark"] .header-balance { background: rgba(14, 165, 233, .16); color: #38bdf8 !important; }
.header-balance:hover { background: rgba(2, 132, 199, .18); }
.pf-stats.pf-stats-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .pf-stats.pf-stats-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .pf-stats.pf-stats-5 { grid-template-columns: 1fr 1fr; } }
.stat-link { text-decoration: none; color: inherit; transition: border-color .15s; }
.stat-link:hover { border-color: #0ea5e9; }
.stat-link .stat-num { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-topup .field { display: flex; gap: 8px; flex-wrap: wrap; max-width: 640px; }

/* превью картинки, вставленной в чат из буфера обмена */
.paste-preview { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; width: 440px; max-width: 90vw; }
.paste-preview img { max-width: 100%; max-height: 50vh; border-radius: 8px; border: 1px solid var(--border, #e2e8f0); object-fit: contain; }

/* рабочая часть страницы проекта (бывший дашборд) */
.work-area { scroll-margin-top: 70px; }
.work-area > h2 { margin: 24px 18px 0; }

/* чёрный список: заглушка вместо строки ввода в чате и закрытый профиль */
.chat-blocked { margin: 10px auto; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }
.pubp-restricted { max-width: 520px; margin: 40px auto; text-align: center; }
.pubp-restricted .pubp-avatar { margin: 0 auto 12px; }
.pubp-restricted p { color: var(--muted); margin-top: 8px; }
.bl-list { display: flex; flex-direction: column; gap: 10px; }
.bl-row { display: flex; align-items: center; gap: 12px; }
.bl-row .avatar { width: 36px; height: 36px; }

/* «что дальше» по сделке: одна строка над кнопками проекта */
.deal-next { flex-basis: 100%; padding: 8px 12px; border-radius: 10px; background: rgba(2, 132, 199, .08); border: 1px solid rgba(2, 132, 199, .2); color: var(--text); font-size: 12px; line-height: 1.4; }
[data-theme="dark"] .deal-next { background: rgba(14, 165, 233, .12); border-color: rgba(56, 189, 248, .25); }
.project-actions { flex-wrap: wrap; }
#projectStatusBox .project-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#projectStatusBox .project-actions > * { margin: 0; }
/* длинный текст кнопки не ломает строку — обрезается многоточием, полный текст в подсказке браузера */
.project-actions .btn, .project-actions button, .act-row .btn, .act-row button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* кнопки ответа под системным сообщением чата и в уведомлении */
.act-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.act-row .btn-small, .act-row .btn { margin: 0; font-size: 12px; padding: 5px 10px; }
.system-message .act-row { justify-content: center; }

/* окно резерва средств */
.reserve-panel { max-width: 460px; margin: 8% auto; }
.reserve-sum { margin: 12px 0; font-size: 15px; }
.reserve-payers { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.reserve-payers label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.reserve-calc { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.reserve-calc .pf-sum-row { display: flex; justify-content: space-between; gap: 12px; }

/* отзыв: выбранные звёзды золотые, остальные серые */
.review-panel { max-width: 420px; margin: 10% auto; }
.review-panel .review-stars { font-size: 24px; cursor: pointer; user-select: none; letter-spacing: 2px; }
.review-panel .review-stars span { color: var(--border-strong, #cbd5e1); transition: color .1s; }
.review-panel .review-stars span.on { color: #f5a623; }
/* оценка на страницах — те же цвета, что в окне отзыва, но мелко (_s.StarsHtml) */
.stars-row { display: inline-flex; gap: 1px; font-size: 12px; line-height: 1; vertical-align: middle; white-space: nowrap; }
.stars-row i { font-style: normal; color: var(--border-strong, #cbd5e1); }
.stars-row i.on { color: #f5a623; }

/* страница проекта: блоки одной ширины, жалоба, отклики */
/* все блоки страницы проекта — одной ширины: у панелей были свои боковые отступы, у списков откликов — нет */
.project-page-top { gap: 18px; }
.project-page-top > .panel, .work-area .pf-dash, .work-area .panel, .project-block { margin-left: 0 !important; margin-right: 0 !important; }
.work-area > h2 { margin-left: 0 !important; margin-right: 0 !important; }
.report-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); border: 1px solid var(--border); background: transparent; }
.report-btn:hover { color: #dc2626; border-color: #dc2626; }
.report-btn .ico { width: 14px; height: 14px; }
.report-reasons { display: flex; flex-direction: column; gap: 7px; max-width: 460px; text-align: left; }
.report-reasons label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.report-reasons input { margin-top: 2px; flex: none; }
.proposals-summary { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.proposal-card { padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.proposal-card.mine { border-color: rgba(2, 132, 199, .45); }
.proposal-head { display: flex; align-items: center; gap: 12px; }
.proposal-head .avatar { width: 40px; height: 40px; flex: none; }
.proposal-who { flex: 1; min-width: 0; }
.proposal-terms { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.proposal-terms .project-price { font-size: 17px; }
.proposal-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-reserve { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(245, 166, 35, .1); }
.role-reserve span { flex: 1; }
.invite-email .invite-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.invite-email .invite-row input[type=email] { flex: 1 1 240px; }
.guest-cta { text-align: center; }
.guest-cta .flex { justify-content: center; }
@media (max-width: 640px) {
  /* на мобиле цена и срок отклика — отдельной строкой под именем, а не прижатыми к краю */
  .proposal-head { flex-wrap: wrap; }
  .proposal-terms { flex-direction: row; align-items: baseline; gap: 8px; flex-basis: 100%; padding-left: 52px; justify-content: flex-start; }
}

/* поиск проектов: разделы выпадающим списком, фильтры сворачиваются на мобиле */
.find-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.cat-dropdown { position: relative; }
.cat-dropdown summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--border-strong, var(--border)); border-radius: 10px; background: var(--surface); font-size: 14px; user-select: none; }
.cat-dropdown summary::-webkit-details-marker { display: none; }
.cat-dropdown summary::after { content: '▾'; margin-left: 8px; color: var(--muted); }
.cat-dropdown[open] summary::after { content: '▴'; }
.cat-dropdown-list { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 240px; max-height: 60vh; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-hover); display: flex; flex-direction: column; }
.cat-dropdown-list a { padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.cat-dropdown-list a:hover { background: var(--accent-soft); color: var(--accent); }
.filter-toggle { display: none; align-items: center; gap: 6px; }
@media (max-width: 768px) {
  .filter-toggle { display: inline-flex; }
  #filterForm { display: none; }
  #filterForm.open { display: flex; }
}
/* карточка проекта в ленте целиком ведёт на проект */
.project[data-href] { cursor: pointer; }
.project-offers { font-size: 12px; color: var(--muted); }

/* «Моё портфолио»: стрелки порядка поверх обложки */
.portfolio-order { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; z-index: 3; }
.portfolio-order .btn-small { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .65); color: #fff; border: none; border-radius: 8px; }
.portfolio-order .btn-small:hover { background: rgba(2, 132, 199, .9); }
.portfolio-order .ico { width: 16px; height: 16px; }

/* шапка: чат и уведомления вне меню — на мобиле рядом с бургером */
.header-bells { display: flex; align-items: center; gap: 6px; margin-right: 6px; }
.header-bells .notification-bell { position: relative; }
@media (max-width: 900px) { .header-bells { margin-right: 0; } }

/* регистрация по приглашению */
.reg-invite { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(22, 163, 74, .08); border: 1px solid rgba(22, 163, 74, .25); text-align: left; }
.reg-invite .avatar { width: 40px; height: 40px; flex: none; }

/* споры */
.ds-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ds-new { background: rgba(2, 132, 199, .12); color: #0284c7; }
.ds-work { background: rgba(217, 119, 6, .14); color: #b45309; }
.ds-esc { background: rgba(220, 38, 38, .12); color: #dc2626; }
.ds-done { background: rgba(22, 163, 74, .12); color: #15803d; }
.ds-closed { background: rgba(100, 116, 139, .14); color: #475569; }
[data-theme="dark"] .ds-new { color: #38bdf8; } [data-theme="dark"] .ds-work { color: #fbbf24; } [data-theme="dark"] .ds-esc { color: #f87171; } [data-theme="dark"] .ds-done { color: #4ade80; } [data-theme="dark"] .ds-closed { color: #cbd5e1; }
.ds-howto summary { cursor: pointer; font-weight: 600; }
.ds-steps { margin: 12px 0; padding-left: 20px; line-height: 1.6; }
.ds-legend { display: grid; gap: 6px; }
.ds-list { display: flex; flex-direction: column; gap: 10px; }
.ds-card { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s; }
.ds-card:hover { border-color: var(--accent); }
.ds-card.closed { opacity: .8; }
.ds-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ds-card-title { font-weight: 600; font-size: 16px; margin: 6px 0 4px; }
.ds-card-decision { margin-top: 8px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: rgba(22, 163, 74, .08); }
.ds-crumbs { margin: 4px 0 12px; font-size: 14px; }
.ds-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.ds-layout .panel { margin: 0 0 16px; }
.ds-title { margin: 8px 0 6px; }
.ds-status-hint { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; margin-bottom: 12px; }
.ds-decision { padding: 10px 12px; border-radius: 10px; background: rgba(22, 163, 74, .08); border-left: 3px solid #16a34a; margin-bottom: 12px; }
.ds-evidence { word-break: break-all; }
.ds-msg { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; max-width: 92%; }
.ds-msg.mine { margin-left: auto; background: rgba(2, 132, 199, .08); }
.ds-msg.admin { border-left: 3px solid #0284c7; background: rgba(2, 132, 199, .06); max-width: 100%; }
.ds-msg-head { display: flex; gap: 8px; align-items: baseline; }
.ds-msg-text { white-space: pre-wrap; margin-top: 4px; font-size: 14px; }
.disputes-page textarea, .ds-page textarea { width: 100%; box-sizing: border-box; margin-top: 8px; }
.ds-reply-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.ds-party { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ds-party .avatar { width: 36px; height: 36px; }
.ds-escrow { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.ds-escrow.frozen { background: rgba(2, 132, 199, .08); }
.ds-timeline { display: grid; gap: 4px; font-size: 13px; }
.ds-violation { padding: 8px 0; border-bottom: 1px solid var(--border); }
.ds-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ds-type { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ds-type:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ds-type span { display: flex; flex-direction: column; }
.ds-type small { color: var(--muted); font-size: 12px; }
.ds-score { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 14px; }
.ds-score > b { font-size: 34px; color: #16a34a; }
.ds-score.mid > b { color: #d97706; }
.ds-score.high > b { color: #dc2626; }
@media (max-width: 900px) { .ds-layout { grid-template-columns: 1fr; } }

/* уведомления: кнопки ответа */
.notification-item .act-row { margin-top: 10px; }

/* отзыв о сделке без резерва средств — пометка рядом со звёздами */
.review-noescrow { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: rgba(245, 158, 11, .15); color: #b45309; cursor: help; }
[data-theme="dark"] .review-noescrow { color: #fbbf24; }

/* имя автора отзыва — ссылка на его профиль, цветом обычного текста */
.quote-name a, a.review-author { color: inherit; text-decoration: none; }
.quote-name a:hover, a.review-author:hover { text-decoration: underline; }

/* обязательные поля: звёздочка у подписи, красная подсветка пустого или неверного (common.js, checkRequired) */
.field:has(> [required]) > .field-label::after, .field[data-must] > .field-label::after,
.pf-field:has(> [required]) > label::after { content: " *"; color: #dc2626; }
input.field-error, select.field-error, textarea.field-error, trix-editor.field-error {
    border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important;
}
.field-error > .field-label, label.field-error { color: #dc2626; }
/* блок с подписью (тип спора): подпись красная, рамка вокруг вариантов; без подписи (роль, причины жалобы) — вокруг блока */
[data-must].field-error:has(> .field-label) > :not(.field-label):not(.field-hint) { outline: 1.5px solid #dc2626; outline-offset: 3px; border-radius: 8px; }
[data-must].field-error:not(:has(> .field-label)) { outline: 1.5px solid #dc2626; outline-offset: 4px; border-radius: 10px; }
