/* Современные компоненты и блоки биржи фриланса. Подключается последней, старые файлы не трогаем. */

/* ===== БАЗА ===== */
/* common.css задаёт body { height:100% } — это ограничивает контейнер sticky одним экраном и header уезжает при прокрутке. Меняем на min-height, чтобы тело росло под контент. */
body { background: var(--bg-main); color: var(--text); -webkit-font-smoothing: antialiased; height: auto; min-height: 100vh; }
main { background: var(--bg-main); padding: 24px 56px 48px; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3 { letter-spacing: -.01em; }
::selection { background: var(--accent-soft); }
/* Полоса прокрутки: common.css задаёт белый thumb (невидим на светлой теме) — переопределяем под тему. */
::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); }
html { scrollbar-color: var(--scrollbar-thumb) transparent; scrollbar-width: thin; }

/* ===== ШАПКА ===== */
header { height: 56px; background: var(--header-bg); color: var(--header-color); border-bottom: 1px solid var(--header-border); padding: 0 32px; backdrop-filter: saturate(160%) blur(12px); position: sticky; top: 0; z-index: 1500; transition: height .25s ease, box-shadow .25s ease, background .25s ease; }
header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brand-grad); opacity: .55; pointer-events: none; }
header.shrink { height: 46px; box-shadow: 0 4px 18px rgba(8, 16, 26, .3); }
header .logo h2 { transition: font-size .25s ease; }
header.shrink .logo h2 { font-size: 17px; }
header a { color: var(--header-color); }
.logo h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(90deg, #9cc3de, #8fc7c0 55%, #b9a9e0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
header > nav > ul { gap: 2px; }
header nav li a { color: var(--header-color); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
header nav li a:hover { color: var(--header-hover); background: var(--header-hover-bg); }
header nav li a.drop:hover { background: var(--header-hover-bg) url('../../img/dropdown.svg') no-repeat right 10px center/11px; }
header .avatar { width: 26px; height: 26px; border-radius: 50%; }
nav a.drop { background: url('../../img/dropdown.svg') no-repeat right 10px center/11px; }
nav ul ul { background: var(--surface); border: 1px solid transparent; border-radius: 10px; box-shadow: var(--shadow-hover); overflow: hidden; padding: 4px; margin-top: 6px; width: 190px; }
/* подменю в шапке открывается при наведении и удерживается, пока курсор внутри */
header nav li { position: relative; }
header nav li ul { top: 100%; left: 0; }
nav li li a { background: transparent; color: var(--text); border-radius: 7px; padding: 9px 12px; }
nav li li a:hover { background: var(--accent-soft); color: var(--accent); }
nav li li a.drop { background: transparent url('../../img/dropdown-right.svg') no-repeat center/20px; }
nav li { border-top: none; }
/* position: fixed — меню остаётся на экране при прокрутке страницы */
body > nav { position: fixed; left: 8px; top: 64px; z-index: 1500; width: 230px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 6px; max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; }
body > nav a:hover { background: var(--accent-soft); border-radius: 8px; }
/* мобильное меню: подменю раскрывается по клику и встраивается в поток, а не всплывает */
body > nav ul ul { position: static; visibility: visible; opacity: 1; width: auto; max-height: 0; overflow: hidden; background: var(--surface-2); box-shadow: none; margin: 0; padding: 0; border-radius: 8px; transition: max-height .2s ease; }
body > nav li.open > ul { max-height: 420px; padding: 4px; margin: 2px 0 6px; }
body > nav li.open > a.drop { color: var(--accent); background: var(--accent-soft); border-radius: 8px; }
body > nav li li a { background: transparent; color: var(--text); padding: 9px 14px 9px 24px; font-size: 13.5px; }
body > nav a.drop { background-position: right 12px center; }
.notification-bell { color: color-mix(in srgb, var(--header-color) 72%, transparent); border-radius: 8px; }
.notification-bell:hover { color: var(--header-hover); background: var(--header-hover-bg); }
.notification-bell.has-notifications { color: var(--header-hover); }
.slider { background-color: rgba(120, 145, 180, .55); }
input:checked + .slider { background-color: var(--accent); }

/* ===== КНОПКИ ===== */
/* inline-flex с центрированием: у ссылок-кнопок (.btn на <a>) текст иначе прижимался к левому краю */
.btn, button { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 6px; border-radius: 9px; font-weight: 600; font-size: 13px; line-height: 1.25; padding: 7px 16px; box-shadow: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; transition: all .18s ease; }
/* обычные кнопки подсвечиваются акцентом, у цветных текст остаётся белым — иначе он сливался с фоном */
.btn:hover, button:hover { border-color: var(--accent); color: var(--accent); }
.btn-green:hover, .btn-red:hover, .btn-blue:hover, .btn-accent:hover, button.default:hover, .btn-primary:hover, .hero-btn-primary:hover, .hero-btn-green:hover { color: #fff !important; border-color: transparent; }
.btn-green:hover { background: color-mix(in srgb, var(--c-green) 85%, #000); }
.btn-red:hover { background: color-mix(in srgb, var(--c-rose) 85%, #000); }
.btn-blue:hover { background: var(--link-hover); }
.btn-white:hover { color: var(--accent); border-color: var(--accent); }
button.default, .btn-accent { background: var(--accent); color: #fff !important; border: none; box-shadow: 0 2px 8px var(--ring); }
button.default:hover, .btn-accent:hover { color: #fff !important; background: var(--link-hover); box-shadow: 0 4px 12px var(--ring); }
.btn-green { background: var(--c-green) !important; border: none; }
.btn-blue { background: var(--accent) !important; border: none; }
.btn-red { background: var(--c-rose) !important; border: none; }
.btn-white { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border-strong); }
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }

/* ===== ПОЛЯ ВВОДА ===== */
input[type="text"], input[type="password"], input[type="number"], textarea, select { border: 1px solid var(--input-border); border-radius: 9px; padding: 9px 12px; background: var(--input-bg); color: var(--input-color); transition: border-color .15s, box-shadow .15s; }
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, textarea:focus, select:focus { border-color: var(--input-focus); box-shadow: 0 0 0 3px var(--ring); }

/* ===== ПАНЕЛИ ===== */
.panel { background: var(--panel-bg); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--shadow-soft); margin: 18px; padding: 22px 24px; }
.panel > h1 { font-size: 18px; font-weight: 700; color: var(--panel-header); }
hr { background: var(--border); }

/* ===== HERO ===== */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding: 64px 56px; border-radius: 18px; margin: 0 0 28px; background: radial-gradient(120% 140% at 85% 15%, rgba(109, 178, 187, .22), transparent 55%), linear-gradient(135deg, var(--hero-bg1), var(--hero-bg2)); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 8% 100%, rgba(122, 95, 192, .22), transparent 60%); pointer-events: none; z-index: 1; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(90% 100% at 75% 10%, #000 25%, transparent 80%); mask-image: radial-gradient(90% 100% at 75% 10%, #000 25%, transparent 80%); pointer-events: none; z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(125, 165, 198, .14); border: 1px solid rgba(125, 165, 198, .32); color: #a9c7dc; border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 600; margin-bottom: 20px; }
.hero-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7db3bd; box-shadow: 0 0 0 4px rgba(109, 178, 187, .25); }
.hero-title { font-size: 41px; font-weight: 750; line-height: 1.12; color: #fff; margin-bottom: 18px; letter-spacing: -.015em; }
.hero-accent { background: linear-gradient(90deg, #8fbcd9, #7db3bd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: #b6c8da; font-size: 16px; line-height: 1.6; max-width: 480px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn-primary { background: var(--accent); color: #fff !important; padding: 13px 28px; border-radius: 9px; font-size: 14px; font-weight: 700; display: inline-block; box-shadow: 0 6px 18px rgba(74, 124, 160, .3); transition: background .2s, box-shadow .2s; }
.hero-btn-primary:hover { box-shadow: 0 8px 22px rgba(74, 124, 160, .38); color: #fff !important; background: var(--link-hover); }
.hero-btn-secondary { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #e2e8f0 !important; padding: 13px 28px; border-radius: 11px; font-size: 14px; font-weight: 600; display: inline-block; transition: background .2s; }
.hero-btn-secondary:hover { background: rgba(255, 255, 255, .16); color: #fff !important; }
.hero-orb { position: absolute; top: -70px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(109, 178, 187, .24), transparent 60%), radial-gradient(circle at 70% 70%, rgba(167, 139, 250, .18), transparent 65%); pointer-events: none; z-index: 1; }
/* строгая строка поиска: поле и кнопка отдельными прямоугольниками, без общей скруглённой рамки */
.hero-search { display: flex; gap: 8px; max-width: 520px; margin-bottom: 14px; }
.hero-search input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; color: #fff; font-size: 14px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s; }
.hero-search input::placeholder { color: #9fb4c8; }
.hero-search input:focus { outline: none; border-color: rgba(125, 165, 198, .6); box-shadow: 0 0 0 3px rgba(125, 165, 198, .16); }
.hero-search-btn { flex: none; background: var(--accent) !important; color: #fff !important; border: none !important; border-radius: 8px; padding: 11px 26px; font-weight: 650; font-size: 14px; box-shadow: none; }
.hero-search-btn:hover { color: #fff !important; opacity: .94; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.hero-chips-label { font-size: 12.5px; color: #9fb4c8; margin-right: 2px; }
.hero-chip { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #cfe3f5; border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.hero-chip:hover { background: rgba(125, 165, 198, .18); border-color: rgba(125, 165, 198, .4); color: #fff; }
.hero-visual { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; }
/* карточка «Безопасная сделка»: резерв → акт → выплата */
.hero-deal { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 22px; backdrop-filter: blur(8px); box-shadow: 0 20px 50px rgba(0, 0, 0, .28); }
.hd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.hd-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(85, 176, 120, .18); color: #8fd6a8; }
.hd-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.hd-sub { font-size: 12.5px; color: #9fb4c8; }
.hd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hd-step { display: flex; gap: 12px; position: relative; }
.hd-step:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 32px; bottom: -12px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.hd-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(125, 165, 198, .18); border: 1px solid rgba(125, 165, 198, .35); color: #cfe3f5; }
.hd-step.is-final .hd-dot { background: #55b078; border-color: #55b078; color: #fff; }
.hd-step b { display: block; font-size: 14px; font-weight: 650; color: #fff; margin: 3px 0 2px; }
.hd-text { display: block; font-size: 12.5px; color: #b6c8da; line-height: 1.45; }
.hd-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: #9fb4c8; line-height: 1.45; }
.hd-note svg { flex: none; margin-top: 1px; color: #dcb15f; }
.hero-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-perk { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; }
.hero-perk b { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.hero-perk span { display: block; font-size: 12px; color: #9fb4c8; line-height: 1.35; }

/* ===== СТАТИСТИКА ===== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; background: transparent; box-shadow: none; padding: 0; }
.stat-item { background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 22px 24px; text-align: left; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s; }
.stat-item:hover { box-shadow: var(--shadow-hover); }
.stat-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat-sub { font-size: 11.5px; color: var(--muted); opacity: .8; margin-top: 4px; }
.stat-divider { display: none; }

/* ===== ЗАГОЛОВОК СЕКЦИИ ===== */
.section { margin: 40px 0; }
main > section.section:nth-of-type(even) { background: var(--surface-2); border: 1px solid transparent; border-radius: 16px; padding: 28px; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.section-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.section-eyebrow::before { content: ''; display: inline-block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; margin: 0 8px 3px 0; vertical-align: middle; opacity: .65; }
.section-title { font-size: 25px; font-weight: 750; color: var(--text); letter-spacing: -.015em; }
.section-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.section-link { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }
.section-link:hover { gap: 9px; }

/* ===== КАТЕГОРИИ ===== */
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cat-card { background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s, box-shadow .2s; color: var(--text); }
.cat-card:hover { box-shadow: var(--shadow-hover); color: var(--text); }
.cat-ico { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .2s; }
.cat-name { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-count { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* раскраска иконок (разнообразие цветов) */
.tint-blue { background: color-mix(in srgb, var(--c-blue) 13%, transparent); color: var(--c-blue); }
.tint-sky { background: color-mix(in srgb, var(--c-sky) 13%, transparent); color: var(--c-sky); }
.tint-cyan { background: color-mix(in srgb, var(--c-cyan) 13%, transparent); color: var(--c-cyan); }
.tint-teal { background: color-mix(in srgb, var(--c-teal) 13%, transparent); color: var(--c-teal); }
.tint-green { background: color-mix(in srgb, var(--c-green) 13%, transparent); color: var(--c-green); }
.tint-amber { background: color-mix(in srgb, var(--c-amber) 13%, transparent); color: var(--c-amber); }
.tint-rose { background: color-mix(in srgb, var(--c-rose) 13%, transparent); color: var(--c-rose); }
.tint-violet { background: color-mix(in srgb, var(--c-violet) 13%, transparent); color: var(--c-violet); }
.tint-indigo { background: color-mix(in srgb, var(--c-indigo) 13%, transparent); color: var(--c-indigo); }

/* цветная подсветка карточки под цвет её иконки — мягкая тень при наведении, без рамок */
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-blue):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-blue) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-sky):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-sky) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-cyan):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-cyan) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-teal):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-teal) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-green):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-green) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-amber):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-amber) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-rose):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-rose) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-violet):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-violet) 14%, transparent); }
:is(.stat-item, .cat-card, .feat-card, .step-card, .pf-link):has(.tint-indigo):hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--c-indigo) 14%, transparent); }

/* лёгкие цветные подложки карточек — меньше сплошного белого, спокойная пестрота */
:is(.cat-card, .stat-item):has(.tint-blue) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-blue) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-sky) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-sky) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-cyan) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-cyan) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-teal) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-teal) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-green) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-green) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-amber) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-amber) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-rose) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-rose) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-violet) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-violet) 8%, var(--surface)), var(--surface) 65%); }
:is(.cat-card, .stat-item):has(.tint-indigo) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-indigo) 8%, var(--surface)), var(--surface) 65%); }

/* ===== КАК ЭТО РАБОТАЕТ ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.step-card { position: relative; background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 26px 22px; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s, box-shadow .2s; }
.step-card:hover { box-shadow: var(--shadow-hover); }
.step-num { position: absolute; top: 18px; right: 20px; font-size: 38px; font-weight: 800; color: var(--accent-soft); line-height: 1; }
.step-card:nth-child(1) .step-num { color: color-mix(in srgb, var(--c-sky) 26%, transparent); }
.step-card:nth-child(2) .step-num { color: color-mix(in srgb, var(--c-violet) 24%, transparent); }
.step-card:nth-child(3) .step-num { color: color-mix(in srgb, var(--c-amber) 28%, transparent); }
.step-card:nth-child(4) .step-num { color: color-mix(in srgb, var(--c-green) 28%, transparent); }
.step-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.step-text { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ===== ТОП-ИСПОЛНИТЕЛИ ===== */
.talent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.talent-card { background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 22px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform .2s, border-color .2s, box-shadow .2s; color: var(--text); }
.talent-card:hover { box-shadow: var(--shadow-hover); color: var(--text); }
.talent-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); margin-bottom: 14px; transition: box-shadow .2s; }
.talent-name { font-size: 15.5px; font-weight: 700; color: var(--text); }
.talent-rating { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.talent-rating .stars { color: #d9a441; }
.talent-rating b { color: var(--text); }
.talent-skills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.talent-skill { background: var(--surface-2); border: 1px solid transparent; color: var(--muted); border-radius: 8px; padding: 3px 10px; font-size: 11.5px; }
.talent-meta { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ===== ГАЛЕРЕЯ РАБОТ ===== */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.work-card { display: block; background: var(--surface); border: 1px solid transparent; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s, box-shadow .2s; color: var(--text); }
.work-card:hover { box-shadow: var(--shadow-hover); color: var(--text); }
.work-thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; display: block; background: var(--surface-2); transition: transform .35s ease; }
.work-body { padding: 14px 16px; }
.work-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-author { font-size: 12px; color: var(--muted); }
.work-cat { display: inline-block; margin-top: 8px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 600; }

/* ===== КАТАЛОГ ФРИЛАНСЕРОВ ===== */
.freelancers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.freelancer-card { display: flex; gap: 16px; background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 18px; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s, box-shadow .2s; color: var(--text); }
.freelancer-card:hover { box-shadow: var(--shadow-hover); color: var(--text); }
.fl-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); }
.fl-body { flex: 1; min-width: 0; }
.fl-top { display: flex; align-items: center; gap: 10px; }
.fl-name { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); flex: none; }
.fl-rating .stars { color: #d9a441; }
.fl-rating b { color: var(--text); }
.fl-rating.fl-new { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.fl-bio { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fl-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fl-skill { background: var(--surface-2); border: 1px solid transparent; color: var(--muted); border-radius: 8px; padding: 3px 9px; font-size: 11.5px; }
.fl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fl-chip { background: var(--surface-2); border: 1px solid transparent; color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
.fl-chip.fl-chip-green { background: var(--green-soft); border-color: transparent; color: var(--c-green); }
.fl-chip.fl-muted { color: var(--muted); font-weight: 500; }
/* Сохраняем переносы строк и отступы в пользовательских текстах: описания, письма, сообщения.
   Без этого многострочный текст из textarea слипался в один абзац. */
.project-desc, .fl-bio, .pubp-bio, .quote-text, .feat-text, .role-app .f13, .mp-app .f13, .terms-section p, .post-content p { white-space: pre-wrap; }
textarea { white-space: pre-wrap; }

/* метка роли: заказчик / исполнитель / оба */
.role-badge { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; text-align: center; }

/* вкладки «Мои проекты» */
.mp-tabs { display: flex; gap: 8px; margin: 0 18px 14px; flex-wrap: wrap; }
.mp-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 13.5px; color: var(--text); margin: 0; box-shadow: none; }
.mp-tab:hover { border-color: var(--accent); color: var(--accent); }
.mp-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mp-tab.active .mp-count { background: rgba(255, 255, 255, .25); color: #fff; }
.mp-count { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; }
.mp-pane { display: none; }
.mp-pane.active { display: block; }
.mp-section { font-size: 16px; font-weight: 700; margin: 18px 18px 10px; color: var(--text); }
.mp-role { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.mp-app { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mp-app:last-child { border-bottom: none; }

/* конструктор состава команды в форме проекта */
.roles-builder { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.roles-builder:empty { display: none; }
.role-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.role-builder-form { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.role-builder-form .field { margin: 0; }

/* ===== КОМАНДА ПРОЕКТА: ДОЛЖНОСТИ ===== */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.role-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-soft); padding: 16px 18px; display: flex; flex-direction: column; }
.role-head { display: flex; align-items: center; gap: 10px; }
.role-title { font-size: 15.5px; font-weight: 700; color: var(--text); }
.role-members { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.role-member { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 12.5px; color: var(--text); }
.role-member:hover { background: var(--accent-soft); color: var(--accent); }
.role-member .avatar { width: 22px; height: 22px; border-radius: 50%; }
.role-apply-btn { width: 100%; margin-top: 12px; }
.role-apps { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.role-app { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.chat-group-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-group-members span { background: var(--tag-bg); color: var(--tag-color); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; }

/* карточка исполнителя с кнопкой действия под ней */
.freelancer-card-wrap { display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-soft); overflow: hidden; }
.freelancer-card-wrap:hover { box-shadow: var(--shadow-hover); }
.freelancer-card-wrap .freelancer-card { box-shadow: none; border-radius: 0; flex: 1; }
.fl-actions { padding: 0 18px 16px; }
.fl-actions button { width: 100%; margin: 0; }

/* ===== ЦВЕТОВЫЕ АКЦЕНТЫ (разнообразие: синий/зелёный/красный/…) ===== */
.section-eyebrow.eb-blue { color: var(--c-blue); }
.section-eyebrow.eb-sky { color: var(--c-sky); }
.section-eyebrow.eb-green { color: var(--c-green); }
.section-eyebrow.eb-red { color: var(--c-rose); }
.section-eyebrow.eb-violet { color: var(--c-violet); }
.section-eyebrow.eb-amber { color: var(--c-amber); }
.stat-num.n-blue { color: var(--c-blue); }
.stat-num.n-green { color: var(--c-green); }
.stat-num.n-amber { color: var(--c-amber); }
.stat-num.n-violet { color: var(--c-violet); }
.stat-num.n-red { color: var(--c-rose); }
.hero-btn-green { background: var(--c-green) !important; box-shadow: 0 6px 18px rgba(46, 139, 87, .3) !important; }
.audience-eyebrow.is-green { color: var(--c-green); }
.hot-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--red-soft); color: var(--c-rose); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }

/* ===== ПОЧЕМУ МЫ ===== */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feat-card { background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 24px 22px; box-shadow: var(--shadow-soft); transition: transform .2s, border-color .2s, box-shadow .2s; }
.feat-card:hover { box-shadow: var(--shadow-hover); }
.feat-ico { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; transition: transform .2s; }
.feat-title { font-size: 15.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feat-text { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ===== ОТЗЫВЫ / ДОВЕРИЕ ===== */
.quotes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.quote-card { background: var(--surface); border: 1px solid transparent; border-top: 3px solid color-mix(in srgb, var(--c-sky) 55%, transparent); border-radius: 12px; padding: 24px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 14px; }
.quotes-grid .quote-card:nth-child(3n+2) { border-top-color: color-mix(in srgb, var(--c-green) 55%, transparent); }
.quotes-grid .quote-card:nth-child(3n) { border-top-color: color-mix(in srgb, var(--c-amber) 60%, transparent); }
.quote-stars { color: #d9a441; font-size: 15px; letter-spacing: 2px; }
.quote-text { font-size: 14px; color: var(--text); line-height: 1.6; flex: 1; }
.quote-author { display: flex; align-items: center; gap: 12px; }
.quote-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.quote-name { font-size: 14px; font-weight: 700; color: var(--text); }
.quote-role { font-size: 12px; color: var(--muted); }

/* ===== ДВЕ АУДИТОРИИ (заказчик / исполнитель) ===== */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.audience-card { border-radius: 16px; padding: 32px; border: 1px solid transparent; background: var(--surface); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.audience-card:not(.is-client) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-green) 7%, var(--surface)), var(--surface) 65%); }
.audience-card.is-client { background: radial-gradient(120% 160% at 90% 10%, rgba(109, 178, 187, .22), transparent 55%), radial-gradient(80% 120% at 5% 95%, rgba(122, 95, 192, .2), transparent 55%), linear-gradient(135deg, var(--hero-bg1), var(--hero-bg2)); }
.audience-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 10px; }
.audience-card.is-client .audience-eyebrow { color: #a9c7dc; }
.audience-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin-bottom: 8px; }
.audience-card.is-client .audience-title { color: #fff; }
.audience-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.audience-card.is-client .audience-text { color: #b6c8da; }
.audience-list { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; }
.audience-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.audience-card.is-client .audience-list li { color: #e2e8f0; }
.audience-list svg { flex: none; margin-top: 2px; color: var(--accent); }
.audience-card.is-client .audience-list svg { color: #7db3bd; }
.audience-cta { margin-top: auto; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item { background: var(--surface); border: 1px solid transparent; border-radius: 14px; box-shadow: var(--shadow-soft); overflow: hidden; transition: border-color .2s; }
.faq-item[open] { background: var(--surface-2); }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; margin-top: -3px; }
.faq-item[open] summary { color: var(--accent); }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 3px; border-color: var(--accent); }
.faq-a { padding: 0 22px 18px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.faq-a a { color: var(--accent); }

/* ===== CTA-БАННЕР ===== */
.cta { margin: 48px 0 8px; padding: 48px; border-radius: 18px; background: radial-gradient(120% 160% at 90% 10%, rgba(109, 178, 187, .25), transparent 55%), radial-gradient(80% 120% at 10% 90%, rgba(122, 95, 192, .2), transparent 55%), linear-gradient(135deg, var(--hero-bg1), var(--hero-bg2)); text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(80% 130% at 50% 0%, #000 20%, transparent 80%); mask-image: radial-gradient(80% 130% at 50% 0%, #000 20%, transparent 80%); pointer-events: none; }
.cta-title { font-size: 27px; font-weight: 750; color: #fff; margin-bottom: 12px; letter-spacing: -.015em; }
.cta-sub { font-size: 15px; color: #b6c8da; margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== ПАНЕЛЬ ФИЛЬТРОВ ===== */
.filter-bar { background: var(--surface); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--shadow-soft); padding: 18px 20px; }
.filter-search input { padding-left: 40px !important; border-radius: 10px !important; }
.filter-search svg { color: var(--muted); }
.filter-controls select, .filter-controls input[type="number"] { border-radius: 10px !important; }
.filter-controls { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.filter-controls select, .filter-controls input[type="number"], .filter-controls .filter-reset { width: 100%; min-width: 0; height: 38px; margin: 0; font-size: 13px; padding-left: 5px; padding-right: 20px; }
.filter-reset { border: 1px solid var(--border-strong) !important; color: var(--muted) !important; border-radius: 10px; background: var(--surface) !important; }
.filter-reset:hover { border-color: var(--c-rose) !important; color: var(--c-rose) !important; }

/* ===== КАРТОЧКИ ПРОЕКТОВ ===== */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.projects-grid .project-desc { -webkit-line-clamp: 2; min-height: 0; }
.project { border: 1px solid transparent; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .2s, box-shadow .2s, border-color .2s; }
.project:hover { box-shadow: var(--shadow-hover); }
.project-status { border-radius: 999px; }
.status-new { background: color-mix(in srgb, var(--c-sky) 15%, transparent); color: var(--c-sky); }
.status-offered { background: color-mix(in srgb, var(--c-amber) 15%, transparent); color: var(--c-amber); }
.status-accepted { background: color-mix(in srgb, var(--c-green) 15%, transparent); color: var(--c-green); }
.status-done { background: color-mix(in srgb, var(--c-violet) 15%, transparent); color: var(--c-violet); }
.status-completed { background: color-mix(in srgb, var(--c-teal) 15%, transparent); color: var(--c-teal); }
.status-draft { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }
.status-closed { background: color-mix(in srgb, var(--c-rose) 15%, transparent); color: var(--c-rose); }
.project-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.project-skills-card { padding: 0 16px; margin-top: 10px; }
.project-skill { background: var(--tag-bg); color: var(--tag-color); border-radius: 8px; padding: 3px 9px; font-size: 11.5px; }
.project-price { color: var(--c-green); font-variant-numeric: tabular-nums; }
.project-days { background: var(--surface-2); color: var(--muted); border-radius: 999px; }
.project-desc { color: var(--muted); }
.project-footer { border-top: 1px solid var(--border); }
.project-author .avatar { box-shadow: 0 0 0 2px var(--border); }
.project-kind { background: color-mix(in srgb, var(--c-violet) 15%, transparent); color: var(--c-violet); }
.project-vac-meta { padding: 2px 16px 0; font-size: 12.5px; font-weight: 600; color: var(--c-violet); }

/* ===== ПУСТЫЕ СОСТОЯНИЯ ===== */
.empty-state { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 18px; }
.empty-ico { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* ===== БЛОГ ===== */
.blog-card { background: var(--surface); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--shadow-soft); }
.blog-card:hover { box-shadow: var(--shadow-hover); }
.blog-category { background: var(--accent-soft); color: var(--accent); }
.post-category { background: var(--accent-soft); color: var(--accent); }

/* ===== ПОДВАЛ ===== */
footer { background: var(--footer-bg); color: var(--footer-color); padding: 40px 56px; text-align: left; position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brand-grad); opacity: .45; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; max-width: 1200px; margin: 0 auto; }
.footer-brand h3 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--footer-muted); line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { display: block; font-size: 13px; color: var(--footer-color); padding: 5px 0; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { max-width: 1200px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: var(--footer-muted); text-align: center; }
.footer-subscribe { margin-top: 18px; max-width: 300px; }
.footer-subscribe-label { font-size: 12.5px; color: var(--footer-color); margin-bottom: 8px; }
.footer-subscribe form { display: flex; gap: 8px; }
.footer-subscribe input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; border-radius: 9px; padding: 8px 12px; font-size: 13px; }
.footer-subscribe input::placeholder { color: var(--footer-muted); }
.footer-subscribe button { flex: none; margin: 0; }
.footer-subscribe-hint { font-size: 11.5px; color: var(--footer-muted); margin-top: 6px; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { font-size: 13px; font-weight: 600; color: var(--footer-color); }
.footer-social a:hover { color: var(--accent-2); }

/* ===== ОБЩЕЕ ДЛЯ СТРАНИЦ ===== */
main > h1, main > h2 { color: var(--text); }
.page-header { border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.toolbar { display: flex; align-items: center; gap: 12px; margin: 18px; }
.toolbar h1 { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin: 0; }
.panel label { font-size: 13px; font-weight: 600; color: var(--text); }
.panel small, main > small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 18px; }
.cards-grid .project { margin: 0; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.projects .project { margin: 0; }
.review { border: 1px solid transparent; border-radius: 14px; background: var(--surface); }

/* пустое портфолио / иконки-фичи */
.empty-portfolio .empty-icon { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.feature-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 15px; }

/* плейсхолдеры портфолио */
.portfolio-public-placeholder, .portfolio-placeholder, .portfolio-item-placeholder, .related-placeholder { background: linear-gradient(135deg, var(--surface-2), var(--surface-3)) !important; color: var(--accent) !important; }

/* страница ошибки */
.error-icon { width: 88px; height: 88px; border-radius: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; background: var(--accent-soft); color: var(--accent); font-size: 40px; }
.error-title { color: var(--text); }
.error-desc { color: var(--muted); }

/* уведомления */
.notification-item { border-radius: 14px; border: 1px solid transparent; background: var(--surface); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-soft); }
.notification-item.unread { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.notification-type { background: var(--surface-2); border: 1px solid transparent; color: var(--muted); border-radius: 6px; padding: 2px 7px; font-size: 10px; }
.notification-controls { display: flex; gap: 6px; flex: none; }
/* аккуратные иконочные кнопки вместо серых прямоугольников */
.notification-controls .btn-icon { width: 32px; height: 32px; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); box-shadow: none; transition: color .15s, background .15s, border-color .15s; }
.notification-controls .btn-icon:hover { background: var(--surface-2); }
.notification-controls .btn-delete:hover { color: var(--c-rose); border-color: var(--c-rose); background: var(--red-soft); }
.notification-controls .btn-mark-read:hover { color: var(--c-green); border-color: var(--c-green); background: var(--green-soft); }

/* ===== СТРАНИЦЫ ВХОДА/РЕГИСТРАЦИИ ===== */
/* Инлайн-стиль страниц ставит main { margin: 0 !important } и ломает центрирование (max-width: 1200px прилипает влево). Снимаем ограничение ширины — панель центрируется флексом. */
body > main:has(> .center-items) { max-width: none; margin: 0 !important; }
/* body больше не height: 100%, поэтому h100 не растягивается — центрируем по высоте экрана через min-height */
.center-items.h100 { height: auto; min-height: calc(100vh - 72px); justify-content: center; }

/* ===== ФОРМЫ (создание/редактирование) ===== */
.form-page { max-width: 760px; margin: 24px auto; }
.form-panel { background: var(--panel-bg); border: 1px solid transparent; border-radius: 18px; box-shadow: var(--shadow-soft); padding: 0; overflow: hidden; }
.form-head { padding: 22px 28px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.form-head h1 { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.form-head p { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.form-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-hint { font-size: 12px; color: var(--muted); }
.field .red { font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.input-money { position: relative; }
.input-money input { padding-right: 34px; }
.input-money::after { content: '₽'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.upload-zone { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.upload-zone .upload-hint { font-size: 12px; color: var(--muted); }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.file-list:empty { display: none; }
.file-list span { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid transparent; color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 12px; position: relative; margin: 0; }
.form-foot { padding: 20px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); align-items: center; }

/* ===== ПРОФИЛЬ ===== */
.profile-hero { display: flex; align-items: center; gap: 22px; padding: 28px 32px; border-radius: 16px; margin: 18px; background: radial-gradient(120% 160% at 90% 10%, rgba(109, 178, 187, .18), transparent 55%), radial-gradient(70% 120% at 0% 100%, rgba(122, 95, 192, .16), transparent 55%), linear-gradient(135deg, var(--hero-bg1), var(--hero-bg2)); position: relative; overflow: hidden; }
.profile-hero .pf-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .2); box-shadow: var(--shadow-hover); flex: none; }
.pf-name { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.pf-meta { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #e2e8f0; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.pf-chip.rating { color: #e6d29b; }
.pf-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pf-skill { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #cfe3f5; border-radius: 8px; padding: 3px 10px; font-size: 12px; }
.profile-progress { margin: 0 18px 18px; background: var(--panel-bg); border: 1px solid transparent; border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-soft); }
.progress-track { background: var(--surface-2); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s ease; }
.achv-list { display: flex; flex-wrap: wrap; gap: 10px; }
.achv-chip { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; }
.achv-ico { font-size: 22px; line-height: 1; }
.achv-title { font-size: 13px; font-weight: 700; color: var(--text); }
.achv-exp { font-size: 11px; color: var(--muted); }
/* ===== ДАШБОРД ПРОФИЛЯ ===== */
.profile-hero .pf-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pf-hero-btn { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff !important; border-radius: 9px; padding: 8px 16px; font-size: 13px; font-weight: 600; display: inline-block; transition: background .15s; }
.pf-hero-btn:hover { background: rgba(255, 255, 255, .22); color: #fff !important; }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 18px 0; }
.pf-dash { display: grid; grid-template-columns: 1fr 340px; gap: 18px; margin: 18px; align-items: start; }
.pf-dash .panel { margin: 0; }
.pf-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pf-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pf-card-head h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.pf-card-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.pf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pf-form-grid .full { grid-column: 1 / -1; }
.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.pf-field input, .pf-field textarea { width: 100%; }
.pf-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pf-links { display: flex; flex-direction: column; gap: 8px; }
.pf-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13.5px; transition: border-color .15s, background .15s, color .15s; }
.pf-link:hover { color: var(--accent); background: var(--accent-soft); }
.pf-link-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.pf-arrow { margin-left: auto; color: var(--muted); }
.pf-avatar-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pf-avatar-box img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface-2); }
.pf-password { display: flex; flex-direction: column; gap: 10px; }
.pf-password input { width: 100%; }

/* ===== АДМИН-ПРОФИЛЬ (боковое меню) ===== */
.pf-admin { display: grid; grid-template-columns: 268px 1fr; gap: 18px; margin: 18px; align-items: start; }
.pf-side { position: sticky; top: 76px; background: var(--surface); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--shadow-soft); overflow: hidden; }
.pf-side-head { padding: 14px 16px; text-align: center; background: radial-gradient(120% 160% at 80% 0%, rgba(109, 178, 187, .18), transparent 55%), linear-gradient(135deg, var(--hero-bg1), var(--hero-bg2)); }
.pf-side-head img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-soft); }
.pf-side-name { font-size: 14px; font-weight: 700; color: #fff; margin-top: 7px; }
.pf-side-sub { font-size: 11.5px; color: #b6c8da; margin-top: 2px; }
.pf-nav { padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.pf-nav-cap { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 3px; }
.pf-nav-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; border: none; background: transparent; width: 100%; text-align: left; justify-content: flex-start; transition: background .15s, color .15s; }
.pf-nav-item svg { flex: none; width: 16px; height: 16px; color: var(--muted); transition: color .15s; }
.pf-nav-item:hover, .pf-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.pf-nav-item:hover svg, .pf-nav-item.active svg { color: var(--accent); }
.pf-nav-item .pf-arrow { margin-left: auto; font-size: 12px; }
.pf-nav-sep { height: 1px; background: var(--border); margin: 6px 6px; }
.pf-content { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pf-content .panel { margin: 0; }
.pf-pane { display: none; }
.pf-pane.active { display: flex; flex-direction: column; gap: 18px; }
.pf-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.pf-summary .pf-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.pf-summary .pf-sum-row span { color: var(--muted); }
.pf-summary .pf-sum-row b { color: var(--text); }

/* ===== ПУБЛИЧНЫЙ ПРОФИЛЬ (две колонки сверху) ===== */
.pubp-top { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin: 18px; align-items: stretch; }
.pubp-card { background: var(--surface); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--shadow-soft); padding: 24px; }
.pubp-id { display: flex; gap: 18px; align-items: center; }
.pubp-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface-2); flex: none; }
.pubp-name { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.pubp-rating { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.pubp-rating .stars { color: #d9a441; letter-spacing: 1px; }
.pubp-rating b { color: var(--text); }
.pubp-since { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pubp-bio { margin-top: 16px; color: var(--text); line-height: 1.6; font-size: 14px; }
.pubp-skills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.pubp-skill { background: var(--surface-2); border: 1px solid transparent; color: var(--muted); border-radius: 8px; padding: 4px 11px; font-size: 12.5px; }
.pubp-side { display: flex; flex-direction: column; gap: 14px; }
.pubp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pubp-stat { background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 14px; text-align: center; }
.pubp-stat-num { font-size: 22px; font-weight: 800; line-height: 1; }
.pubp-stat-label { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.pubp-cta { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.pubp-cta .hero-btn-primary { text-align: center; }
.pubp-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pubp-link { font-size: 12.5px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 5px 11px; }

/* список отзывов компактный: меньше воздуха, тонкий разделитель вместо карточек */
.review-card { background: var(--surface); border: 1px solid transparent; border-bottom: 1px solid var(--border); border-radius: 0; padding: 10px 2px; margin: 0; box-shadow: none; }
.review-card:last-child { border-bottom: 0; }
.review-card:hover { box-shadow: none; background: var(--tag-bg); border-radius: 8px; }
.review-card .m10, .review-card .m5 { margin: 3px 0; }
.review-card .rich-text, .review-card p { line-height: 1.45; }
.review-stars { color: #d9a441; letter-spacing: 1px; font-size: 13px; }
.review-card .avatar { width: 28px; height: 28px; border-radius: 50%; }
.review { border: 1px solid transparent; border-radius: 12px; background: var(--surface); padding: 10px 2px; }

/* ===== ТЕГИ НАВЫКОВ В ДУХЕ STEAM (полупрозрачно-голубые плашки) ===== */
.talent-skill, .fl-skill, .pubp-skill, .tech-item, .tech-tag, .tech-public-tag { background: var(--tag-bg); border-color: transparent; color: var(--tag-color); }

/* ===== ТЕКСТ С ФОРМАТИРОВАНИЕМ ===== */
/* панель инструментов не показываем — форматирование приходит из буфера обмена */
trix-toolbar { display: none; }
.rich-editor { min-height: 150px; max-height: 420px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--input-bg); color: var(--text); font-size: 14px; line-height: 1.6; }
.rich-editor:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rich-editor:empty::before { content: attr(placeholder); color: var(--text-muted); }

/* вывод сохранённой разметки: списки и заголовки не должны ломать сетку блоков */
.rich-text { display: block; line-height: 1.65; overflow-wrap: anywhere; }
.rich-text > *:first-child { margin-top: 0; }
.rich-text > *:last-child { margin-bottom: 0; }
.rich-text p { margin: 0 0 10px; }
.rich-text ul, .rich-text ol { margin: 0 0 10px; padding-left: 22px; }
.rich-text li { margin-bottom: 4px; }
.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4 { margin: 14px 0 8px; font-size: 16px; font-weight: 650; line-height: 1.35; }
.rich-text a { color: var(--accent); text-decoration: underline; }
.rich-text blockquote { margin: 10px 0; padding: 6px 14px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.rich-text pre { margin: 10px 0; padding: 12px 14px; border-radius: 9px; background: var(--tag-bg); overflow-x: auto; font-size: 13px; }
.rich-text code { padding: 1px 5px; border-radius: 5px; background: var(--tag-bg); font-size: 13px; }
.rich-text img { max-width: 100%; border-radius: 9px; }

/* поле ввода с форматированием в чате */
.chat-input { min-height: 40px; max-height: 140px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--input-bg); color: var(--text); font-size: 14px; line-height: 1.5; text-align: left; }
.chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-input:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-input ul, .chat-input ol { margin: 4px 0; padding-left: 20px; }

/* подсказка под полем ввода */
.field-hint { margin-top: 6px; font-size: 12px; color: var(--text-muted); }

/* ===== ИКОНКИ ===== */
/* контурные SVG вместо эмодзи: наследуют цвет темы и не зависят от шрифта системы */
.ico { width: 15px; height: 15px; flex: none; vertical-align: -2px; }
.badge-ico { width: 22px; height: 22px; display: block; }
.achv-ico .badge-ico { width: 18px; height: 18px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; padding: 0; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--tag-bg); color: var(--accent); border-color: transparent; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn-send { background: var(--accent); color: #fff; }
.icon-btn-send:hover { background: var(--link-hover); color: #fff; }

/* отклик на проект: шапка со сведениями об исполнителе, письмо и действия */
.talk-card { padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.talk-row { display: flex; align-items: center; gap: 12px; }
.talk-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; }
.talk-body { flex: 1; min-width: 0; }
.talk-name { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-note { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.talk-terms { flex: none; text-align: right; line-height: 1.3; }
.talk-letter { margin-top: 9px; font-size: 13.5px; }
.talk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* окно с письмом (отклик, приглашение) */
.letter-panel { max-width: 560px; margin: 5% auto; }
.letter-editor { min-height: 110px; max-height: 240px; }
.letter-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* окно выбора из списка (проект, должность) */
.pick-panel { max-width: 460px; margin: 8% auto; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.pick-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 14px; text-align: left; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 600; }
.pick-item:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* блок подписки в кошельке */
.sub-panel .pf-card-head { flex-wrap: wrap; }
.sub-limits { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 12px; text-align: center; }
.sub-limit { flex: 1; }
.sub-limit b { font-size: 18px; }
.sub-limit .green { margin-left: 6px; }

/* страница «не найдено» */
.notfound { padding: 48px 20px; }
.notfound-code { font-size: 54px; font-weight: 800; line-height: 1; color: var(--accent); opacity: .35; margin-bottom: 10px; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* колокольчик и переключатель темы стоят рядом одной группой */
.header-tools { display: flex !important; align-items: center; gap: 6px; }
.header-tools .theme-switch-wrapper { display: flex; align-items: center; gap: 5px; }

/* уведомление о смене статуса проекта, когда перезагрузка помешала бы вводу */
.status-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2000; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-hover); cursor: pointer; }

/* ===== АДАПТИВ ===== */
/* шапка не должна вылезать за пределы страницы на промежуточных ширинах */
@media screen and (max-width: 1250px) {
  header { padding: 0 14px; }
  header nav li a { padding: 8px 8px; font-size: 12.5px; }
  header > nav > ul { gap: 0; }
}
/* до 980px шапка обязана оставаться одной строкой: ужимаем отступы и прячем подписи */
@media screen and (max-width: 1080px) and (min-width: 981px) {
  header { padding: 0 8px; }
  header nav li a { padding: 7px 6px; font-size: 12px; }
  header .flex-mobile span, header .avatar + text { display: none; }
}
@media screen and (max-width: 980px) and (min-width: 481px) {
  header { height: auto; min-height: 46px; flex-wrap: wrap; padding: 4px 10px; }
  header.shrink { height: auto; }
  header > nav > ul { flex-wrap: wrap; }
}
@media screen and (max-width: 900px) {
  .filter-controls { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 480px) {
  .filter-controls { grid-template-columns: repeat(2, 1fr); }
}
/* кнопка вызова меню профиля — только на мобильных */
.pf-menu-toggle { display: none; align-items: center; gap: 10px; width: calc(100% - 36px); margin: 18px 18px 0; padding: 12px 16px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-soft); }

@media screen and (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; text-align: center; }
  .pf-meta, .pf-skills { justify-content: center; }
  .hero { grid-template-columns: 1fr; padding: 40px 28px; gap: 28px; }
  .hero-title { font-size: 34px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .pf-stats { grid-template-columns: repeat(2, 1fr); }
  .pf-dash { grid-template-columns: 1fr; }
  .pubp-top { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* меню разделов профиля превращается во всплывающую панель */
  .pf-menu-toggle { display: flex; }
  .pf-admin { grid-template-columns: 1fr; }
  .pf-side { position: fixed; left: 12px; right: 12px; top: 72px; z-index: 1400; max-height: 76vh; overflow-y: auto; display: none; box-shadow: var(--shadow-hover); }
  .pf-side.open { display: block; }
  /* на мобильных шапка и пункты выровнены по левому краю — так меню читается как список */
  .pf-side-head { padding: 12px 14px; text-align: left; display: flex; align-items: center; gap: 12px; }
  .pf-side-head img { width: 44px; height: 44px; margin: 0; }
  .pf-side-name { margin-top: 0; }
  .pf-nav { flex-direction: column; }
  .pf-nav-item { width: 100%; justify-content: flex-start; text-align: left; }
  .pf-nav-cap { text-align: left; }

  /* Единая сетка на мобильных: main задаёт поля, внутренние блоки их не дублируют.
     Раньше у панелей были собственные margin, поэтому блоки не совпадали по ширине. */
  main { padding: 12px !important; overflow-x: hidden; }
  main > *, .section > * { max-width: 100%; }
  .cards-grid, .projects-grid, .cats-grid, .talent-grid, .work-grid, .freelancers-grid, .quotes-grid, .steps-grid, .feat-grid, .roles-grid { grid-template-columns: 1fr; margin-left: 0 !important; margin-right: 0 !important; }
  .panel, .form-page, .empty-state, .toolbar, .mp-tabs, .mp-section, .pf-stats, .pf-dash, .pf-admin, .pubp-top, .profile-progress, .pf-menu-toggle, .projects, .filter-bar, .section, .stats-row, .hero, .cta { margin-left: 0 !important; margin-right: 0 !important; width: auto !important; }
  .project { margin: 0 0 12px !important; }
  .pf-menu-toggle { width: 100%; }
  /* кнопки одинаковой высоты и не «лесенкой» */
  .btn, button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
  .project-actions, .pf-form-actions, .cta-actions, .hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .project-actions > *, .pf-form-actions > * { margin: 0; }
  .toolbar { flex-wrap: wrap; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-title { font-size: 21px; }
  .freelancer-card { flex-direction: column; }
  .fl-top { flex-wrap: wrap; }
  .pubp-id { flex-direction: column; text-align: center; }
  .pubp-skills, .pubp-links { justify-content: center; }
  /* таблицы не ломают вёрстку, а прокручиваются */
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .panel { margin: 12px; padding: 16px; }
  .form-page { margin: 12px; }
  .form-head, .form-body, .form-foot { padding-left: 16px; padding-right: 16px; }
  .form-foot { display: block; }
}

@media screen and (max-width: 480px) {
  main { padding: 16px; }
  header { padding: 0 16px; }
  .hero { padding: 32px 20px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 14px; }
  .hero-search { flex-wrap: wrap; }
  .hero-search-btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions a, .cta-actions a { text-align: center; }
  .hero-deal { padding: 18px; }
  .hero-perks { grid-template-columns: 1fr; }
  .stats-row, .pf-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-item { padding: 16px; }
  .stat-num { font-size: 24px; }
  .cta { padding: 32px 20px; }
  .cta-title { font-size: 22px; }
  .cta-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  footer { padding: 28px 20px; }
  .footer-subscribe { max-width: none; }
  .footer-subscribe form { flex-direction: column; }
  .footer-subscribe button { width: 100%; }
  .toolbar { margin: 12px; gap: 8px; display: block; }
  .toolbar h1 { font-size: 19px; }
  .project-header, .project-footer { flex-wrap: wrap; gap: 8px; }
  .project-actions { width: 100%; }
  /* кнопки в карточке проекта — одинаковой высоты, текст в одну строку */
  .project-actions .btn, .project-actions button { flex: 1 1 calc(50% - 4px); min-width: 0; white-space: nowrap; font-size: 12.5px; padding: 8px 10px; }
  .pf-menu-toggle { width: calc(100% - 24px); margin: 12px 12px 0; }
  .pf-side { top: 64px; }
  .notification-item { flex-wrap: wrap; }
  .notification-controls { width: 100%; justify-content: flex-end; margin-top: -43px; }
  .review-card .flex, .quote-author { flex-wrap: wrap; }
  /* окна отклика и выбора занимают экран целиком: на мобиле центрированная панель не помещалась */
  .letter-panel, .pick-panel { max-width: none; margin: 0; min-height: 100vh; border-radius: 0; padding: 16px; }
  .letter-editor { min-height: 92px; max-height: 40vh; }
  .letter-actions button { flex: 1 1 100%; }
  .talk-row { flex-wrap: wrap; }
  .talk-terms { text-align: left; }
  .notfound-code { font-size: 42px; }
  .pf-summary { display: block; }
  .pf-field, .pf-form-grid { display: block; }
}
