/* =========================================================
   TFD MARKET — THE FREE DRIVE | MTA PROVINCE
   Общий стиль всех страниц
   ========================================================= */

:root {
    --bg: #090909;
    --bg-soft: #0d0d0d;
    --surface: #111111;
    --surface-2: #151515;
    --surface-3: #191919;
    --border: #262626;
    --border-light: #333333;

    --text: #f2f2f2;
    --text-soft: #c2c2c2;
    --text-muted: #858585;
    --text-dark: #5f5f5f;

    --accent: #f4a261;
    --accent-light: #ffbc82;
    --accent-dark: #d87932;
    --accent-soft: rgba(244, 162, 97, .11);
    --accent-border: rgba(244, 162, 97, .25);

    --success: #79d69d;
    --success-soft: rgba(121, 214, 157, .1);
    --danger: #e87878;
    --danger-soft: rgba(232, 120, 120, .1);

    --shadow-sm: 0 6px 18px rgba(0,0,0,.18);
    --shadow-md: 0 14px 36px rgba(0,0,0,.28);
    --shadow-lg: 0 26px 70px rgba(0,0,0,.42);

    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 21px;
    --radius-xl: 28px;
    --container: 1380px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(244,162,97,.035), transparent 30%),
        radial-gradient(circle at 88% 25%, rgba(244,162,97,.02), transparent 25%),
        var(--bg);
    line-height: 1.5;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #101010; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 76px;
    border-bottom: 1px solid rgba(244,162,97,.16);
    background: rgba(9,9,9,.93);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.header-inner {
    width: min(var(--container), calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo { display: inline-flex; flex-direction: column; line-height: 1; flex-shrink: 0; }
.logo-main {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.7px;
    background: linear-gradient(135deg,#fff,var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo-sub {
    margin-top: 5px;
    color: var(--text-dark);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}
.nav { display: flex; align-items: center; gap: 5px; }
.nav a {
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--text-soft);
    font-size: .85rem;
    font-weight: 500;
    transition: .2s ease;
}
.nav a:hover { background: rgba(255,255,255,.03); color: #fff; }
.nav a.active { background: var(--accent-soft); color: var(--accent-light); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #101010;
    color: #aaa;
    cursor: pointer;
    transition: .2s ease;
}
.icon-btn:hover { border-color: var(--accent-border); color: var(--accent-light); background: var(--accent-soft); }
.icon-btn .counter {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--accent);
    color: #111;
    font-size: .6rem;
    font-weight: 800;
}
.user-button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 9px 5px 5px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #101010;
    color: #fff;
    cursor: pointer;
    transition: .2s ease;
}
.user-button:hover { border-color: var(--accent-border); }
.user-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    background: #1b1b1b;
    color: var(--accent-light);
    font-size: .7rem;
    font-weight: 800;
}
.user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .77rem; font-weight: 600; }
.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #101010;
    color: #fff;
    cursor: pointer;
}
.mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 998;
    display: none;
    padding: 10px 20px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,.98);
    backdrop-filter: blur(18px);
}
.mobile-menu.active { display: block; }
.mobile-menu a { display: block; padding: 13px; border-radius: 11px; color: #bbb; }
.mobile-menu a.active, .mobile-menu a:hover { background: var(--accent-soft); color: var(--accent-light); }

/* =========================================================
   COMMON PAGE
   ========================================================= */
.page { min-height: calc(100vh - 76px); padding: 44px 0 84px; }
.page-head { margin-bottom: 30px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-light);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.page-title {
    margin-top: 13px;
    color: #fff;
    font-size: clamp(2rem,5vw,3.7rem);
    line-height: 1.02;
    letter-spacing: -2px;
}
.page-description { max-width: 720px; margin-top: 12px; color: var(--text-muted); font-size: .92rem; line-height: 1.7; }
.section-title { color: #fff; font-size: 1.35rem; font-weight: 750; letter-spacing: -.6px; }
.section-note { margin-top: 5px; color: #727272; font-size: .78rem; }

/* =========================================================
   HERO / HOME
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 64px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at 10% 20%, rgba(244,162,97,.09), transparent 26%),
        radial-gradient(circle at 90% 10%, rgba(244,162,97,.05), transparent 22%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -80px;
    height: 180px;
    background: radial-gradient(circle, rgba(244,162,97,.06), transparent 65%);
    filter: blur(20px);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    max-width: 800px;
    color: #fff;
    font-size: clamp(3rem,8vw,6.7rem);
    line-height: .9;
    letter-spacing: -5px;
    font-weight: 800;
}
.hero h1 span {
    background: linear-gradient(135deg,#fff,var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { max-width: 680px; margin-top: 22px; color: #999; font-size: 1rem; line-height: 1.75; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-search { max-width: 900px; margin-top: 32px; }

/* =========================================================
   SEARCH
   ========================================================= */
.search-box {
    display: flex;
    align-items: stretch;
    padding: 6px;
    border: 1px solid #2b2b2b;
    border-radius: 18px;
    background: rgba(17,17,17,.92);
    box-shadow: var(--shadow-md);
    transition: .2s ease;
}
.search-box:focus-within { border-color: var(--accent-border); box-shadow: 0 0 0 4px rgba(244,162,97,.04), var(--shadow-md); }
.search-icon { width: 52px; display: flex; align-items: center; justify-content: center; color: #676767; }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: .94rem; }
.search-input::placeholder { color: #606060; }
.search-button { min-width: 122px; padding: 0 20px; border-radius: 12px; background: linear-gradient(135deg,var(--accent-light),var(--accent)); color: #111; font-weight: 800; cursor: pointer; transition: .2s ease; }
.search-button:hover { box-shadow: 0 9px 24px rgba(244,162,97,.14); transform: translateY(-1px); }

/* =========================================================
   CATEGORIES
   ========================================================= */
.categories { padding: 30px 0 10px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 12px; margin-top: 18px; }
.category-card {
    position: relative;
    min-height: 130px;
    padding: 17px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: linear-gradient(145deg,#141414,#0e0e0e);
    transition: .22s ease;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.category-icon { width: 40px; height: 40px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(244,162,97,.18); border-radius:11px; background:var(--accent-soft); color:var(--accent-light); font-size:1.05rem; }
.category-title { margin-top: 15px; color:#fff; font-size:.9rem; font-weight:700; }
.category-count { margin-top: 3px; color:#646464; font-size:.7rem; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: .8rem;
    font-weight: 750;
    cursor: pointer;
    transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg,var(--accent-light),var(--accent)); color:#121212; }
.btn-primary:hover { box-shadow: 0 9px 26px rgba(244,162,97,.15); }
.btn-secondary { border: 1px solid var(--border); background:#151515; color:#eee; }
.btn-secondary:hover { border-color:#3b3b3b; }
.btn-outline { border:1px solid var(--accent-border); background:transparent; color:var(--accent-light); }
.btn-outline:hover { background:var(--accent-soft); }
.btn-danger { border:1px solid rgba(232,120,120,.22); background:var(--danger-soft); color:var(--danger); }
.btn-wide { width: 100%; }

/* =========================================================
   LISTINGS / CARDS
   ========================================================= */
.market-layout { display:grid; grid-template-columns: 255px minmax(0,1fr); gap:24px; align-items:start; }
.filters { position:sticky; top:96px; padding:18px; border:1px solid var(--border); border-radius:17px; background:#101010; }
.filters-title { margin-bottom:15px; color:#fff; font-size:.9rem; font-weight:750; }
.filter-group { padding:15px 0; border-top:1px solid var(--border); }
.filter-group:first-of-type { padding-top:0; border-top:0; }
.filter-label { display:block; margin-bottom:9px; color:#d7d7d7; font-size:.75rem; font-weight:700; }
.filter-options { display:flex; flex-direction:column; gap:8px; }
.check-row { display:flex; align-items:center; gap:8px; color:#8a8a8a; font-size:.76rem; cursor:pointer; }
.check-row:hover { color:#ddd; }
.check-row input { accent-color:var(--accent); }
.price-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.input, .textarea, .select-input {
    width:100%;
    border:1px solid var(--border);
    border-radius:10px;
    outline:0;
    background:#0d0d0d;
    color:#fff;
    transition:.2s ease;
}
.input, .select-input { height:43px; padding:0 11px; font-size:.79rem; }
.textarea { min-height:130px; padding:11px; resize:vertical; font-size:.8rem; }
.input:focus, .textarea:focus, .select-input:focus { border-color:rgba(244,162,97,.35); box-shadow:0 0 0 3px rgba(244,162,97,.04); }
.input::placeholder, .textarea::placeholder { color:#5d5d5d; }
.select-input { appearance:none; }
.market-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:18px; }
.result-count { color:#747474; font-size:.75rem; }
.result-count strong { color:#fff; }
.toolbar-right { display:flex; align-items:center; gap:7px; }
.sort-select { min-width:170px; }
.view-toggle { display:flex; gap:4px; padding:4px; border:1px solid var(--border); border-radius:10px; background:#101010; }
.view-toggle button { width:33px; height:31px; border-radius:7px; background:transparent; color:#676767; cursor:pointer; }
.view-toggle button.active { background:var(--accent-soft); color:var(--accent-light); }

.listings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.listing-card { overflow:hidden; border:1px solid var(--border); border-radius:17px; background:#111; transition:.22s ease; }
.listing-card:hover { transform:translateY(-4px); border-color:rgba(244,162,97,.32); box-shadow:var(--shadow-md); }
.listing-image { position:relative; aspect-ratio:16/10; overflow:hidden; background:linear-gradient(135deg,#171717,#0e0e0e); }
.listing-image img { width:100%; height:100%; object-fit:cover; transition:.4s ease; }
.listing-card:hover .listing-image img { transform:scale(1.035); }
.listing-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#4a4a4a; font-size:1.7rem; }
.listing-badges { position:absolute; top:10px; left:10px; display:flex; flex-wrap:wrap; gap:5px; }
.badge { min-height:24px; display:inline-flex; align-items:center; padding:0 8px; border-radius:999px; background:rgba(0,0,0,.73); backdrop-filter:blur(8px); color:#ddd; font-size:.62rem; font-weight:750; }
.badge-accent { border:1px solid rgba(244,162,97,.2); background:rgba(244,162,97,.12); color:var(--accent-light); }
.favorite-btn { position:absolute; top:10px; right:10px; width:35px; height:35px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:rgba(0,0,0,.68); color:#8d8d8d; cursor:pointer; transition:.2s ease; }
.favorite-btn:hover, .favorite-btn.active { border-color:rgba(244,162,97,.26); color:var(--accent-light); background:rgba(244,162,97,.11); }
.listing-body { padding:14px; }
.listing-title { min-height:42px; color:#fff; font-size:.93rem; font-weight:700; line-height:1.4; }
.listing-price { margin-top:7px; color:var(--accent-light); font-size:1.06rem; font-weight:800; }
.listing-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.meta { color:#666; font-size:.68rem; }
.meta strong { color:#aaa; font-weight:600; }
.listing-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:13px; padding-top:11px; border-top:1px solid #202020; }
.seller-mini { display:flex; align-items:center; gap:7px; min-width:0; }
.seller-avatar { width:27px; height:27px; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; border-radius:8px; background:#1b1b1b; color:var(--accent-light); font-size:.6rem; font-weight:800; }
.seller-name { max-width:105px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#919191; font-size:.66rem; }
.listing-views { color:#626262; font-size:.64rem; }

.listings-grid.list-view { grid-template-columns:1fr; }
.listings-grid.list-view .listing-card { display:grid; grid-template-columns:235px minmax(0,1fr); }
.listings-grid.list-view .listing-image { height:100%; min-height:180px; aspect-ratio:16/10; }
.listings-grid.list-view .listing-body { display:flex; flex-direction:column; justify-content:center; }
.listings-grid.list-view .listing-footer { margin-top:auto; }

.empty-state { padding:64px 22px; border:1px dashed #303030; border-radius:17px; background:#0e0e0e; text-align:center; }
.empty-icon { width:55px; height:55px; display:flex; align-items:center; justify-content:center; margin:0 auto 14px; border-radius:15px; background:#171717; color:#5d5d5d; font-size:1.3rem; }
.empty-state h3 { color:#fff; font-size:1rem; }
.empty-state p { max-width:430px; margin:7px auto 0; color:#717171; font-size:.78rem; line-height:1.65; }

.pagination { display:flex; justify-content:center; gap:6px; margin-top:28px; }
.pagination button { width:37px; height:37px; border:1px solid var(--border); border-radius:9px; background:#101010; color:#777; cursor:pointer; }
.pagination button:hover { border-color:var(--accent-border); color:#fff; }
.pagination button.active { border-color:transparent; background:var(--accent); color:#111; font-weight:800; }

/* =========================================================
   HOME BLOCKS
   ========================================================= */
.feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin-top:22px; }
.feature-card { padding:22px; border:1px solid var(--border); border-radius:18px; background:#111; }
.feature-number { color:var(--accent-light); font-size:.68rem; font-weight:800; letter-spacing:1px; }
.feature-card h3 { margin-top:12px; color:#fff; font-size:1rem; }
.feature-card p { margin-top:8px; color:#777; font-size:.78rem; line-height:1.65; }
.home-section { padding-top:46px; }
.home-section-head { display:flex; align-items:end; justify-content:space-between; gap:15px; }
.section-link { color:var(--accent-light); font-size:.75rem; font-weight:700; }

/* =========================================================
   DETAIL PAGE
   ========================================================= */
.detail-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(340px,.75fr); gap:22px; align-items:start; }
.gallery-panel, .detail-panel, .info-card, .form-card, .profile-card { border:1px solid var(--border); border-radius:20px; background:#111; }
.gallery-panel { overflow:hidden; }
.detail-main-image { aspect-ratio:16/10; overflow:hidden; background:#151515; }
.detail-main-image img { width:100%; height:100%; object-fit:cover; }
.thumbs { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; padding:9px; border-top:1px solid var(--border); }
.thumb { aspect-ratio:1/.7; overflow:hidden; border:1px solid transparent; border-radius:8px; background:#171717; cursor:pointer; opacity:.6; }
.thumb.active, .thumb:hover { opacity:1; border-color:var(--accent); }
.thumb img { width:100%; height:100%; object-fit:cover; }
.detail-panel { position:sticky; top:96px; padding:21px; }
.detail-server { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--accent-soft); color:var(--accent-light); font-size:.64rem; font-weight:800; }
.detail-title { margin-top:13px; color:#fff; font-size:clamp(1.6rem,3vw,2.35rem); line-height:1.1; letter-spacing:-1.2px; }
.detail-price { margin-top:12px; color:var(--accent-light); font-size:1.75rem; font-weight:800; }
.detail-line { height:1px; margin:19px 0; background:var(--border); }
.detail-description { color:#9c9c9c; font-size:.82rem; line-height:1.75; white-space:pre-line; }
.detail-stats { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:17px; }
.stat-box { padding:10px; border:1px solid #202020; border-radius:10px; background:#0d0d0d; }
.stat-label { color:#5e5e5e; font-size:.63rem; }
.stat-value { margin-top:3px; color:#ddd; font-size:.75rem; font-weight:650; }
.seller-box { display:flex; align-items:center; gap:10px; margin-top:18px; padding:12px; border:1px solid #222; border-radius:13px; background:#0d0d0d; }
.seller-box-avatar { width:40px; height:40px; display:flex; align-items:center; justify-content:center; border-radius:11px; background:#1b1b1b; color:var(--accent-light); font-weight:800; font-size:.72rem; }
.seller-box strong { display:block; color:#fff; font-size:.78rem; }
.seller-box span { display:block; margin-top:2px; color:#666; font-size:.65rem; }
.detail-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }

/* =========================================================
   FORMS / CREATE
   ========================================================= */
.form-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; align-items:start; }
.form-card { padding:22px; }
.form-section + .form-section { margin-top:24px; padding-top:22px; border-top:1px solid var(--border); }
.form-section-title { color:#fff; font-size:.97rem; font-weight:750; }
.form-section-note { margin-top:4px; color:#686868; font-size:.72rem; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:17px; }
.field-full { grid-column:1/-1; }
.field label { display:block; margin-bottom:7px; color:#cfcfcf; font-size:.73rem; font-weight:650; }
.field label span { color:#656565; font-weight:500; }
.input-file { width:100%; padding:10px; border:1px dashed #313131; border-radius:11px; background:#0d0d0d; color:#777; font-size:.76rem; cursor:pointer; }
.input-file:hover { border-color:var(--accent-border); }
.image-preview-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px; }
.preview-box { position:relative; aspect-ratio:1/.72; overflow:hidden; border:1px solid var(--border); border-radius:9px; background:#151515; }
.preview-box img { width:100%; height:100%; object-fit:cover; }
.preview-remove { position:absolute; top:5px; right:5px; width:23px; height:23px; border-radius:7px; background:rgba(0,0,0,.75); color:#ddd; cursor:pointer; }
.form-footer { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; padding-top:18px; border-top:1px solid var(--border); }
.side-note { padding:18px; border:1px solid var(--border); border-radius:17px; background:#101010; }
.side-note h3 { color:#fff; font-size:.9rem; }
.side-note p { margin-top:8px; color:#747474; font-size:.74rem; line-height:1.7; }
.side-list { margin-top:13px; display:flex; flex-direction:column; gap:8px; }
.side-list li { padding:9px 10px; border-radius:10px; background:#161616; color:#888; font-size:.71rem; }
.side-list li strong { color:#ccc; }

/* =========================================================
   PROFILE / FAVORITES / INFO
   ========================================================= */
.profile-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:20px; align-items:start; }
.profile-card { padding:22px; }
.profile-head { text-align:center; }
.profile-big-avatar { width:82px; height:82px; margin:0 auto; display:flex; align-items:center; justify-content:center; border-radius:22px; background:#1a1a1a; color:var(--accent-light); font-size:1.5rem; font-weight:800; }
.profile-name { margin-top:12px; color:#fff; font-size:1.1rem; font-weight:800; }
.profile-meta { margin-top:3px; color:#676767; font-size:.7rem; }
.profile-bio { margin-top:15px; padding-top:14px; border-top:1px solid var(--border); color:#7d7d7d; font-size:.74rem; line-height:1.65; }
.profile-nav { margin-top:18px; display:flex; flex-direction:column; gap:5px; }
.profile-nav a { padding:10px 11px; border-radius:9px; color:#888; font-size:.75rem; }
.profile-nav a:hover, .profile-nav a.active { background:var(--accent-soft); color:var(--accent-light); }
.stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.info-card { padding:17px; }
.info-value { color:#fff; font-size:1rem; font-weight:800; }
.info-label { margin-top:3px; color:#646464; font-size:.66rem; }
.content-card { margin-top:14px; padding:19px; border:1px solid var(--border); border-radius:17px; background:#111; }
.content-card h2 { color:#fff; font-size:1rem; }
.content-card p { margin-top:9px; color:#777; font-size:.77rem; line-height:1.75; }
.rule-list, .steps-list { margin-top:16px; display:flex; flex-direction:column; gap:9px; }
.rule-item, .step-item { display:flex; gap:12px; padding:13px; border:1px solid #202020; border-radius:12px; background:#0e0e0e; }
.rule-number, .step-number { width:28px; height:28px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border-radius:9px; background:var(--accent-soft); color:var(--accent-light); font-size:.68rem; font-weight:800; }
.rule-item h3, .step-item h3 { color:#ddd; font-size:.78rem; }
.rule-item p, .step-item p { margin-top:4px; color:#707070; font-size:.69rem; line-height:1.6; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { margin-top:20px; border-top:1px solid #222; background:#060606; }
.footer-inner { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:30px; padding:42px 0 30px; }
.footer-title { color:var(--accent-light); font-size:.85rem; font-weight:800; }
.footer-text { max-width:400px; margin-top:8px; color:#686868; font-size:.7rem; line-height:1.7; }
.footer-links { display:flex; flex-direction:column; gap:7px; margin-top:10px; }
.footer-links a { color:#777; font-size:.7rem; transition:.2s ease; }
.footer-links a:hover { color:#fff; }
.footer-bottom { padding:17px 0; border-top:1px solid #1f1f1f; color:#4d4d4d; font-size:.65rem; text-align:center; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:3000;
    min-width:270px;
    max-width:380px;
    padding:13px 15px;
    border:1px solid var(--accent-border);
    border-radius:13px;
    background:rgba(17,17,17,.96);
    box-shadow:var(--shadow-lg);
    color:#ddd;
    font-size:.75rem;
    opacity:0;
    pointer-events:none;
    transform:translateY(12px);
    transition:.25s ease;
}
.toast.show { opacity:1; transform:translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1050px) {
    .nav { display:none; }
    .mobile-toggle { display:flex; }
    .market-layout, .profile-layout, .form-layout, .detail-layout { grid-template-columns:1fr; }
    .filters, .detail-panel { position:static; }
    .filters { order:2; }
    .listings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .feature-grid { grid-template-columns:1fr; }
    .footer-inner { grid-template-columns:1fr 1fr; }
}

@media (max-width: 700px) {
    .container, .header-inner { width:min(100% - 28px, var(--container)); }
    .page { padding:32px 0 60px; }
    .hero { padding:60px 0 45px; }
    .hero h1 { font-size:clamp(2.75rem,14vw,4.4rem); letter-spacing:-3px; }
    .search-box { flex-wrap:wrap; }
    .search-icon { width:42px; }
    .search-input { min-width:calc(100% - 48px); height:42px; }
    .search-button { width:100%; min-height:42px; margin-top:6px; }
    .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .market-toolbar { align-items:stretch; flex-direction:column; }
    .toolbar-right { justify-content:space-between; }
    .sort-select { flex:1; }
    .listings-grid { grid-template-columns:1fr; }
    .listings-grid.list-view .listing-card { grid-template-columns:1fr; }
    .listings-grid.list-view .listing-image { height:auto; min-height:0; aspect-ratio:16/11; }
    .form-grid { grid-template-columns:1fr; }
    .field-full { grid-column:auto; }
    .image-preview-grid { grid-template-columns:repeat(2,1fr); }
    .stats-row { grid-template-columns:1fr 1fr 1fr; }
    .detail-actions { grid-template-columns:1fr; }
    .detail-stats { grid-template-columns:1fr 1fr; }
    .thumbs { grid-template-columns:repeat(4,1fr); }
    .footer-inner { grid-template-columns:1fr; gap:22px; }
    .user-name { display:none; }
    .toast { left:14px; right:14px; bottom:14px; min-width:0; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}


.profile-edit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.profile-edit-box {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.profile-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-edit-header h2 {
    margin: 0 0 6px;
}

.profile-edit-header p {
    margin: 0;
}

.profile-edit-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.profile-edit-avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-edit-field {
    margin-bottom: 24px;
}

.profile-edit-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =========================================================
   TFD MARKET — PREMIUM LISTINGS / DETAIL / PROFILE
   ========================================================= */
.listing-card-premium { position:relative; border-radius:19px; background:linear-gradient(180deg,#121212,#101010); }
.listing-media-wrap { position:relative; }
.listing-image-shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(0,0,0,.05),transparent 48%,rgba(0,0,0,.42)); }
.listing-photo-count { position:absolute; right:10px; bottom:10px; padding:5px 8px; border:1px solid rgba(255,255,255,.12); border-radius:8px; background:rgba(0,0,0,.62); color:#ddd; font-size:.62rem; }
.listing-topline { display:flex; justify-content:space-between; gap:10px; color:#666; font-size:.65rem; margin-bottom:7px; }
.listing-price-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:9px; }
.listing-status { padding:4px 7px; border-radius:7px; background:var(--success-soft); color:var(--success); font-size:.58rem; font-weight:750; }
.seller-mini { color:inherit; }
.seller-mini > div:last-child { display:flex; flex-direction:column; min-width:0; }
.seller-rating { color:#6f6f6f; font-size:.58rem; margin-top:2px; }
.listing-footer .seller-name { max-width:110px; color:#c0c0c0; font-size:.66rem; }

.listing-back { margin-bottom:15px; }
.listing-back a { color:#777; font-size:.73rem; transition:.2s ease; }
.listing-back a:hover { color:var(--accent-light); }
.detail-layout-premium { grid-template-columns:minmax(0,1.4fr) minmax(350px,.7fr); gap:24px; }
.gallery-panel-premium { box-shadow:var(--shadow-md); }
.detail-main-image { position:relative; }
.detail-main-image img { transition:transform .35s ease; }
.detail-main-image:hover img { transform:scale(1.015); }
.detail-image-label { position:absolute; left:14px; bottom:14px; padding:7px 10px; border:1px solid rgba(255,255,255,.1); border-radius:9px; background:rgba(0,0,0,.58); color:#ddd; font-size:.62rem; backdrop-filter:blur(10px); }
.detail-panel-premium { padding:25px; box-shadow:var(--shadow-md); }
.detail-panel-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.detail-share { width:34px; height:34px; border:1px solid #2c2c2c; border-radius:9px; background:#151515; color:#aaa; cursor:pointer; }
.detail-share:hover { color:#fff; border-color:var(--accent-border); }
.detail-location { margin-top:10px; color:#888; font-size:.72rem; }
.detail-location span { color:var(--accent); }
.detail-location i { margin:0 5px; color:#444; font-style:normal; }
.detail-quick { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.detail-quick > div { padding:11px; border:1px solid #222; border-radius:11px; background:#0d0d0d; }
.detail-quick span { display:block; color:#5f5f5f; font-size:.61rem; }
.detail-quick b { display:block; margin-top:4px; color:#ddd; font-size:.72rem; }
.seller-box-premium { position:relative; padding:13px; }
.seller-box-avatar { width:44px; height:44px; border-radius:13px; }
.seller-info strong { font-size:.8rem; }
.seller-info span { color:#888; }
.seller-profile-link { margin-left:auto; color:var(--accent-light); font-size:.62rem; white-space:nowrap; }
.detail-actions-premium { grid-template-columns:1fr; }
.detail-actions-premium .btn-outline { min-height:42px; }
.detail-report { width:100%; margin-top:10px; padding:8px; background:transparent; color:#666; font-size:.62rem; cursor:pointer; }
.detail-report:hover { color:#d98282; }
.deal-note { margin-top:16px; padding:12px; border:1px solid #242424; border-radius:12px; background:#0d0d0d; }
.deal-note strong { display:block; color:#bbb; font-size:.68rem; }
.deal-note span { display:block; margin-top:4px; color:#666; font-size:.62rem; line-height:1.55; }
.detail-content-grid { display:grid; grid-template-columns:1.25fr .75fr; gap:14px; margin-top:14px; }
.content-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.content-card-head span { color:#555; font-size:.6rem; }
.detail-description-card p { white-space:pre-line; }
.detail-info-list { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:14px; }
.detail-info-list > div { padding:10px; border-radius:10px; background:#0d0d0d; border:1px solid #202020; }
.detail-info-list span { display:block; color:#5e5e5e; font-size:.6rem; }
.detail-info-list b { display:block; margin-top:3px; color:#ddd; font-size:.68rem; }

.profile-dashboard-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:13px; }
.profile-dashboard-head h2 { margin-top:5px; color:#fff; font-size:1.05rem; }
.profile-dashboard-head p { margin-top:4px; color:#686868; font-size:.68rem; }
.profile-listings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.profile-listings-grid .listing-card { min-width:0; }
.profile-listings-grid .listing-image { aspect-ratio:16/10; }
.profile-listings-grid .listing-body { padding:12px; }
.profile-listings-grid .listing-title { font-size:.78rem; min-height:36px; }
.profile-listings-grid .listing-price { font-size:.9rem; }
.profile-empty { grid-column:1/-1; padding:28px; border:1px dashed #303030; border-radius:14px; color:#666; text-align:center; font-size:.7rem; }
.profile-review-card { margin-top:14px; padding:17px; border:1px solid var(--border); border-radius:17px; background:linear-gradient(120deg,#121212,#101010); }
.profile-review-card > div:first-child { display:flex; align-items:center; gap:10px; }
.profile-review-label { color:#626262; font-size:.58rem; letter-spacing:.08em; }
.profile-review-card strong { color:var(--accent-light); font-size:.9rem; }
.profile-review-card > div:first-child > span:last-child { color:#777; font-size:.63rem; }
.profile-rating-bar { height:5px; margin-top:12px; overflow:hidden; border-radius:999px; background:#222; }
.profile-rating-bar span { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.profile-review-card p { margin-top:9px; color:#606060; font-size:.63rem; }
.profile-layout .content-card { box-shadow:0 7px 24px rgba(0,0,0,.12); }
.profile-layout .stats-row { grid-template-columns:repeat(4,1fr); }

@media (max-width:1050px) {
    .detail-content-grid { grid-template-columns:1fr; }
    .profile-listings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
    .detail-layout-premium { gap:14px; }
    .detail-panel-premium { padding:18px; }
    .profile-dashboard-head { align-items:flex-start; flex-direction:column; }
    .profile-listings-grid { grid-template-columns:1fr; }
    .profile-layout .stats-row { grid-template-columns:1fr 1fr; }
    .detail-info-list { grid-template-columns:1fr 1fr; }
}

/* Vehicle autocomplete + stages */
.autocomplete-wrap{position:relative}.autocomplete-list{display:none;position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:30;background:#111214;border:1px solid var(--border);border-radius:12px;overflow:hidden;box-shadow:0 18px 45px rgba(0,0,0,.45)}.autocomplete-list.show{display:block}.autocomplete-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;background:transparent;border:0;border-bottom:1px solid #1d1d1d;color:#fff;text-align:left}.autocomplete-item:hover{background:#181818}.autocomplete-item span{font-weight:650}.autocomplete-item small{color:#666;font-size:.68rem}.autocomplete-empty{padding:13px;color:#777;font-size:.75rem}.field-hint{margin-top:7px;color:#686868;font-size:.7rem;line-height:1.5}.stage-grid{margin-top:2px}

.listing-stage-line{margin:7px 0 2px;color:#777;font-size:.68rem}.listing-stage-line strong{color:#c9c9c9;font-weight:650}.detail-info-wide{grid-column:1/-1}.detail-info-wide b{color:#f1f1f1}

.stage-grid .field{margin-bottom:0}.stage-grid{row-gap:8px}.detail-info-wide{border-top:1px solid #1d1d1d;padding-top:10px;margin-top:2px}


/* ===== Загрузка фотографий ===== */
.photo-drop { display:flex; align-items:center; gap:16px; margin-top:15px; padding:18px 20px; border:1.5px dashed var(--accent-border); border-radius:14px; background:var(--accent-soft); cursor:pointer; transition:border-color .2s, background .2s, transform .2s; }
.photo-drop:hover, .photo-drop:focus-visible, .photo-drop.is-drag { border-color:var(--accent); background:rgba(244,162,97,.18); outline:none; }
.photo-drop.is-drag { transform:scale(1.01); }
.photo-drop.is-full { opacity:.55; cursor:not-allowed; }
.photo-drop-icon { flex:none; width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,var(--accent-light),var(--accent-dark)); color:#151515; }
.photo-drop-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.photo-drop-text strong { font-size:1rem; color:var(--text); }
.photo-drop-text span { font-size:.78rem; color:var(--text-muted); line-height:1.4; }
.photo-count { margin-left:auto; flex:none; padding:5px 11px; border-radius:999px; border:1px solid var(--accent-border); color:var(--accent-light); font-size:.74rem; font-weight:700; }
.image-preview-grid { gap:10px; }
.preview-box { transition:border-color .2s; }
.preview-box:hover { border-color:var(--accent-border); }
.preview-remove { top:6px; right:6px; width:26px; height:26px; font-size:16px; line-height:1; transition:background .2s, color .2s; }
.preview-remove:hover { background:#d33; color:#fff; }
.preview-cover { position:absolute; left:6px; bottom:6px; padding:3px 9px; border-radius:7px; background:var(--accent); color:#151515; font-size:.66rem; font-weight:800; }
.preview-make-cover { position:absolute; left:6px; bottom:6px; padding:3px 9px; border-radius:7px; background:rgba(0,0,0,.75); color:#ddd; font-size:.66rem; font-weight:600; cursor:pointer; opacity:0; transition:opacity .2s; }
.preview-box:hover .preview-make-cover, .preview-make-cover:focus-visible { opacity:1; }
.preview-add { aspect-ratio:1/.72; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1.5px dashed var(--border-light); border-radius:9px; background:transparent; color:var(--text-muted); font-size:.74rem; cursor:pointer; transition:border-color .2s, color .2s; }
.preview-add span { font-size:1.6rem; line-height:1; }
.preview-add:hover { border-color:var(--accent); color:var(--accent-light); }
@media (max-width:581px) {
    .photo-drop { flex-wrap:wrap; padding:16px; }
    .photo-count { margin-left:0; }
    .preview-make-cover { opacity:1; }
}


/* ===== Статусы объявлений ===== */
.listing-status.is-moderation { background:rgba(233,196,106,.12); color:#e9c46a; }
.listing-status.is-rejected { background:var(--danger-soft); color:var(--danger); }
.listing-status.is-sold, .listing-status.is-unpublished { background:rgba(255,255,255,.07); color:var(--text-muted); }
.listing-notice { margin-bottom:14px; padding:11px 14px; border-radius:11px; font-size:.8rem; font-weight:600; }
.listing-notice.is-moderation { background:rgba(233,196,106,.1); color:#e9c46a; }
.listing-notice.is-rejected { background:var(--danger-soft); color:var(--danger); }
.listing-notice.is-sold, .listing-notice.is-unpublished { background:rgba(255,255,255,.06); color:var(--text-soft); }

/* ===== Мои объявления ===== */
.my-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.my-tab { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text-soft); font-size:.8rem; font-weight:600; cursor:pointer; transition:border-color .2s, color .2s, background .2s; }
.my-tab span { min-width:20px; padding:1px 6px; border-radius:999px; background:rgba(255,255,255,.07); color:var(--text-muted); font-size:.68rem; text-align:center; }
.my-tab:hover { border-color:var(--accent-border); color:var(--text); }
.my-tab.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-light); }
.my-tab.active span { background:var(--accent); color:#151515; }
.my-list { display:grid; gap:12px; }
.my-item { display:grid; grid-template-columns:150px minmax(0,1fr) auto; gap:16px; align-items:center; padding:12px; border:1px solid var(--border); border-radius:16px; background:var(--surface); transition:border-color .2s; }
.my-item:hover { border-color:var(--border-light); }
.my-item.is-muted .my-thumb img { filter:grayscale(.7); opacity:.65; }
.my-thumb { display:block; aspect-ratio:16/10; border-radius:11px; overflow:hidden; background:#151515; }
.my-thumb img { width:100%; height:100%; object-fit:cover; }
.my-title-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.my-title { font-size:1.02rem; font-weight:700; color:var(--text); }
.my-title:hover { color:var(--accent-light); }
.my-meta { display:flex; gap:6px 14px; flex-wrap:wrap; margin-top:7px; color:var(--text-muted); font-size:.76rem; }
.my-meta b { color:var(--accent-light); }
.my-reason { margin-top:9px; padding:8px 11px; border-radius:9px; background:var(--danger-soft); color:var(--danger); font-size:.76rem; }
.my-actions { display:flex; flex-direction:column; gap:6px; align-items:stretch; min-width:170px; }
.btn-small { padding:8px 12px; font-size:.74rem; text-align:center; }
.modal-backdrop { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:18px; background:rgba(0,0,0,.72); backdrop-filter:blur(4px); }
.modal-dialog { width:100%; max-width:520px; max-height:90vh; overflow:auto; padding:24px; border:1px solid var(--border-light); border-radius:18px; background:var(--surface-2); animation:modal-in .18s ease-out; }
@keyframes modal-in { from { opacity:0; transform:translateY(8px) scale(.98); } }
.modal-title { margin-bottom:10px; color:#fff; font-size:1.1rem; }
.modal-text { color:var(--text-soft); font-size:.86rem; line-height:1.6; }
.modal-form { display:grid; gap:14px; margin-top:14px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
@media (max-width:860px) {
    .my-item { grid-template-columns:120px minmax(0,1fr); }
    .my-actions { grid-column:1/-1; flex-direction:row; flex-wrap:wrap; min-width:0; }
}
@media (max-width:581px) {
    .my-item { grid-template-columns:1fr; }
    .my-thumb { aspect-ratio:16/9; }
    .my-actions .btn { flex:1 1 calc(50% - 6px); }
    .modal-actions .btn { flex:1; }
}
@media (prefers-reduced-motion:reduce) { .modal-dialog { animation:none; } }


/* ===== Жалобы ===== */
.report-reasons { display:grid; gap:8px; }
.report-reason { display:flex; align-items:center; gap:10px; padding:10px 13px; border:1px solid var(--border); border-radius:11px; background:var(--surface); color:var(--text-soft); font-size:.84rem; cursor:pointer; transition:border-color .2s, background .2s; }
.report-reason:hover { border-color:var(--border-light); }
.report-reason:has(input:checked) { border-color:var(--danger); background:var(--danger-soft); color:#fff; }
.report-reason input { accent-color:var(--danger); }
.detail-report.is-sent { color:var(--success); cursor:default; }


/* ===== Админ-панель ===== */
.admin-bar { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:16px; padding:12px 16px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.admin-switch { display:inline-flex; align-items:center; gap:10px; font-size:.84rem; font-weight:600; color:var(--text-soft); cursor:pointer; }
.admin-switch input { width:18px; height:18px; accent-color:var(--accent); }
.admin-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:20px; }
.admin-stat { padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.admin-stat b { display:block; font-size:1.7rem; color:#fff; line-height:1.1; }
.admin-stat span { font-size:.74rem; color:var(--text-muted); }
.admin-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.admin-row .my-meta a { color:var(--accent-light); }
.admin-desc { margin-top:8px; color:var(--text-muted); font-size:.78rem; line-height:1.55; }
@media (max-width:860px) {
    .admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .admin-row { grid-template-columns:1fr; }
}


/* ===== Админ-панель: расширение ===== */
.admin-bar { align-items:flex-start; }
.admin-tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin-bottom:14px; align-items:center; }
.admin-section { margin-bottom:14px; padding:18px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.admin-section h3 { margin-bottom:12px; font-size:.95rem; color:#fff; }
.admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.admin-grid .admin-section { margin-bottom:0; }
.admin-grid + .admin-section { margin-top:14px; }
.admin-stats { grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); }
.muted { color:var(--text-muted); font-size:.82rem; }
.bar-row { display:grid; grid-template-columns:110px minmax(0,1fr) 28px; gap:10px; align-items:center; margin-bottom:9px; font-size:.78rem; color:var(--text-soft); }
.bar { height:8px; border-radius:999px; background:rgba(255,255,255,.06); overflow:hidden; }
.bar i { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.bar i.is-active { background:var(--success); }
.bar i.is-rejected { background:var(--danger); }
.bar i.is-moderation { background:#e9c46a; }
.bar i.is-sold, .bar i.is-unpublished { background:#6b6b6b; }
.bar-row b { text-align:right; color:#fff; }
.attn { margin:0 8px 8px 0; padding:9px 14px; border:1px solid rgba(233,196,106,.3); border-radius:11px; background:rgba(233,196,106,.08); color:#e9c46a; font-size:.82rem; cursor:pointer; }
.attn:hover { background:rgba(233,196,106,.15); }
.bulk-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; padding:10px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.bulk-count { color:var(--accent-light); font-size:.8rem; font-weight:700; margin-left:auto; }
.admin-check { width:17px; height:17px; accent-color:var(--accent); flex:none; }
.link-btn { padding:0; border:0; background:none; color:var(--accent-light); font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.link-btn.my-title { color:var(--text); text-decoration:none; }
.link-btn.my-title:hover { color:var(--accent-light); }
.user-head { display:flex; gap:14px; align-items:center; margin-bottom:14px; }
.user-avatar-big { width:52px; height:52px; font-size:1rem; }
.user-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:14px 0; }
.user-stats div { padding:10px; border:1px solid var(--border); border-radius:11px; text-align:center; }
.user-stats b { display:block; color:#fff; font-size:1.2rem; }
.user-stats span { color:var(--text-muted); font-size:.68rem; }
.user-actions { display:flex; gap:8px; flex-wrap:wrap; }
.user-sub { margin:18px 0 6px; font-size:.78rem; color:var(--text-soft); }
.user-line { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:7px 0; border-bottom:1px solid #1d1d1d; font-size:.8rem; color:var(--text-soft); }
.user-line a { color:var(--accent-light); }
.user-line time { color:var(--text-muted); font-size:.72rem; white-space:nowrap; }
.user-line.muted { color:var(--text-muted); }
.notif-panel { margin-bottom:22px; padding:16px 18px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.notif-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.notif-head h2 { display:flex; align-items:center; gap:10px; font-size:1rem; color:#fff; }
.notif-badge { padding:1px 8px; border-radius:999px; background:var(--accent); color:#151515; font-size:.7rem; font-weight:800; }
.notif-item { display:flex; justify-content:space-between; gap:14px; padding:9px 12px; border-radius:10px; font-size:.82rem; color:var(--text-soft); }
.notif-item + .notif-item { margin-top:2px; }
.notif-item.unread { background:var(--accent-soft); color:#fff; }
.notif-item time { flex:none; color:var(--text-muted); font-size:.7rem; }
.notif-empty { padding:10px 0 4px; color:var(--text-muted); font-size:.8rem; }
@media (max-width:1000px) { .admin-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } .admin-grid { grid-template-columns:1fr; } }
@media (max-width:581px) { .admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .user-stats { grid-template-columns:repeat(2,1fr); } .notif-item { flex-direction:column; gap:3px; } }

/* =========================================================
   ЧАТ
   ========================================================= */
.chat-layout [hidden], .chat-window[hidden], .chat-empty[hidden] { display:none !important; }
.icon-btn.active { border-color: var(--accent-border); color: var(--accent-light); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(244,162,97,.08) inset; }
.icon-btn.active::first-letter { color: var(--accent-light); }
.page-chat { padding-top: 22px; padding-bottom: 22px; }
.chat-layout {
    display:grid; grid-template-columns: 340px 1fr; height: calc(100vh - 190px); min-height: 520px;
    border:1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow:hidden;
}
.chat-side { display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--border); background: var(--bg-soft); }
.chat-side-head { padding:18px 18px 8px; }
.chat-side-head h2 { font-size:1.15rem; font-weight:800; }
.chat-tabs { display:flex; gap:6px; padding:8px 14px 12px; }
.chat-tabs button {
    flex:1; padding:8px 6px; border:1px solid var(--border); border-radius:999px; background:transparent;
    color: var(--text-muted); font:inherit; font-size:.76rem; font-weight:600; cursor:pointer; transition:.2s;
}
.chat-tabs button:hover { color: var(--text); border-color: var(--border-light); }
.chat-tabs button.active { color: var(--accent-light); border-color: var(--accent-border); background: var(--accent-soft); }
.chat-list { flex:1; overflow-y:auto; }
.chat-list-empty { padding:36px 18px; text-align:center; color: var(--text-muted); font-size:.85rem; }
.chat-item {
    width:100%; display:flex; gap:12px; padding:13px 16px; border:0; border-top:1px solid var(--border);
    background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; transition: background .2s;
}
.chat-item:hover { background: var(--surface-2); }
.chat-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.chat-avatar {
    flex:none; width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:50%;
    background: var(--surface-3); border:1px solid var(--border-light); color: var(--accent-light); font-size:.8rem; font-weight:800;
}
.chat-item-body { min-width:0; flex:1; }
.chat-item-top { display:flex; justify-content:space-between; gap:8px; }
.chat-item-top strong { font-size:.88rem; }
.chat-item-top span { color: var(--text-dark); font-size:.7rem; }
.chat-item-listing { margin-top:2px; color: var(--accent-light); font-size:.74rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-item-last { display:flex; justify-content:space-between; gap:8px; margin-top:3px; color: var(--text-muted); font-size:.8rem; }
.chat-item-last span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-badge { flex:none; min-width:20px; height:20px; padding:0 6px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background: var(--accent); color:#111; font-size:.7rem; font-weight:800; }
.chat-demo { padding:12px 16px; border-top:1px solid var(--border); color: var(--text-dark); font-size:.72rem; display:flex; flex-direction:column; gap:6px; }
.chat-demo .link-btn { align-self:flex-start; font-size:.74rem; }

.chat-pane { display:flex; flex-direction:column; min-width:0; min-height:0; }
.chat-empty { margin:auto; padding:30px; text-align:center; color: var(--text-muted); }
.chat-empty h3 { color: var(--text); margin:6px 0; }
.chat-window { display:flex; flex-direction:column; min-height:0; flex:1; }
.chat-head { display:flex; align-items:center; gap:14px; padding:12px 16px; border-bottom:1px solid var(--border); background: var(--surface-2); }
.chat-back { display:none; width:36px; height:36px; border:1px solid var(--border); border-radius:10px; background:transparent; color: var(--text); font-size:1.1rem; cursor:pointer; }
.chat-peer { display:flex; align-items:center; gap:11px; min-width:0; }
.chat-peer strong { display:block; font-size:.92rem; }
.chat-peer span { color: var(--text-muted); font-size:.72rem; }
.chat-listing {
    margin-left:auto; display:flex; align-items:center; gap:10px; min-width:0; max-width:290px; padding:6px 10px;
    border:1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); color:inherit; text-decoration:none; transition:.2s;
}
.chat-listing:hover { border-color: var(--accent-border); }
.chat-listing img { width:40px; height:40px; object-fit:cover; border-radius:8px; flex:none; }
.chat-listing span { min-width:0; display:flex; flex-direction:column; }
.chat-listing b { font-size:.8rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-listing em { font-style:normal; color: var(--accent-light); font-size:.76rem; font-weight:700; }
.chat-report { flex:none; width:36px; height:36px; border:1px solid var(--border); border-radius:10px; background:transparent; color: var(--text-muted); cursor:pointer; transition:.2s; }
.chat-report:hover { color: var(--danger); border-color: var(--danger); }

.chat-messages { flex:1; min-height:0; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:6px; }
.msg-system { align-self:center; max-width:560px; margin-bottom:8px; padding:11px 14px; border:1px solid var(--accent-border); border-radius:12px; background: var(--accent-soft); color: var(--text-soft); font-size:.78rem; line-height:1.5; text-align:center; }
.msg-system strong { color: var(--accent-light); }
.msg-day { align-self:center; margin:10px 0 4px; }
.msg-day span { padding:3px 11px; border-radius:999px; background: var(--surface-3); color: var(--text-muted); font-size:.7rem; }
.msg { display:flex; }
.msg.mine { justify-content:flex-end; }
.msg-bubble { max-width:min(74%, 520px); padding:9px 12px 6px; border-radius:16px; background: var(--surface-3); border:1px solid var(--border); word-break:break-word; overflow-wrap:anywhere; }
.msg.mine .msg-bubble { background: var(--accent-soft); border-color: var(--accent-border); border-bottom-right-radius:5px; }
.msg.theirs .msg-bubble { border-bottom-left-radius:5px; }
.msg-bubble p { font-size:.9rem; line-height:1.45; }
.msg-time { display:block; margin-top:3px; text-align:right; color: var(--text-dark); font-size:.66rem; }
.msg-time i { font-style:normal; letter-spacing:-2px; }
.msg-time i.seen { color: var(--accent-light); }
.msg-img { display:block; max-width:100%; max-height:280px; margin-bottom:6px; border-radius:10px; cursor:zoom-in; }
.msg-typing p { color: var(--text-muted); font-style:italic; }
.msg-zoom { display:block; max-width:min(92vw, 900px); max-height:82vh; margin:auto; border-radius:12px; }

.chat-quick { display:flex; flex-wrap:wrap; gap:8px; padding:8px 16px; }
.chat-quick button { padding:8px 13px; border:1px solid var(--accent-border); border-radius:999px; background: var(--accent-soft); color: var(--accent-light); font:inherit; font-size:.78rem; cursor:pointer; transition:.2s; }
.chat-quick button:hover { background: rgba(244,162,97,.2); }
.chat-locked { margin:10px 16px 14px; padding:12px 14px; border:1px dashed var(--border-light); border-radius:12px; color: var(--text-muted); font-size:.84rem; text-align:center; }
.chat-attach { padding:8px 16px 0; }
.chat-attach-box { position:relative; display:inline-block; }
.chat-attach-box img { display:block; height:74px; border-radius:10px; border:1px solid var(--border-light); }
.chat-attach-box button { position:absolute; top:-7px; right:-7px; width:22px; height:22px; border:0; border-radius:50%; background: var(--danger); color:#111; font-weight:800; cursor:pointer; }
.chat-composer { display:flex; align-items:flex-end; gap:10px; padding:12px 16px 14px; border-top:1px solid var(--border); background: var(--surface-2); }
.chat-clip, .chat-send { flex:none; width:42px; height:42px; border-radius:12px; border:1px solid var(--border); background: var(--surface-3); color: var(--text); font-size:1rem; cursor:pointer; transition:.2s; }
.chat-clip:hover { border-color: var(--accent-border); }
.chat-send { background: var(--accent); border-color: var(--accent); color:#111; font-weight:800; }
.chat-send:hover { background: var(--accent-light); }
.chat-input { flex:1; min-height:42px; max-height:140px; padding:11px 14px; resize:none; border:1px solid var(--border); border-radius:12px; background: var(--bg-soft); color: var(--text); font:inherit; font-size:.9rem; line-height:1.4; outline:none; }
.chat-input:focus { border-color: var(--accent-border); }

@media (max-width: 860px) {
    .chat-layout { grid-template-columns: 1fr; height: calc(100dvh - 150px); border-radius: var(--radius-md); }
    .chat-layout .chat-pane { display:none; }
    .chat-layout.is-open .chat-pane { display:flex; }
    .chat-layout.is-open .chat-side { display:none; }
    .chat-back { display:block; }
    .chat-listing { max-width:44%; }
    .chat-listing em { display:none; }
    .msg-bubble { max-width:86%; }
    .chat-messages { padding:14px 12px; }
}
@media (max-width: 480px) {
    .chat-listing img { display:none; }
    .chat-peer span { display:none; }
}

/* шапка на узких экранах: 4 иконки + профиль + бургер должны помещаться */
@media (max-width: 480px) {
    .header-actions { gap: 5px; }
    .header-actions .icon-btn, .mobile-toggle { width: 36px; height: 36px; border-radius: 10px; }
    .header-actions .user-button { padding: 3px; gap: 0; }
    .header-actions .user-name { display: none; }
    .logo-sub { display: none; }
}

/* публичный профиль */
.user-badge { display:inline-block; margin-top:10px; padding:4px 11px; border:1px solid var(--accent-border); border-radius:999px; background:var(--accent-soft); color:var(--accent-light); font-size:.68rem; font-weight:700; }
.user-badge.is-danger { border-color:var(--danger); background:var(--danger-soft); color:var(--danger); }
.user-actions { margin-top:18px; display:flex; flex-direction:column; gap:8px; }
.profile-contacts { margin-top:18px; padding-top:16px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:8px; }
.profile-contacts-title { color:var(--text-muted); font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; }
.profile-contact-link { display:flex; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--bg-soft); color:inherit; text-decoration:none; font-size:.78rem; cursor:pointer; transition:.2s; }
.profile-contact-link:hover { border-color:var(--accent-border); }
.profile-contact-link span { color:var(--text-muted); }
.profile-contact-link b { color:var(--text); overflow:hidden; text-overflow:ellipsis; }
.user-about { color:var(--text-soft); font-size:.86rem; line-height:1.6; margin-top:8px; overflow-wrap:anywhere; }
.user-date { font-size:1rem; }
.seller-name-link, .chat-peer-link { color:inherit; text-decoration:none; }
.seller-name-link:hover strong, .chat-peer-link:hover { color:var(--accent-light); }
a.seller-box-avatar { text-decoration:none; color:inherit; }
.user-page-grid .listing-card { min-width:0; }
.content-card .listings-grid { grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); }

/* =========================================================
   ПРОФИЛЬ (редизайн)
   ========================================================= */
.pf-hero { border:1px solid var(--border); border-radius:var(--radius-xl); background:var(--surface); overflow:hidden; }
.pf-cover {
    position:relative; height:220px; overflow:hidden;
    background:
        radial-gradient(120% 140% at 88% -20%, rgba(244,162,97,.42), transparent 55%),
        radial-gradient(90% 120% at 0% 120%, rgba(216,121,50,.22), transparent 60%),
        linear-gradient(135deg, #1a1410 0%, #0e0e0e 60%);
}
.pf-hero { margin-bottom:16px; }
.pf-hero-body { position:relative; display:flex; align-items:flex-end; gap:26px; padding:0 30px 28px; margin-top:-62px; }
.pf-avatar {
    flex:none; width:116px; height:116px; display:flex; align-items:center; justify-content:center; overflow:hidden;
    border:4px solid var(--surface); border-radius:30px; background:var(--surface-3); color:var(--accent-light);
    font-size:2.1rem; font-weight:800; box-shadow:0 12px 34px rgba(0,0,0,.45);
}
.pf-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.pf-avatar-sm { width:84px; height:84px; border-radius:22px; font-size:1.5rem; border-color:var(--border-light); box-shadow:none; }
.pf-id { flex:1; min-width:0; padding-top:68px; }
.pf-actions { margin-left:auto; display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:flex-end; }
.pf-stats { margin:16px 0; }
.pf-cols { margin-top:0; }
.pf-card + .pf-card { margin-top:16px; }
.pf-name { font-size:1.75rem; font-weight:800; letter-spacing:-.02em; line-height:1.1; overflow-wrap:anywhere; }
.pf-sub { margin-top:6px; color:var(--text-muted); font-size:.82rem; }
.pf-sub i { display:inline-block; width:4px; height:4px; margin:0 9px 2px; border-radius:50%; background:var(--text-dark); }
.pf-badges { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.pf-badge { padding:4px 11px; border:1px solid var(--border-light); border-radius:999px; color:var(--text-soft); font-size:.7rem; font-weight:700; }
.pf-badge.is-linked { border-color:rgba(121,214,157,.3); background:var(--success-soft); color:var(--success); }
.pf-badge.is-accent { border-color:var(--accent-border); background:var(--accent-soft); color:var(--accent-light); }
.pf-badge.is-danger { border-color:var(--danger); background:var(--danger-soft); color:var(--danger); }
.pf-about { margin-top:14px; max-width:680px; color:var(--text-soft); font-size:.9rem; line-height:1.6; overflow-wrap:anywhere; }
.pf-actions { flex:none; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; padding-bottom:2px; max-width:46%; }

.pf-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-top:14px; }
.pf-stat { padding:15px 17px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface); }
.pf-stat b { display:block; font-size:1.45rem; font-weight:800; letter-spacing:-.02em; }
.pf-stat span { display:block; margin-top:3px; color:var(--text-muted); font-size:.72rem; }
.pf-stat.is-warn { border-color:var(--accent-border); background:var(--accent-soft); }
.pf-stat.is-warn b { color:var(--accent-light); }

.pf-tabs {
    position:sticky; top:76px; z-index:50; display:flex; gap:4px; margin:16px 0; padding:6px; overflow-x:auto; scrollbar-width:none;
    border:1px solid var(--border); border-radius:999px; background:rgba(13,13,13,.92); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
}
.pf-tabs::-webkit-scrollbar { display:none; }
.pf-tabs button { flex:none; padding:9px 18px; border:0; border-radius:999px; background:transparent; color:var(--text-muted); font:inherit; font-size:.82rem; font-weight:600; cursor:pointer; transition:.2s; white-space:nowrap; }
.pf-tabs button:hover { color:var(--text); }
.pf-tabs button.active { background:var(--accent-soft); color:var(--accent-light); box-shadow:inset 0 0 0 1px var(--accent-border); }

.pf-cols { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; align-items:start; }
.pf-cols-one { grid-template-columns:minmax(0,1fr); }
.pf-main, .pf-side { display:flex; flex-direction:column; gap:16px; min-width:0; }
.pf-card { padding:22px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); min-width:0; }
.pf-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.pf-card-head h2 { font-size:1rem; font-weight:800; }
.pf-muted { color:var(--text-muted); font-size:.82rem; line-height:1.55; }
.pf-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; }
.pf-grid .listing-card { min-width:0; }
.pf-empty { padding:38px 16px; text-align:center; color:var(--text-muted); }
.pf-empty h3 { margin:6px 0 4px; color:var(--text); font-size:1rem; }
.pf-empty p { font-size:.84rem; }

.pf-attn { display:flex; align-items:center; gap:13px; padding:12px 14px; margin-bottom:8px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-soft); color:inherit; text-decoration:none; transition:.2s; }
.pf-attn:hover { border-color:var(--accent-border); background:var(--accent-soft); }
.pf-attn-ico { flex:none; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:var(--surface-3); color:var(--accent-light); }
.pf-attn b { display:block; font-size:.86rem; }
.pf-attn em { display:block; margin-top:2px; color:var(--text-muted); font-size:.76rem; font-style:normal; }
.pf-attn > span:nth-child(2) { flex:1; min-width:0; }
.pf-attn i { flex:none; color:var(--text-dark); font-style:normal; }

.pf-pct { color:var(--accent-light); font-size:1.1rem; }
.pf-progress { height:7px; border-radius:999px; background:var(--surface-3); overflow:hidden; }
.pf-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--accent-dark), var(--accent-light)); transition:width .4s ease; }
.pf-steps { list-style:none; margin-top:14px; display:flex; flex-direction:column; gap:9px; font-size:.82rem; color:var(--text-soft); }
.pf-steps li { display:flex; align-items:center; gap:10px; }
.pf-steps li span { flex:none; width:20px; height:20px; display:flex; align-items:center; justify-content:center; border:1px solid var(--border-light); border-radius:50%; font-size:.7rem; }
.pf-steps li.done { color:var(--text-muted); }
.pf-steps li.done span { border-color:var(--success); background:var(--success-soft); color:var(--success); }
.pf-steps a { color:var(--accent-light); text-decoration:underline; text-underline-offset:3px; }
.pf-note { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-top:1px solid var(--border); font-size:.8rem; color:var(--text-soft); }
.pf-note:first-of-type { border-top:0; padding-top:0; }
.pf-note em { flex:none; color:var(--text-dark); font-style:normal; font-size:.72rem; }

.pf-deal { display:flex; align-items:center; gap:14px; padding:11px; margin-bottom:8px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-soft); color:inherit; text-decoration:none; transition:.2s; }
.pf-deal:hover { border-color:var(--accent-border); }
.pf-deal-img { flex:none; width:56px; height:56px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:var(--surface-3); overflow:hidden; color:var(--text-dark); }
.pf-deal-img img { width:100%; height:100%; object-fit:cover; }
.pf-deal-info { flex:1; min-width:0; }
.pf-deal-info b { display:block; font-size:.88rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pf-deal-info em { display:block; margin-top:2px; color:var(--text-muted); font-size:.76rem; font-style:normal; }

.pf-acc-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.pf-acc { padding:18px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-soft); }
.pf-acc.is-on { border-color:rgba(121,214,157,.25); }
.pf-acc-top { display:flex; align-items:center; gap:14px; }
.pf-acc-logo { flex:none; width:46px; height:46px; display:flex; align-items:center; justify-content:center; border-radius:13px; color:#fff; font-weight:800; font-size:.95rem; }
.pf-acc-logo.vk { background:#0077ff; }
.pf-acc-logo.discord { background:#5865f2; }
.pf-acc-info { flex:1; min-width:0; }
.pf-acc-info b { display:block; }
.pf-acc-info span { display:block; margin-top:2px; color:var(--text-muted); font-size:.78rem; overflow-wrap:anywhere; }
.pf-acc-info strong { color:var(--success); }
.pf-switch { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); font-size:.8rem; }
.pf-info { margin-top:18px; padding:16px 18px; border:1px solid var(--accent-border); border-radius:var(--radius-md); background:var(--accent-soft); font-size:.82rem; color:var(--text-soft); }
.pf-info b { color:var(--accent-light); }
.pf-info ul { margin:8px 0 0 18px; display:flex; flex-direction:column; gap:6px; line-height:1.5; }

.pf-form-avatar { display:flex; align-items:center; gap:18px; margin-bottom:20px; }
.pf-form .form-grid { margin-top:0; }
.pf-form .form-footer { margin-top:18px; }

@media (max-width: 1050px) {
    .pf-cols { grid-template-columns:1fr; }
    .pf-tabs { top:76px; }
}
@media (max-width: 760px) {
    .pf-cover { height:160px; }
    .pf-hero-body { flex-direction:column; align-items:flex-start; gap:6px; padding:0 18px 20px; margin-top:-44px; }
    .pf-avatar { width:92px; height:92px; border-radius:24px; font-size:1.7rem; }
    .pf-id { padding-top:6px; }
    .pf-name { font-size:1.4rem; }
    .pf-actions { max-width:none; width:100%; justify-content:flex-start; margin-top:10px; }
    .pf-actions .btn { flex:1 1 calc(50% - 5px); justify-content:center; text-align:center; }
    .pf-card { padding:16px; }
    .pf-acc-grid { grid-template-columns:1fr; }
    .pf-acc-top { flex-wrap:wrap; }
    .pf-grid { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); }
    .pf-stats { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 480px) {
    .pf-tabs { top:76px; margin-left:-4px; margin-right:-4px; }
    .pf-tabs button { padding:9px 14px; }
    .pf-form-avatar { flex-direction:column; align-items:flex-start; }
}
.pf-cover { background-size:cover; background-position:center; background-repeat:no-repeat; height:170px; }
.user-avatar { overflow:hidden; }
.pf-switch { display:flex; width:100%; }

/* ===== TFD Market specification layer ===== */
.auth-tabs .btn{cursor:pointer}.market-analytics{margin-top:18px}.market-periods{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.market-period{border:1px solid var(--border,#2a2a2a);background:transparent;color:inherit;border-radius:10px;padding:8px 12px;cursor:pointer}.market-period.active{background:var(--text,#fff);color:var(--bg,#0a0a0a)}.market-chart{width:100%;min-height:220px;overflow:visible;color:var(--accent,#f4a261)}.market-no-data{padding:34px 12px;text-align:center;color:var(--muted,#888);border:1px dashed var(--border,#2a2a2a);border-radius:12px}.market-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.market-stats-grid>div{padding:14px;border:1px solid var(--border,#2a2a2a);border-radius:12px;background:rgba(255,255,255,.02)}.market-stats-grid b,.market-stats-grid span{display:block}.market-stats-grid b{font-size:18px}.market-stats-grid span{margin-top:4px;color:var(--muted,#888);font-size:12px}.market-sales{margin-top:18px}.market-sales h3{margin-bottom:10px}.market-sales>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--border,#2a2a2a)}.market-sales small{color:var(--muted,#888)}.reviews-card{margin-top:18px}.review-item{padding:14px 0;border-bottom:1px solid var(--border,#2a2a2a)}.review-item>div{display:flex;justify-content:space-between;gap:12px}.review-item>div span{font-weight:700}.review-item p{margin:7px 0;color:var(--text,#ddd)}.review-item time{font-size:12px;color:var(--muted,#888)}
@media(max-width:760px){.market-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.market-chart{min-height:170px}}
.admin-directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.admin-directory-grid>div,.admin-accounts{padding:14px;border:1px solid var(--border,#2a2a2a);border-radius:12px}.admin-dir-add{display:flex;gap:8px;margin-top:10px}.admin-dir-add .input{min-width:0;flex:1}.admin-dir-list{margin-top:14px}.admin-dir-list>div{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.admin-accounts{margin-top:14px}.admin-account-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border,#2a2a2a)}.admin-account-row:last-child{border-bottom:0}.admin-account-row>div span{display:block;color:var(--muted,#888);font-size:12px;margin-top:3px}@media(max-width:760px){.admin-directory-grid{grid-template-columns:1fr}.admin-account-row{grid-template-columns:1fr}.admin-account-row .select-input,.admin-account-row .btn{width:100%}}
.review-pending{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-top:1px solid var(--border);}
.review-pending>div{display:flex;flex-direction:column;gap:5px;min-width:0}.review-pending span{font-size:13px;color:var(--muted)}
.sold-buyer-list{display:flex;flex-direction:column;gap:8px;margin:12px 0}.sold-buyer-option{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}.sold-buyer-option:has(input:checked){border-color:var(--accent)}.sold-buyer-option input{accent-color:var(--accent)}.sold-buyer-option span{display:flex;flex-direction:column;gap:3px}.sold-buyer-option small{font-size:12px;color:var(--muted)}.sold-no-chats{padding:12px;border:1px dashed var(--border);border-radius:12px}.sold-external-note{font-size:12px;margin-top:8px}

/* Profile UX refinements */
.pf-note{padding:12px 0;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:4px}.pf-note.is-unread{font-weight:600}.pf-note em{font-style:normal;font-size:12px;color:var(--muted)}
.profile-sold-wrap{min-width:0}.sold-deal-meta{padding:10px 12px;border:1px solid var(--border);border-top:0;border-radius:0 0 12px 12px;color:var(--muted);font-size:13px}.sold-deal-meta b{color:var(--text)}


/* Profile / notifications UX */
.profile-popover,.notif-popover{position:absolute;z-index:120;top:calc(100% + 8px);right:0;width:260px;background:var(--surface-2);border:1px solid var(--border-light);border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.45);overflow:hidden}
.profile-popover a{display:block;padding:13px 15px;color:var(--text);text-decoration:none;font-size:.85rem}.profile-popover a:hover{background:var(--accent-soft)}
.header-actions{position:relative}.notif-popover{width:360px;right:48px;padding:12px}.notif-popover-head{display:flex;justify-content:space-between;align-items:center;padding:3px 4px 10px}.notif-pop-item{padding:11px 10px;border-radius:10px;font-size:.8rem;color:var(--text-soft)}.notif-pop-item.unread{background:var(--accent-soft);color:var(--text)}.notif-pop-item+ .notif-pop-item{margin-top:3px}.notif-pop-item time{display:block;margin-top:4px;color:var(--text-muted);font-size:.68rem}.notif-pop-empty{padding:22px 8px;text-align:center;color:var(--text-muted);font-size:.8rem}
.pf-cover-settings{display:flex;gap:16px;align-items:center;margin-bottom:18px}.pf-cover-preview{width:240px;height:82px;border-radius:12px;border:1px solid var(--border);background:linear-gradient(135deg,#151515,#292929);background-size:cover;background-position:center}.media-review-row{display:grid;grid-template-columns:180px 1fr auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}.media-review-row:last-child{border-bottom:0}.media-review-user span{display:block;margin-top:3px;color:var(--muted);font-size:12px}.media-review-previews{display:flex;gap:10px;flex-wrap:wrap}.media-review-previews>div{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:11px}.media-review-previews img{width:64px;height:64px;object-fit:cover;border-radius:10px;border:1px solid var(--border)}.media-review-previews .media-cover-thumb img{width:150px}.media-review-actions{display:flex;gap:8px}.media-review-actions .btn{white-space:nowrap}
@media(max-width:760px){.notif-popover{position:fixed;top:68px;left:12px;right:12px;width:auto}.profile-popover{right:0}.pf-cover-settings{align-items:flex-start;flex-direction:column}.media-review-row{grid-template-columns:1fr}.media-review-actions{width:100%}.media-review-actions .btn{flex:1}}

/* Отдельная страница настроек и уведомления */
.notif-pop-item{display:block;width:100%;border:0;text-align:left;background:transparent;cursor:pointer;font:inherit}
.notif-pop-item:hover{background:var(--surface-3)}
.pf-page-head{display:flex;justify-content:space-between;align-items:flex-end;margin:8px 0 24px}
.pf-page-head h1{margin:8px 0 4px;font-size:28px}.pf-page-head p{margin:0;color:var(--muted);font-size:14px}
.pf-back{color:var(--muted);font-size:13px;text-decoration:none}.pf-back:hover{color:var(--text)}
.pf-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.settings-pending,.settings-approved{margin-top:14px;padding:10px 12px;border-radius:10px;background:var(--accent-soft);font-size:13px;color:var(--text-soft)}
@media(max-width:800px){.pf-settings-grid{grid-template-columns:1fr}}


/* Редактор аватара и шапки */
.media-crop-modal{position:fixed;inset:0;z-index:500;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.72)}
.media-crop-dialog{width:min(820px,96vw);max-height:92vh;overflow:auto;background:var(--surface);border:1px solid var(--border-light);border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.55);padding:20px}
.media-crop-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:16px}.media-crop-head h3{margin:0 0 5px}.media-crop-head p{margin:0;color:var(--muted);font-size:13px}.media-crop-close{border:0;background:transparent;color:var(--muted);font-size:28px;cursor:pointer;line-height:1}
.media-crop-stage{position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:14px;background:#090909;border:1px solid var(--border);padding:12px}.media-crop-grid{position:absolute;inset:12px;pointer-events:none;opacity:.65}.media-crop-grid i{position:absolute;display:block;background:rgba(255,255,255,.32)}.media-crop-grid i:nth-child(1),.media-crop-grid i:nth-child(2){top:0;bottom:0;width:1px}.media-crop-grid i:nth-child(1){left:33.333%}.media-crop-grid i:nth-child(2){left:66.666%}.media-crop-grid i:nth-child(3),.media-crop-grid i:nth-child(4){left:0;right:0;height:1px}.media-crop-grid i:nth-child(3){top:33.333%}.media-crop-grid i:nth-child(4){top:66.666%}.media-crop-stage canvas{display:block;max-width:100%;height:auto;cursor:grab;touch-action:none}.media-crop-stage canvas:active{cursor:grabbing}.media-crop-stage.is-avatar canvas{width:min(320px,70vw);height:min(320px,70vw)}.media-crop-stage.is-cover{aspect-ratio:8/1; padding:0;}.media-crop-stage.is-cover canvas{width:100%;height:auto;aspect-ratio:8/1}
.media-crop-controls{display:flex;align-items:center;gap:14px;margin-top:14px}.media-crop-controls label{display:flex;align-items:center;gap:10px;flex:1;font-size:13px;color:var(--muted)}.media-crop-controls input[type=range]{flex:1}.media-crop-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.chat-avatar img,.chat-peer [data-peer-avatar] img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.msg-img{max-width:min(360px,70vw);max-height:360px;object-fit:contain;background:#0b0b0b}

/* Profile refinements vNext */
.pf-cover { height:180px; background-size:cover; background-position:center; background-repeat:no-repeat; background-color:var(--surface-2); }
.pf-hero-body { margin-top:-48px; padding-bottom:22px; }
.pf-id { padding-top:54px; }
.pf-cols.pf-complete { grid-template-columns:minmax(0,1fr); }
.pf-complete .pf-main { width:100%; }
.pf-complete .pf-card { width:100%; }
@media (max-width:760px){ .pf-cover{height:140px;} .pf-hero-body{margin-top:-38px;} .pf-id{padding-top:44px;} }
.admin-user-manage{display:flex;flex-direction:column;gap:14px}.user-head-main{min-width:0}.admin-user-bio{padding:12px 14px;border:1px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface)}.admin-user-quick{display:flex;flex-wrap:wrap;gap:8px}.admin-user-role,.admin-user-media{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.admin-user-role>div,.admin-user-media>b{display:flex;flex-direction:column;gap:4px}.admin-user-role span,.admin-user-media span{font-size:12px;color:var(--muted);font-weight:400}.admin-user-role .select-input{width:190px}.admin-user-media{flex-wrap:wrap}.admin-user-media button{margin-left:auto}@media(max-width:700px){.admin-user-role,.admin-user-media{align-items:stretch;flex-direction:column}.admin-user-role .select-input{width:100%}.admin-user-media button{margin-left:0}.user-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* TFD Market UX polish vNext */
.select-input {
    cursor:pointer;
    padding-right:38px;
    background-image:linear-gradient(45deg,transparent 50%,#777 50%),linear-gradient(135deg,#777 50%,transparent 50%);
    background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px;
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}
.select-input:hover { border-color:#353535; background-color:#111; }
.select-input:focus { transform:translateY(-1px); }
.filter-group { transition:padding .22s ease, opacity .22s ease; }
.filter-stage-group:not(.is-relevant) { display:none; }
.check-row { padding:7px 9px; border:1px solid transparent; border-radius:9px; transition:.18s ease; }
.check-row:hover { background:var(--surface-2); border-color:var(--border); }
.check-row input { width:15px;height:15px; }
.catalog-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.catalog-total-card { min-width:190px; padding:14px 17px; border:1px solid var(--accent-border); border-radius:15px; background:linear-gradient(145deg,rgba(244,162,97,.10),rgba(255,255,255,.02)); box-shadow:0 12px 35px rgba(0,0,0,.18); }
.catalog-total-card span,.catalog-total-card small { display:block; color:var(--text-muted); font-size:.68rem; }
.catalog-total-card strong { display:block; margin:3px 0 1px; color:#fff; font-size:1.75rem; line-height:1; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.catalog-total-card.count-pop strong { animation:catalogCountPop .42s ease; }
@keyframes catalogCountPop { 0%{transform:scale(.88);opacity:.4} 65%{transform:scale(1.07)} 100%{transform:scale(1);opacity:1} }
.result-count strong { display:inline-block; min-width:20px; font-variant-numeric:tabular-nums; }
.result-count.count-pop { animation:resultCountPop .42s ease; }
@keyframes resultCountPop { 0%{transform:translateY(3px);opacity:.35} 100%{transform:none;opacity:1} }

/* Объединённый блок на странице объявления */
.detail-unified-card { margin-top:14px; padding:22px; overflow:hidden; background:linear-gradient(145deg,#151515,#0f0f0f); }
.detail-unified-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }
.detail-unified-head h2 { margin-top:4px; font-size:1.08rem; }
.detail-kicker { color:var(--accent-light); font-size:.61rem; letter-spacing:.08em; text-transform:uppercase; }
.detail-unified-icon { display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--accent-border);border-radius:10px;color:var(--accent-light);background:var(--accent-soft);font-weight:800; }
.detail-unified-description { margin:16px 0 18px; padding-bottom:18px; border-bottom:1px solid var(--border); color:var(--text-soft); line-height:1.72; }
.detail-info-list-unified { margin-top:0; grid-template-columns:repeat(4,minmax(0,1fr)); }
.detail-info-list-unified > div { transition:.2s ease; }
.detail-info-list-unified > div:hover { border-color:var(--accent-border); transform:translateY(-1px); }

/* Последовательные стейджи */
.stage-flow { padding:16px; border:1px solid var(--border); border-radius:15px; background:linear-gradient(145deg,#111,#0c0c0c); }
.stage-flow-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:12px; }
.stage-flow-head label { display:block; margin:0; }
.stage-flow-head small { display:block; margin-top:3px; color:var(--muted); font-size:.68rem; }
.stage-flow-head > span { color:var(--accent-light); font-size:.65rem; white-space:nowrap; }
.stage-flow-list { display:flex; flex-direction:column; gap:8px; }
.stage-step { display:grid; grid-template-columns:32px 1fr; gap:10px; padding:10px; border:1px solid #222; border-radius:12px; background:#0d0d0d; animation:stageReveal .28s ease both; }
.stage-step[hidden] { display:none; }
.stage-step.is-open { border-color:var(--accent-border); }
.stage-step.is-done { border-color:rgba(121,214,157,.24); }
.stage-step-marker { width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#191919;color:#777;font-weight:800; }
.stage-step.is-open .stage-step-marker { background:var(--accent-soft);color:var(--accent-light); }
.stage-step.is-done .stage-step-marker { background:var(--success-soft);color:var(--success); }
.stage-step-main { min-width:0; }
.stage-step-title { display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px; }
.stage-step-title b { font-size:.74rem; }
.stage-step-title small { color:var(--muted);font-size:.63rem; }
@keyframes stageReveal { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:none} }

/* Шапка: быстрый плюс создания */
.nav-create-hidden { display:none !important; }
.create-plus-btn { width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;gap:0;border:1px solid rgba(244,162,97,.45);border-radius:11px;background:linear-gradient(145deg,var(--accent),#d77a3d);color:#101010;text-decoration:none;box-shadow:0 8px 22px rgba(244,162,97,.13);transition:.2s ease;position:relative;overflow:hidden; }
.create-plus-btn span { font-size:1.4rem;font-weight:500;line-height:1; }
.create-plus-btn em { position:absolute;left:50%;top:calc(100% + 7px);transform:translate(-50%,-4px);padding:4px 7px;border-radius:6px;background:#171717;color:#fff;font-size:.58rem;font-style:normal;white-space:nowrap;opacity:0;pointer-events:none;transition:.18s; }
.create-plus-btn:hover { transform:translateY(-2px) rotate(2deg);box-shadow:0 11px 28px rgba(244,162,97,.22); }
.create-plus-btn:hover em { opacity:1;transform:translate(-50%,0); }
.mobile-create-link { color:var(--accent-light) !important; }

/* Профиль — более понятная иерархия */
.pf-hero { box-shadow:0 14px 45px rgba(0,0,0,.16); }
.pf-stats { position:relative; }
.pf-stat { transition:.2s ease; }
.pf-stat:hover { border-color:var(--accent-border); transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.15); }
.pf-card { box-shadow:0 8px 30px rgba(0,0,0,.10); }
.pf-card-head h2 { letter-spacing:-.01em; }
.pf-attn { min-height:58px; }
.pf-tabs { box-shadow:0 10px 30px rgba(0,0,0,.12); }
@media(max-width:760px){
 .catalog-page-head { align-items:stretch; flex-direction:column; }
 .catalog-total-card { width:100%; }
 .detail-info-list-unified { grid-template-columns:1fr 1fr; }
 .stage-flow-head { align-items:flex-start; flex-direction:column; }
 .create-plus-btn { width:36px;height:36px; }
}

/* Админка — плотнее, информативнее, с визуальной иерархией */
.admin-section { box-shadow:0 8px 28px rgba(0,0,0,.10); }
.admin-stat { position:relative; overflow:hidden; transition:.2s ease; }
.admin-stat:after { content:""; position:absolute; inset:auto -25px -35px auto; width:90px;height:90px;border-radius:50%;background:var(--accent-soft);filter:blur(4px); }
.admin-stat:hover { transform:translateY(-2px); border-color:var(--accent-border); }
.admin-tools { padding:11px; border:1px solid var(--border); border-radius:14px; background:linear-gradient(145deg,#121212,#0e0e0e); box-shadow:0 8px 25px rgba(0,0,0,.12); }
.admin-row { transition:.18s ease; }
.admin-row:hover { border-color:var(--accent-border); transform:translateY(-1px); }
.bar-row { padding:7px 0; }
@media(max-width:760px){ .detail-info-list-unified{grid-template-columns:1fr;} .admin-tools{grid-template-columns:1fr;} }

.admin-quick-grid{margin-top:14px}.admin-quick-actions{display:flex;flex-wrap:wrap;gap:8px}.admin-quick-actions .btn{flex:1 1 150px}.admin-quick-grid .admin-section{min-height:100%;}

/* ===== Окно «Что нового» ===== */
.release-backdrop{
    position:fixed;inset:0;z-index:900;display:grid;place-items:center;padding:18px;
    background:rgba(3,5,7,.78);backdrop-filter:blur(10px);
    opacity:0;transition:opacity .18s ease;
}
.release-backdrop.is-visible{opacity:1}
.release-backdrop.is-closing{opacity:0}
.release-dialog{
    position:relative;width:min(650px,96vw);max-height:min(760px,92vh);display:flex;flex-direction:column;
    overflow:hidden;background:linear-gradient(180deg,#11161d 0%,#0e1218 100%);
    border:1px solid rgba(255,255,255,.10);border-radius:20px;
    box-shadow:0 28px 90px rgba(0,0,0,.58),0 0 0 1px rgba(244,162,97,.04);
    transform:translateY(14px) scale(.985);opacity:0;transition:transform .22s ease,opacity .22s ease;
}
.release-backdrop.is-visible .release-dialog{transform:translateY(0) scale(1);opacity:1}
.release-close{
    position:absolute;right:13px;top:11px;width:38px;height:38px;border:0;border-radius:11px;
    background:transparent;color:#77808d;font-size:29px;line-height:1;cursor:pointer;transition:.18s ease;z-index:2
}
.release-close:hover{background:rgba(255,255,255,.06);color:#fff;transform:rotate(4deg)}
.release-head{display:flex;align-items:center;gap:14px;padding:24px 52px 18px 24px}
.release-icon{
    width:46px;height:46px;display:grid;place-items:center;border-radius:14px;flex:0 0 46px;
    color:#0b1110;background:linear-gradient(135deg,#f4a261,#e9c46a);font-size:24px;
    box-shadow:0 8px 26px rgba(244,162,97,.18)
}
.release-kicker{font-size:11px;line-height:1.2;font-weight:800;letter-spacing:.11em;color:#f4a261;text-transform:uppercase;margin-bottom:5px}
.release-head h2{margin:0;color:#f5f7fa;font-size:22px;line-height:1.2}
.release-version-row{display:flex;align-items:center;gap:9px;padding:0 24px 16px}
.release-version{display:inline-flex;align-items:center;padding:6px 10px;border-radius:8px;background:rgba(244,162,97,.11);border:1px solid rgba(244,162,97,.25);color:#f4a261;font-size:12px;font-weight:800}
.release-date{color:#a5adba;font-size:12px;font-weight:600}
.release-scroll{margin:0 24px;overflow:auto;min-height:120px;max-height:430px;padding:2px 8px 4px 0;scrollbar-width:thin;scrollbar-color:#3a424d transparent}
.release-scroll::-webkit-scrollbar{width:5px}.release-scroll::-webkit-scrollbar-thumb{background:#3a424d;border-radius:99px}
.release-section{padding:15px 14px;border:1px solid rgba(255,255,255,.07);border-radius:14px;background:rgba(255,255,255,.025)}
.release-section+.release-section{margin-top:10px}
.release-section-title{font-size:14px;font-weight:800;color:#f2f4f7;margin-bottom:10px}
.release-items{display:grid;gap:8px}
.release-item{display:flex;align-items:flex-start;gap:9px;color:#b9c0ca;font-size:13px;line-height:1.55}
.release-dot{width:6px;height:6px;flex:0 0 6px;margin-top:7px;border-radius:50%;background:#f4a261;box-shadow:0 0 0 4px rgba(244,162,97,.08)}
.release-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;padding:17px 24px 22px;border-top:1px solid rgba(255,255,255,.07)}
.release-thanks{display:flex;flex-direction:column;gap:3px;min-width:0;color:#aab2bd;font-size:12px;line-height:1.45}.release-thanks b{color:#e8ebef;font-size:13px}
.release-ok{min-width:118px}
@media(max-width:560px){
    .release-backdrop{padding:10px}.release-dialog{max-height:94vh;border-radius:17px}.release-head{padding:20px 48px 15px 18px}.release-icon{width:40px;height:40px;flex-basis:40px;font-size:21px}.release-head h2{font-size:19px}.release-version-row{padding:0 18px 13px}.release-scroll{margin:0 18px;max-height:55vh}.release-footer{padding:14px 18px 18px;align-items:stretch;flex-direction:column}.release-ok{width:100%}
}
@media(prefers-reduced-motion:reduce){.release-backdrop,.release-dialog{transition:none}}


/* TFD Market — custom filters & dropdowns */
.filter-options {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.filter-stage-group .filter-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
.check-row {
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:0 11px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:12px;
  background:linear-gradient(145deg,#141619,#101113);
  color:#b9bec7;
  font-size:.72rem;
  font-weight:650;
  cursor:pointer;
  user-select:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease;
}
.check-row:hover { transform:translateY(-1px); border-color:rgba(244,162,97,.28); color:#eee; box-shadow:0 8px 22px rgba(0,0,0,.18); }
.check-row input {
  position:absolute;
  width:1px;height:1px;
  opacity:0;
  pointer-events:none;
}
.check-row::before {
  content:'';
  flex:0 0 17px;
  width:17px;height:17px;
  border:1px solid #343940;
  border-radius:6px;
  background:#0b0d0f;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.4);
  transition:all .18s ease;
}
.check-row::after {
  content:'✓';
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%) scale(.45);
  opacity:0;
  color:#111;
  font-size:.67rem;
  font-weight:900;
  transition:all .18s cubic-bezier(.2,.8,.2,1);
}
.check-row:has(input:checked) {
  border-color:rgba(244,162,97,.42);
  background:linear-gradient(145deg,rgba(244,162,97,.15),rgba(244,162,97,.055));
  color:#fff;
  box-shadow:0 8px 24px rgba(244,162,97,.08);
}
.check-row:has(input:checked)::before { border-color:#f4a261; background:#f4a261; transform:scale(1.04); }
.check-row:has(input:checked)::after { opacity:1; transform:translateY(-50%) scale(1); }

.tfd-select { position:relative; width:100%; }
.tfd-select > .select-input {
  position:absolute !important;
  inset:0;
  width:100%;height:100%;
  opacity:0 !important;
  pointer-events:none !important;
  margin:0;
}
.tfd-select-trigger {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:43px;
  padding:0 13px 0 13px;
  border:1px solid #282c31;
  border-radius:12px;
  background:linear-gradient(145deg,#15171a,#101214);
  color:#e9eaed;
  cursor:pointer;
  text-align:left;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 4px 14px rgba(0,0,0,.12);
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.tfd-select-trigger:hover { transform:translateY(-1px); border-color:#3b4047; background:linear-gradient(145deg,#181a1d,#121417); box-shadow:0 10px 24px rgba(0,0,0,.2); }
.tfd-select.is-disabled .tfd-select-trigger { opacity:.48; cursor:not-allowed; transform:none; box-shadow:none; }
.tfd-select.is-disabled .tfd-select-menu { display:none; }
.tfd-select.is-open .tfd-select-trigger { border-color:rgba(244,162,97,.48); box-shadow:0 0 0 3px rgba(244,162,97,.07),0 12px 28px rgba(0,0,0,.25); }
.tfd-select-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; font-weight:650; }
.tfd-select-arrow { width:9px;height:9px; margin-left:12px; border-right:1.5px solid #8e949d; border-bottom:1.5px solid #8e949d; transform:rotate(45deg) translateY(-2px); transition:transform .2s ease,border-color .2s ease; }
.tfd-select.is-open .tfd-select-arrow { transform:rotate(225deg) translate(-1px,-1px); border-color:#f4a261; }
.tfd-select-menu {
  position:absolute;
  left:0;right:0;top:calc(100% + 7px);
  z-index:9999;
  padding:6px;
  border:1px solid #343a42;
  border-radius:14px;
  background:#111416;
  background-image:linear-gradient(180deg,#121519,#0e1114);
  box-shadow:0 22px 60px rgba(0,0,0,.62),0 0 0 1px rgba(255,255,255,.025);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  opacity:0;
  visibility:hidden;
  transform:translateY(-7px) scale(.985);
  transform-origin:top center;
  transition:opacity .16s ease,transform .18s cubic-bezier(.2,.8,.2,1),visibility .16s ease;
  max-height:280px;
  overflow:auto;
}
.tfd-select.is-open .tfd-select-menu { opacity:1;visibility:visible;transform:translateY(0) scale(1); }
.tfd-select-option {
  display:flex;align-items:center;justify-content:space-between;
  width:100%;min-height:38px;
  padding:0 10px;
  border:0;border-radius:9px;
  background:transparent;
  color:#b9bec6;
  font-size:.75rem;font-weight:600;
  cursor:pointer;
  text-align:left;
  transition:background .14s ease,color .14s ease,transform .14s ease;
}
.tfd-select-option:hover { background:#1b1e22;color:#fff;transform:translateX(2px); }
.tfd-select-option.is-selected { background:rgba(244,162,97,.10);color:#f4a261; }
.tfd-select-option.is-selected::after { content:'✓'; font-size:.7rem; }
.tfd-select-option:active { transform:scale(.985); }
.tfd-select-option:disabled { opacity:.45; cursor:not-allowed; transform:none !important; }


@media(max-width:700px){
  .filter-options,.filter-stage-group .filter-options { grid-template-columns:1fr; }
}
.tfd-select:has(.sort-select){min-width:170px;}
.market-toolbar .tfd-select{width:auto;min-width:170px;}
@media(max-width:760px){.market-toolbar .tfd-select{flex:1;min-width:0;width:100%;}}

/* Sequential vehicle stage filter */
.stage-filter-flow{display:grid;gap:9px;margin-top:8px}
.stage-filter-step{position:relative;z-index:1;display:grid;grid-template-columns:28px 1fr;gap:9px;align-items:center;opacity:.52;transform:translateY(-2px);transition:opacity .22s ease,transform .22s ease,filter .22s ease}
.stage-filter-step.is-open{z-index:50;opacity:1;transform:translateY(0)}
.stage-filter-step>div{min-width:0}
.stage-filter-step small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 4px 2px}
.stage-filter-num{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;font-size:12px;font-weight:800;background:rgba(255,255,255,.045);border:1px solid var(--line);color:var(--muted);transition:.22s ease}
.stage-filter-step.is-open .stage-filter-num{color:#fff;border-color:rgba(244,162,97,.5);background:rgba(244,162,97,.12);box-shadow:0 0 18px rgba(244,162,97,.08)}
.stage-filter-step .select-input:disabled{opacity:.42;cursor:not-allowed}
.stage-filter-step .select-input{width:100%}
@media(max-width:700px){.stage-filter-step{grid-template-columns:25px 1fr}.stage-filter-num{width:25px;height:25px;border-radius:8px}}

/* Sequential stage filter + plate choices */
.stage-filter-actions{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 10px}
.stage-mode-btn{appearance:none;border:1px solid var(--line);background:#111318;color:#aeb4bf;border-radius:10px;padding:8px 10px;font:700 11px Inter,sans-serif;cursor:pointer;transition:.2s ease}
.stage-mode-btn:hover{border-color:rgba(244,162,97,.35);color:#fff;transform:translateY(-1px)}
.stage-mode-btn.active{color:#fff;background:rgba(244,162,97,.1);border-color:rgba(244,162,97,.5);box-shadow:0 0 18px rgba(244,162,97,.08)}
.stage-filter-step.is-hidden-step{display:none!important}
.stage-filter-step{z-index:1}
.stage-filter-step.is-open{z-index:20}
.plate-filter-group{display:block}
.choice-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:8px}
.choice-card{position:relative;display:flex;flex-direction:column;gap:3px;padding:12px 14px;border:1px solid var(--line);border-radius:13px;background:#111318;color:#c7cbd2;cursor:pointer;transition:.2s ease}
.choice-card:hover{border-color:rgba(244,162,97,.35);transform:translateY(-1px)}
.choice-card.active{border-color:rgba(244,162,97,.55);background:rgba(244,162,97,.08);color:#fff;box-shadow:0 0 20px rgba(244,162,97,.07)}
.choice-card input{position:absolute;opacity:0;pointer-events:none}
.choice-card span{font-weight:800;font-size:13px}.choice-card small{color:var(--muted);font-size:10px}
@media(max-width:700px){.choice-row{grid-template-columns:1fr}.stage-filter-actions{display:grid;grid-template-columns:1fr 1fr}.stage-mode-btn{width:100%}}
.plate-filter-group:not(.is-relevant){display:none}

/* Stage filter: открытое меню всегда поверх следующих уровней */
.stage-filter-step { position:relative; }
.stage-filter-step:has(.tfd-select.is-open) { z-index:100000 !important; }
.stage-filter-step:has(.tfd-select.is-open) .tfd-select { z-index:100001 !important; }
.stage-filter-step .tfd-select-menu {
  z-index:100002 !important;
  background:#0d1013 !important;
  background-image:linear-gradient(180deg,#121519 0%,#0d1013 100%) !important;
  opacity:0;
  pointer-events:none;
  isolation:isolate;
}
.stage-filter-step .tfd-select.is-open .tfd-select-menu { opacity:1; pointer-events:auto; }
.stage-filter-step .tfd-select-option { background-color:transparent; }
.stage-filter-step .tfd-select-option:hover { background:#1b1f24; }
.stage-filter-step .tfd-select-trigger { position:relative; z-index:100003; }


/* ===== История цены: график ===== */
.market-periods { overflow-x:auto; flex-wrap:nowrap !important; scrollbar-width:none; }
.market-period { flex:none; white-space:nowrap; }
.ph-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.ph-summary > div { padding:10px 12px; border:1px solid var(--border,#2a2a2a); border-radius:12px; background:rgba(255,255,255,.02); }
.ph-summary b, .ph-summary span { display:block; }
.ph-summary b { font-size:.85rem; color:#fff; }
.ph-summary span { margin-top:2px; color:var(--text-muted,#888); font-size:.66rem; }
.ph-change.up { color:var(--danger,#e87878); }
.ph-change.down { color:var(--success,#79d69d); }
.ph-chart { position:relative; min-height:200px; }
.ph-svg { display:block; touch-action:pan-y; overflow:visible; }
.ph-grid { stroke:#222; stroke-width:1; }
.ph-axis { stroke:#333; stroke-width:1; }
.ph-label { fill:var(--text-muted,#888); font-size:10.5px; }
.ph-line { fill:none; stroke:var(--accent,#f4a261); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.ph-dot { fill:var(--accent,#f4a261); stroke:#111; stroke-width:2.5; }
.ph-cursor { stroke:rgba(244,162,97,.35); stroke-width:1; stroke-dasharray:3 3; }
.ph-hover { fill:#111; stroke:var(--accent-light,#ffbc82); stroke-width:2.2; }
.ph-tip { position:absolute; z-index:2; display:flex; flex-direction:column; gap:1px; padding:7px 11px; border:1px solid #333; border-radius:10px; background:#181818; box-shadow:0 14px 36px rgba(0,0,0,.28); pointer-events:none; white-space:nowrap; }
.ph-tip b { color:#fff; font-size:.8rem; }
.ph-tip span { color:var(--text-muted,#888); font-size:.68rem; }
@media (max-width:760px) { .ph-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.ph-cursor[hidden], .ph-hover[hidden], .ph-tip[hidden] { display:none; }

/* график не должен раздвигать колонку на узких экранах */
.detail-left, .market-analytics, .ph-chart { min-width:0; }
.ph-chart { overflow:hidden; }
.ph-svg { max-width:100%; }

/* страница объявления: на планшете и телефоне одна колонка (premium-правило раньше перебивало это) */
@media (max-width:1050px) {
    .detail-layout-premium { grid-template-columns:minmax(0,1fr); }
}

/* Listing seller avatar */
.seller-box-avatar{overflow:hidden;display:flex;align-items:center;justify-content:center}
.seller-box-avatar img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}

/* ===== Premium auth ===== */
.auth-backdrop{background:rgba(3,4,5,.84);backdrop-filter:blur(14px);padding:20px}
.auth-dialog{position:relative;width:min(460px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:30px;border:1px solid rgba(255,255,255,.09);border-radius:24px;background:linear-gradient(145deg,#151515,#0d0d0d);box-shadow:0 35px 100px rgba(0,0,0,.62);animation:auth-in .25s ease-out}
@keyframes auth-in{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}
.auth-close{position:absolute;right:16px;top:15px;width:34px;height:34px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:#181818;color:#aaa;font-size:22px;line-height:1;cursor:pointer;transition:.2s}.auth-close:hover{color:#fff;background:#222;transform:rotate(3deg)}
.auth-brand{display:flex;align-items:center;gap:12px;padding-right:40px}.auth-brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:linear-gradient(135deg,#f4a261,#e76f51);color:#111;font-size:12px;font-weight:900;letter-spacing:-.4px;box-shadow:0 8px 25px rgba(244,162,97,.18)}.auth-brand b{display:block;font-size:15px;color:#fff}.auth-brand small{display:block;margin-top:3px;color:#777;font-size:11px}
.auth-hero{margin:28px 0 20px}.auth-kicker{margin-bottom:8px;color:#f4a261;font-size:10px;font-weight:800;letter-spacing:1.7px}.auth-hero h2{margin:0;color:#fff;font-size:27px;letter-spacing:-.6px}.auth-hero p{max-width:390px;margin:8px 0 0;color:#858585;font-size:13px;line-height:1.55}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;margin-bottom:20px;border:1px solid #242424;border-radius:13px;background:#0a0a0a}.auth-tab{padding:10px;border:0;border-radius:9px;background:transparent;color:#777;font-weight:700;font-size:12px;cursor:pointer;transition:.2s}.auth-tab:hover{color:#ddd}.auth-tab.is-active{background:#202020;color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.25)}
.auth-form{display:grid;gap:15px}.auth-form .field{gap:7px}.auth-form label{font-size:11px;font-weight:700;color:#bdbdbd}.auth-input-wrap,.auth-password-wrap{position:relative}.auth-input-wrap>span{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#666;font-size:13px;z-index:1}.auth-input-wrap .input{padding-left:28px}.auth-password-wrap .input{padding-right:44px}.auth-eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:#666;cursor:pointer}.auth-eye:hover{background:#1b1b1b;color:#ddd}.auth-form .input{height:45px;border-radius:11px;background:#101010;border-color:#292929;color:#fff}.auth-form .input:focus{border-color:#f4a261;box-shadow:0 0 0 3px rgba(244,162,97,.09)}.auth-form .field-hint{margin-top:0;color:#5f5f5f;font-size:10px}.auth-extra{display:flex;justify-content:flex-end;margin-top:-3px}.auth-link{padding:0;border:0;background:none;color:#f4a261;font-size:11px;cursor:pointer}.auth-link:hover{text-decoration:underline}.auth-submit{display:flex;align-items:center;justify-content:space-between;width:100%;height:47px;margin-top:3px;padding:0 15px 0 18px;border:0;border-radius:12px;background:linear-gradient(135deg,#f4a261,#e76f51);color:#111;font-size:13px;font-weight:850;cursor:pointer;box-shadow:0 10px 25px rgba(231,111,81,.14);transition:.2s}.auth-submit b{font-size:19px;font-weight:500}.auth-submit:hover{transform:translateY(-1px);box-shadow:0 13px 30px rgba(231,111,81,.2)}.auth-submit:active{transform:translateY(0)}
.auth-error{padding:10px 12px;border:1px solid rgba(231,111,81,.25);border-radius:10px;background:rgba(231,111,81,.08);color:#ff9b83;font-size:11px;line-height:1.45}.auth-footnote{margin-top:16px;color:#555;text-align:center;font-size:9px;line-height:1.5}.auth-recovery-field{display:block}.auth-recovery-field[hidden]{display:none!important}
@media(max-width:581px){.auth-backdrop{padding:10px}.auth-dialog{padding:23px 18px;border-radius:20px;max-height:calc(100vh - 20px)}.auth-hero{margin-top:23px}.auth-hero h2{font-size:24px}.auth-brand-mark{width:40px;height:40px}}
@media(prefers-reduced-motion:reduce){.auth-dialog{animation:none}.auth-submit,.auth-close{transition:none}}

/* Stage 1 auth polish */
.auth-email-field .field-hint{max-width:100%;line-height:1.45}
.auth-password-strength{font-size:10px;margin-top:-2px;line-height:1.35}
.auth-password-strength[data-level="bad"]{color:#ff8f78}
.auth-password-strength[data-level="mid"]{color:#e9c46a}
.auth-password-strength[data-level="good"]{color:#83d39c}
.auth-success{padding:12px 2px 2px;text-align:center}
.auth-success-icon{width:56px;height:56px;margin:0 auto 16px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:rgba(244,162,97,.12);border:1px solid rgba(244,162,97,.28);color:#f4a261;font-size:27px;font-weight:900}
.auth-success h2{margin:8px 0 10px;font-size:25px;letter-spacing:-.4px}
.auth-success p{margin:0 auto 18px;max-width:360px;color:#888;font-size:11px;line-height:1.6}
.auth-code-card{padding:16px;border:1px solid #292929;border-radius:15px;background:#0a0a0a;text-align:left;margin:0 0 16px}
.auth-code-card span{display:block;color:#777;font-size:10px;margin-bottom:7px}
.auth-code-card strong{display:block;color:#fff;font-size:19px;letter-spacing:1.4px;word-break:break-all;margin-bottom:12px}
.auth-code-card .btn{width:100%}


/* ===== Stage 2 UI polish ===== */
.modal-backdrop.auth-backdrop{
    z-index:11000;
    overflow:auto;
    box-sizing:border-box;
    min-height:100vh;
    align-items:center;
}
.auth-dialog{
    margin:auto;
    box-sizing:border-box;
}

/* Привязанные аккаунты — единый premium-блок */
.pf-acc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pf-acc-card{
    position:relative;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:14px;align-items:center;
    min-width:0;padding:18px;border:1px solid #292929;border-radius:16px;background:linear-gradient(145deg,#151515,#101010);
    transition:border-color .2s ease,transform .2s ease,background .2s ease,box-shadow .2s ease;
}
.pf-acc-card:hover{border-color:#3a3a3a;background:linear-gradient(145deg,#181818,#111);transform:translateY(-1px);box-shadow:0 12px 28px rgba(0,0,0,.22)}
.pf-acc-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;color:#fff;font-size:14px;font-weight:850;letter-spacing:.2px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.pf-acc-card:nth-child(1) .pf-acc-icon{background:linear-gradient(145deg,#1687ff,#0064d8)}
.pf-acc-card:nth-child(2) .pf-acc-icon{background:linear-gradient(145deg,#6973ff,#4d56d8)}
.pf-acc-info{min-width:0}
.pf-acc-info b{display:block;color:#fff;font-size:14px;line-height:1.2}
.pf-acc-info span{display:block;margin-top:6px;color:#777;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.pf-acc-info strong{color:#79d69d;font-weight:700}
.pf-acc-btns{display:flex;align-items:center;justify-content:flex-end}
.pf-acc-btns .btn{min-width:92px}
.pf-acc-card .pf-switch{grid-column:1/-1;margin:2px 0 0;padding:13px 0 0;border-top:1px solid #252525;display:flex;align-items:center;gap:9px;color:#999;font-size:11px;line-height:1.35}
.pf-acc-card .pf-switch input{flex:none}
@media(max-width:800px){.pf-acc-grid{grid-template-columns:1fr}.pf-acc-card{grid-template-columns:48px minmax(0,1fr) auto}.pf-acc-icon{width:48px;height:48px}}
@media(max-width:520px){.pf-acc-card{grid-template-columns:46px minmax(0,1fr);gap:12px}.pf-acc-btns{grid-column:2;justify-content:flex-start}.pf-acc-btns .btn{width:100%}.pf-acc-card .pf-switch{grid-column:1/-1}}

/* Небольшая полировка профиля и карточек */
.pf-stats{margin-top:14px}
.pf-stat{transition:transform .18s ease,border-color .18s ease,background .18s ease}
.pf-stat:hover{transform:translateY(-2px);border-color:#343434;background:#151515}
.listing-card{transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.listing-card:hover{transform:translateY(-3px);box-shadow:0 18px 42px rgba(0,0,0,.24)}
.btn,.icon-btn,.user-button,.favorite-btn{transition:transform .16s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease}
.btn:active,.icon-btn:active,.user-button:active,.favorite-btn:active{transform:scale(.98)}
@media(prefers-reduced-motion:reduce){.pf-acc-card,.pf-stat,.listing-card,.btn,.icon-btn,.user-button,.favorite-btn{transition:none}.pf-acc-card:hover,.pf-stat:hover,.listing-card:hover{transform:none}}


/* ===== Stage 3: catalog media consistency ===== */
.listing-image{display:block;width:100%;height:auto;aspect-ratio:16/10;}
.listing-media-wrap{min-width:0;}
.listing-image img,.listing-image .listing-placeholder{display:block;width:100%;height:100%;min-height:0;}

/* ===== Listing gallery / lightbox ===== */
.detail-main-image{position:relative;display:block;width:100%;padding:0;border:0;cursor:zoom-in;color:inherit;text-align:inherit;background:#151515;}
.detail-main-image img{display:block;width:100%;height:100%;object-fit:cover;}
.detail-image-zoom{position:absolute;right:14px;top:14px;padding:7px 10px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(0,0,0,.58);color:#ddd;font-size:.62rem;opacity:0;transform:translateY(-4px);transition:.2s ease;pointer-events:none;backdrop-filter:blur(8px)}
.detail-main-image:hover .detail-image-zoom{opacity:1;transform:none}
.detail-engagement{grid-template-columns:repeat(3,1fr)}
.tfd-lightbox{position:fixed;inset:0;z-index:20000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.9);backdrop-filter:blur(12px)}
.tfd-lightbox-backdrop{position:absolute;inset:0}
.tfd-lightbox-inner{position:relative;z-index:1;width:min(1180px,94vw);height:min(86vh,820px);display:grid;grid-template-columns:58px minmax(0,1fr) 58px;align-items:center;gap:14px}
.tfd-lightbox-media{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(255,255,255,.1);border-radius:18px;background:#080808;box-shadow:0 35px 100px rgba(0,0,0,.55)}
.tfd-lightbox-media img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.tfd-lightbox-close,.tfd-lightbox-prev,.tfd-lightbox-next{position:relative;z-index:2;width:46px;height:46px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(18,18,18,.92);color:#fff;font-size:28px;cursor:pointer;box-shadow:0 12px 30px rgba(0,0,0,.3);transition:.2s ease}
.tfd-lightbox-close{position:absolute;right:14px;top:14px}
.tfd-lightbox-prev,.tfd-lightbox-next{justify-self:center}
.tfd-lightbox-close:hover,.tfd-lightbox-prev:hover,.tfd-lightbox-next:hover{border-color:rgba(244,162,97,.45);background:#1a1a1a;color:#f4a261;transform:translateY(-1px)}
.tfd-lightbox-count{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);padding:7px 11px;border-radius:999px;background:rgba(0,0,0,.65);border:1px solid rgba(255,255,255,.1);color:#ddd;font-size:.66rem}

/* ===== Stage 3: My listings redesign ===== */
.my-summary{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);gap:20px;margin:8px 0 20px;padding:24px;border:1px solid #242424;border-radius:22px;background:radial-gradient(circle at 90% 0%,rgba(244,162,97,.1),transparent 34%),linear-gradient(145deg,#151515,#0e0e0e);box-shadow:0 18px 55px rgba(0,0,0,.2)}
.my-summary-main h2{margin-top:7px;color:#fff;font-size:1.45rem;letter-spacing:-.5px}.my-summary-main p{max-width:610px;margin-top:8px;color:#777;font-size:.76rem;line-height:1.65}
.my-summary-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.my-summary-stats>div{padding:13px;border:1px solid #252525;border-radius:13px;background:#0b0b0b}.my-summary-stats b{display:block;color:#fff;font-size:1.05rem}.my-summary-stats span{display:block;margin-top:4px;color:#666;font-size:.64rem}
.my-tabs{padding:5px;border:1px solid #222;border-radius:14px;background:#0d0d0d;gap:5px;margin-bottom:18px}.my-tab{border:0;border-radius:9px;padding:9px 13px;background:transparent}.my-tab.active{background:linear-gradient(135deg,rgba(244,162,97,.16),rgba(231,111,81,.08));box-shadow:inset 0 0 0 1px rgba(244,162,97,.14)}
.my-list{gap:10px}.my-item-modern{grid-template-columns:190px minmax(0,1fr) 230px 180px;padding:10px;border-radius:18px;background:linear-gradient(145deg,#131313,#0e0e0e);border-color:#232323}.my-item-modern:hover{border-color:#383838;box-shadow:0 14px 34px rgba(0,0,0,.2)}
.my-thumb-modern{position:relative;aspect-ratio:16/10;border-radius:13px}.my-thumb-count{position:absolute;right:8px;bottom:8px;padding:5px 7px;border-radius:7px;background:rgba(0,0,0,.65);border:1px solid rgba(255,255,255,.1);color:#ddd;font-size:.58rem}
.my-info-modern{min-width:0;padding:4px 0}.my-modern-price{margin-top:8px;color:var(--accent-light);font-size:1rem;font-weight:800}.my-modern-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.my-modern-tags span{padding:5px 7px;border:1px solid #252525;border-radius:7px;color:#777;background:#0b0b0b;font-size:.6rem}.my-performance{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.my-performance>div{min-width:0;padding:10px 7px;border:1px solid #242424;border-radius:11px;background:#0b0b0b;text-align:center}.my-performance b{display:block;color:#eee;font-size:.82rem}.my-performance span{display:block;margin-top:4px;color:#5e5e5e;font-size:.54rem;line-height:1.2}.my-actions-modern{min-width:0;display:grid;grid-template-columns:1fr 1fr;gap:6px}.my-actions-modern .btn{min-width:0}.my-actions-modern .btn:last-child{grid-column:1/-1}
@media(max-width:1120px){.my-item-modern{grid-template-columns:160px minmax(0,1fr) 190px}.my-actions-modern{grid-column:2/-1;grid-template-columns:repeat(4,1fr)}}
@media(max-width:820px){.my-summary{grid-template-columns:1fr}.my-item-modern{grid-template-columns:135px minmax(0,1fr)}.my-performance{grid-column:1/-1}.my-actions-modern{grid-column:1/-1;grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.my-item-modern{grid-template-columns:1fr}.my-thumb-modern{aspect-ratio:16/9}.my-info-modern,.my-performance,.my-actions-modern{grid-column:auto}.my-performance{grid-template-columns:repeat(3,1fr)}.my-actions-modern{grid-template-columns:1fr}.my-actions-modern .btn:last-child{grid-column:auto}.my-summary{padding:18px}.my-summary-stats{grid-template-columns:repeat(2,1fr)}}

/* =========================================================
   CREATE — финальная подача объявления
   ========================================================= */
.stage-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stage-choice{position:relative;display:flex;align-items:center;gap:9px;min-height:46px;padding:0 11px;border:1px solid #292d32;border-radius:11px;background:linear-gradient(145deg,#14171a,#0f1113);color:#9da3ab;cursor:pointer;text-align:left;font:inherit;transition:transform .18s ease,border-color .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease}
.stage-choice:hover{transform:translateY(-1px);border-color:#3b4047;color:#fff;background:linear-gradient(145deg,#181b1e,#111417)}
.stage-choice.is-selected{border-color:rgba(244,162,97,.58);background:linear-gradient(145deg,rgba(244,162,97,.18),rgba(244,162,97,.07));color:#fff;box-shadow:0 8px 22px rgba(244,162,97,.08)}
.stage-choice-dot{width:10px;height:10px;flex:0 0 10px;border-radius:50%;border:1px solid #555d67;background:#171a1d;transition:.18s ease}
.stage-choice.is-selected .stage-choice-dot{border-color:#f4a261;background:#f4a261;box-shadow:0 0 0 3px rgba(244,162,97,.11)}
.stage-native-value{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.stage-step.is-done .stage-step-marker{box-shadow:0 0 0 3px rgba(121,214,157,.05)}
.plate-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:9px}
.plate-choice{position:relative;display:flex;align-items:center;gap:12px;min-height:76px;padding:12px 14px;border:1px solid #282c31;border-radius:14px;background:linear-gradient(145deg,#141619,#0f1113);color:#9ca2aa;cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease}
.plate-choice:hover{transform:translateY(-1px);border-color:#3b4047;color:#fff}
.plate-choice.active{border-color:rgba(244,162,97,.58);background:linear-gradient(145deg,rgba(244,162,97,.14),rgba(244,162,97,.045));color:#fff;box-shadow:0 10px 28px rgba(244,162,97,.07)}
.plate-choice input{position:absolute;opacity:0;pointer-events:none}
.plate-choice-icon{width:38px;height:38px;flex:0 0 38px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:#1b1e22;border:1px solid #30353b;color:#777;font-size:1rem;font-weight:900}
.plate-choice.active .plate-choice-icon{background:rgba(244,162,97,.12);border-color:rgba(244,162,97,.35);color:#f4a261}
.plate-choice-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.plate-choice-copy b{font-size:.77rem;color:inherit}
.plate-choice-copy small{font-size:.64rem;line-height:1.45;color:#696f77}
.plate-choice-check{margin-left:auto;width:20px;height:20px;flex:0 0 20px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#24282d;color:transparent;font-size:.62rem;font-weight:900;transition:.18s ease}
.plate-choice.active .plate-choice-check{background:#f4a261;color:#111}
.create-plus-btn{z-index:2}
@media(max-width:680px){.stage-choice-grid,.plate-choice-grid{grid-template-columns:1fr}.stage-choice{min-height:44px}.plate-choice{min-height:70px}}

/* =========================================================
   FOOTER — единый на всех страницах
   ========================================================= */
.footer{position:relative;margin-top:64px;border-top:1px solid rgba(255,255,255,.08);background:radial-gradient(circle at 18% 0%,rgba(244,162,97,.08),transparent 30%),linear-gradient(180deg,#090a0b,#050506);overflow:hidden}
.footer::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,transparent,rgba(244,162,97,.45),transparent)}
.footer-inner{display:grid;grid-template-columns:minmax(0,1.55fr) repeat(2,minmax(150px,.7fr));gap:42px;padding:46px 0 34px}
.footer-brand{display:flex;align-items:center;gap:12px}
.footer-mark{width:42px;height:42px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(244,162,97,.35);border-radius:12px;background:linear-gradient(145deg,rgba(244,162,97,.17),rgba(244,162,97,.04));color:#f4a261;font-weight:900;font-size:.78rem;box-shadow:0 10px 30px rgba(244,162,97,.08)}
.footer-title{color:#fff;font-size:.82rem;font-weight:850;letter-spacing:.03em}
.footer-kicker{margin-top:3px;color:#656a71;font-size:.61rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.footer-text{max-width:430px;margin:15px 0 0;color:#73777d;font-size:.7rem;line-height:1.75}
.footer-title-small{color:#d5d7da;font-size:.67rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.footer-links{display:flex;flex-direction:column;gap:9px;margin-top:13px}
.footer-links a{display:inline-flex;align-items:center;gap:6px;width:max-content;color:#777d84;font-size:.69rem;transition:.2s ease}
.footer-links a::after{content:"↗";font-size:.58rem;opacity:0;transform:translateX(-3px);transition:.2s ease}
.footer-links a:hover{color:#fff;transform:translateX(2px)}
.footer-links a:hover::after{opacity:.7;transform:none}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid rgba(255,255,255,.07);color:#4f545a;font-size:.62rem}
.footer-bottom strong{color:#6e737a;font-weight:700}
.footer-bottom a{color:#656a70;text-decoration:none}.footer-bottom a:hover{color:#fff}
@media(max-width:760px){.footer-inner{grid-template-columns:1fr 1fr;gap:28px;padding:34px 0 28px}.footer-brand-block{grid-column:1/-1}.footer-bottom{align-items:flex-start;flex-direction:column;gap:6px}}
@media(max-width:480px){.footer-inner{grid-template-columns:1fr}.footer-brand-block{grid-column:auto}}

.stage-choice-muted{color:#70757c;border-style:dashed}.stage-choice-muted.is-selected{border-color:#454a50;background:#15181b;color:#d4d7db;box-shadow:none}.stage-choice-muted.is-selected .stage-choice-dot{border-color:#7a818a;background:#7a818a;box-shadow:none}

/* Compact vehicle stage / plate controls — final create form polish */
.stage-flow{
  padding:12px;
  border-radius:13px;
}
.stage-flow-head{
  margin-bottom:8px;
  align-items:center;
}
.stage-flow-head small{font-size:.62rem;margin-top:2px}
.stage-flow-head > span{font-size:.6rem}
.stage-flow-list{gap:6px}
.stage-step{
  grid-template-columns:28px minmax(0,1fr);
  gap:8px;
  padding:8px 9px;
  border-radius:11px;
}
.stage-step-marker{
  width:28px;height:28px;border-radius:8px;font-size:.78rem;
}
.stage-step-main{
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  align-items:center;
  gap:8px;
}
.stage-step-title{
  margin:0;
  min-width:0;
  display:block;
}
.stage-step-title b{font-size:.7rem;display:block;white-space:nowrap}
.stage-step-title small{display:block;font-size:.58rem;margin-top:2px;line-height:1.2}
.stage-choice-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}
.stage-choice{
  min-height:36px;
  height:36px;
  padding:0 9px;
  border-radius:9px;
  gap:7px;
  font-size:.7rem;
}
.stage-choice-dot{width:8px;height:8px;flex-basis:8px}
.stage-flow > .field-hint{margin-top:6px;font-size:.6rem}

.plate-question > label{font-size:.72rem}
.plate-choice-grid{gap:8px;margin-top:7px}
.plate-choice{
  min-height:58px;
  padding:9px 11px;
  gap:9px;
  border-radius:11px;
}
.plate-choice-icon{width:30px;height:30px;flex-basis:30px;border-radius:8px;font-size:.85rem}
.plate-choice-copy{gap:2px}
.plate-choice-copy b{font-size:.7rem}
.plate-choice-copy small{font-size:.57rem;line-height:1.25}
.plate-choice-check{width:17px;height:17px;flex-basis:17px;font-size:.52rem}

@media(max-width:900px){
  .stage-step-main{grid-template-columns:76px minmax(0,1fr)}
  .stage-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .stage-flow-head{align-items:flex-start;flex-direction:column}
  .stage-step-main{display:block}
  .stage-step-title{margin-bottom:6px}
  .stage-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .plate-choice-grid{grid-template-columns:1fr}
}


/* ===== Stage 5: My / Rules / About polish ===== */
.my-summary{grid-template-columns:minmax(0,1fr) minmax(300px,.72fr);gap:16px;margin:8px 0 14px;padding:20px;border-radius:18px}
.my-summary-main{min-width:0}.my-summary-main h2{font-size:1.28rem;line-height:1.25}.my-summary-main p{max-width:700px}
.my-summary-stats{grid-template-columns:repeat(4,1fr);align-self:stretch}.my-summary-stats>div{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:11px}.my-summary-stats b,.my-summary-stats span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.my-tabs{display:flex;flex-wrap:wrap;overflow:hidden;margin-bottom:14px}.my-tab{white-space:nowrap}
.my-item-modern{grid-template-columns:170px minmax(250px,1fr) 210px 164px;gap:12px;align-items:center;padding:9px;border-radius:16px;overflow:hidden}
.my-thumb-modern{width:100%;min-width:0;aspect-ratio:16/10;overflow:hidden}.my-thumb-modern img{width:100%;height:100%;object-fit:cover;display:block}
.my-info-modern{min-width:0;overflow:hidden}.my-title-row{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}.my-title{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.my-modern-price{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.my-modern-tags{min-width:0;max-height:52px;overflow:hidden}.my-modern-tags span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.my-performance{min-width:0}.my-performance>div{min-width:0;padding:9px 5px}.my-performance b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.my-actions-modern{width:100%;grid-template-columns:1fr 1fr;min-width:0}.my-actions-modern .btn{min-width:0;max-width:100%;padding:8px 6px;font-size:.63rem;white-space:normal;line-height:1.25;overflow:hidden}.my-actions-modern .btn:last-child{grid-column:1/-1}
.my-reason{max-width:100%;overflow-wrap:anywhere}

.about-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px;align-items:stretch;margin-top:8px}.about-hero>div:first-child{padding:24px 2px}.about-lead{max-width:720px;margin-top:12px;color:#858585;font-size:.84rem;line-height:1.8}.about-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.about-hero-card{display:flex;flex-direction:column;justify-content:flex-end;min-height:250px;padding:22px;border:1px solid #272727;border-radius:20px;background:radial-gradient(circle at 80% 15%,rgba(244,162,97,.16),transparent 38%),linear-gradient(145deg,#151515,#0b0b0b);box-shadow:0 20px 60px rgba(0,0,0,.2)}.about-card-label{color:var(--accent-light);font-size:.63rem;font-weight:800;letter-spacing:.14em}.about-hero-card strong{margin-top:9px;color:#fff;font-size:1.35rem;line-height:1.15}.about-hero-card>span:last-child{margin-top:10px;color:#666;font-size:.67rem;line-height:1.5}
.about-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}.about-card{padding:18px;border:1px solid #222;border-radius:16px;background:#101010}.about-icon{display:flex;width:32px;height:32px;align-items:center;justify-content:center;border-radius:9px;background:var(--accent-soft);color:var(--accent-light);font-size:.62rem;font-weight:800}.about-card h2{margin-top:12px;color:#fff;font-size:.9rem}.about-card p{margin-top:7px;color:#727272;font-size:.7rem;line-height:1.7}
.about-section{margin-top:28px;padding-top:24px;border-top:1px solid #1d1d1d}.about-section-head h2,.about-two-col h2,.about-note h2{margin-top:6px;color:#fff;font-size:1.15rem;letter-spacing:-.25px}.about-section-head p{margin-top:6px;color:#696969;font-size:.72rem}.about-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.about-flow>div{min-width:0;padding:15px;border:1px solid #222;border-radius:14px;background:#0f0f0f}.about-flow b{display:block;color:var(--accent-light);font-size:.62rem}.about-flow strong{display:block;margin-top:8px;color:#eee;font-size:.78rem}.about-flow span{display:block;margin-top:5px;color:#666;font-size:.65rem;line-height:1.55}.about-two-col{display:grid;grid-template-columns:1fr 1fr;gap:28px}.about-two-col p{margin-top:8px;color:#707070;font-size:.73rem;line-height:1.75}.about-note{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:28px;padding:20px;border:1px solid #252525;border-radius:17px;background:linear-gradient(145deg,#141414,#0d0d0d)}.about-note p{max-width:760px;margin-top:7px;color:#707070;font-size:.7rem;line-height:1.7}
.rules-intro{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-top:12px;padding:16px 18px;border:1px solid #282828;border-radius:15px;background:linear-gradient(145deg,#141414,#0d0d0d)}.rules-intro strong{color:#fff;font-size:.78rem}.rules-intro p{max-width:780px;margin-top:5px;color:#6f6f6f;font-size:.68rem;line-height:1.6}.rules-intro>span{flex:0 0 auto;padding:7px 9px;border:1px solid #2a2a2a;border-radius:8px;color:#777;font-size:.6rem}
.rules-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.rule-card{min-width:0;padding:17px;border:1px solid #222;border-radius:16px;background:#101010;overflow:hidden}.rule-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.rule-card-top span{display:flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:9px;background:var(--accent-soft);color:var(--accent-light);font-size:.62rem;font-weight:800}.rule-card-top small{color:#5f5f5f;font-size:.6rem}.rule-card h2{margin-top:12px;color:#eee;font-size:.86rem;line-height:1.35}.rule-card>p{margin-top:6px;color:#707070;font-size:.68rem;line-height:1.65}.rule-card ul{margin:10px 0 0;padding-left:16px;color:#7a7a7a;font-size:.65rem;line-height:1.7}.rule-card li::marker{color:var(--accent-light)}.rules-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:12px;padding:18px;border:1px solid #242424;border-radius:16px;background:#0e0e0e}.rules-bottom h2{margin-top:5px;color:#fff;font-size:.95rem}.rules-bottom p{max-width:780px;margin-top:6px;color:#6e6e6e;font-size:.68rem;line-height:1.65}
@media(max-width:1120px){.my-item-modern{grid-template-columns:150px minmax(220px,1fr) 190px 150px}.about-flow{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.my-summary{grid-template-columns:1fr}.my-summary-stats{grid-template-columns:repeat(4,1fr)}.my-item-modern{grid-template-columns:145px minmax(0,1fr);align-items:start}.my-performance{grid-column:2}.my-actions-modern{grid-column:2}.about-hero{grid-template-columns:1fr}.about-hero-card{min-height:180px}.rules-grid{grid-template-columns:1fr}}
@media(max-width:640px){.my-summary-stats{grid-template-columns:repeat(2,1fr)}.my-item-modern{grid-template-columns:1fr}.my-performance,.my-actions-modern{grid-column:auto}.my-title{white-space:normal;overflow-wrap:anywhere}.about-grid,.about-two-col{grid-template-columns:1fr}.about-flow{grid-template-columns:1fr}.about-note,.rules-bottom{align-items:flex-start;flex-direction:column}.rules-intro{align-items:flex-start;flex-direction:column}}


/* =========================================================
   TFD MARKET — UX / moderation polish 01.10.2026
   ========================================================= */
html.tfd-app body.tfd-loading .page{visibility:hidden}
html.tfd-app body.tfd-loading:before{content:"";position:fixed;inset:0;z-index:9998;background:#0a0a0a}
html.tfd-app body.tfd-loading:after{content:"";position:fixed;z-index:9999;left:50%;top:50%;width:min(520px,82vw);height:118px;transform:translate(-50%,-50%);border-radius:20px;background:linear-gradient(90deg,#111 25%,#171717 37%,#111 63%);background-size:400% 100%;animation:tfdShimmer 1.2s infinite;box-shadow:0 20px 80px rgba(0,0,0,.4)}
@keyframes tfdShimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}

.toast-stack{position:fixed;right:22px;bottom:22px;z-index:30000;display:flex;flex-direction:column;gap:10px;width:min(390px,calc(100vw - 28px));pointer-events:none}
.toast{position:relative;display:grid;grid-template-columns:28px 1fr 24px;align-items:center;gap:9px;min-height:58px;padding:12px 12px 15px;border:1px solid #292929;border-radius:16px;background:rgba(18,18,18,.96);box-shadow:0 18px 50px rgba(0,0,0,.4);backdrop-filter:blur(16px);opacity:0;transform:translateY(10px) scale(.98);transition:.2s ease;pointer-events:auto;overflow:hidden;color:#f3f3f3}
.toast.show{opacity:1;transform:none}.toast-icon{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#1d1d1d;color:var(--accent,#f4a261);font-weight:800}.toast-success .toast-icon{color:#73d99b}.toast-error .toast-icon{color:#ff7c7c}.toast-warning .toast-icon{color:#ffd36a}.toast-message{font-size:.82rem;line-height:1.45}.toast-close{border:0;background:transparent;color:#777;font-size:20px;cursor:pointer}.toast-close:hover{color:#fff}.toast-progress{position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--accent,#f4a261);transform-origin:left;animation:tfdToastProgress 3.2s linear forwards}.toast-error .toast-progress{background:#ff6b6b}.toast-success .toast-progress{background:#73d99b}
@keyframes tfdToastProgress{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.back-to-top{position:fixed;right:22px;bottom:92px;z-index:1500;width:44px;height:44px;border:1px solid #303030;border-radius:14px;background:#141414;color:#fff;box-shadow:0 12px 30px rgba(0,0,0,.3);cursor:pointer;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.back-to-top.show{opacity:1;transform:none;pointer-events:auto}.back-to-top:hover{border-color:var(--accent-border,#6d4934);transform:translateY(-2px)}

.error-page{min-height:calc(100vh - 150px);display:grid;place-items:center}.error-card{position:relative;max-width:760px;margin:40px auto;padding:54px;border:1px solid #292929;border-radius:28px;background:radial-gradient(circle at 90% 10%,rgba(244,162,97,.09),transparent 32%),#0f0f0f;text-align:center;overflow:hidden}.error-code{font-size:clamp(5rem,16vw,10rem);font-weight:800;line-height:.9;letter-spacing:-.08em;color:#fff;text-shadow:0 0 50px rgba(244,162,97,.12)}.error-card h1{margin:16px 0 8px;font-size:clamp(1.5rem,3vw,2.4rem)}.error-card p{max-width:560px;margin:auto;color:var(--muted,#888);line-height:1.7}.error-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:26px}.error-hint{margin-top:20px;color:#5f5f5f;font-size:.74rem}

.empty-state{position:relative;overflow:hidden;background:radial-gradient(circle at 50% 0,rgba(244,162,97,.06),transparent 38%),#0e0e0e;box-shadow:0 12px 40px rgba(0,0,0,.12)}.empty-state:before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,transparent 0 42%,rgba(255,255,255,.025) 50%,transparent 58%);transform:translateX(-100%);animation:tfdEmptySweep 5s ease-in-out infinite}.empty-state>*{position:relative}.empty-state .empty-icon{width:58px;height:58px;margin:0 auto 14px;border:1px solid #303030;border-radius:18px;display:grid;place-items:center;background:#141414;color:var(--accent,#f4a261);font-size:1.4rem}.empty-state.compact{padding:28px}
@keyframes tfdEmptySweep{50%,100%{transform:translateX(100%)}}

.detail-secondary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.detail-secondary-actions .detail-report{margin:0}.detail-share{display:inline-flex;align-items:center;gap:6px}
.status-history{display:flex;flex-direction:column;gap:8px;max-height:420px;overflow:auto}.status-history-row{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--border,#2a2a2a);border-radius:12px;background:#111}.status-history-row>div{display:flex;flex-direction:column;gap:3px}.status-history-row span{color:#777;font-size:.76rem}.status-history-row time{color:#666;font-size:.72rem;text-align:right;white-space:nowrap}

.admin-chat-notice{display:flex;align-items:flex-start;gap:12px;padding:13px 15px;border:1px solid rgba(244,162,97,.22);border-radius:13px;background:rgba(244,162,97,.055);margin-bottom:12px}.admin-chat-notice b{color:#f0f0f0}.admin-chat-notice span{color:#8b8b8b;font-size:.78rem;line-height:1.55}.admin-chat-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 16px;border:1px solid var(--border,#292929);border-radius:16px;background:#101010;transition:.18s}.admin-chat-row:hover{border-color:var(--accent-border,#684936);transform:translateY(-1px)}.admin-chat-main{min-width:0}.admin-chat-view{display:flex;flex-direction:column;gap:14px}.admin-chat-view-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.admin-chat-alerts{display:flex;flex-direction:column;gap:7px}.admin-chat-alerts>div{display:flex;gap:10px;flex-direction:column;padding:11px 13px;border:1px solid rgba(255,100,100,.2);border-radius:12px;background:rgba(255,90,90,.04)}.admin-chat-alerts span{color:#858585;font-size:.75rem}.admin-chat-thread{max-height:55vh;overflow:auto;padding:14px;border:1px solid #242424;border-radius:16px;background:#0b0b0b;display:flex;flex-direction:column;gap:8px}.admin-chat-message{max-width:78%;padding:10px 12px;border-radius:13px;background:#141414;border:1px solid #252525}.admin-chat-message.buyer{align-self:flex-start}.admin-chat-message.seller{align-self:flex-end}.admin-chat-message>div{display:flex;gap:10px;align-items:center}.admin-chat-message time{font-size:.68rem;color:#666}.admin-chat-message p{margin:7px 0 0;white-space:normal;line-height:1.5;font-size:.8rem}.admin-chat-message img{display:block;max-width:280px;max-height:220px;margin-top:8px;border-radius:9px;object-fit:contain}
@media(max-width:680px){.toast-stack{right:14px;left:14px;bottom:14px;width:auto}.back-to-top{right:14px;bottom:78px}.error-card{padding:36px 20px}.detail-secondary-actions{grid-template-columns:1fr}.admin-chat-row{grid-template-columns:1fr}.admin-chat-view-head{flex-direction:column}.admin-chat-message{max-width:92%}}
@media(prefers-reduced-motion:reduce){html.tfd-app body.tfd-loading:after,.empty-state:before{animation:none}.toast,.back-to-top{transition:none}}

/* ===== Расширенная модерация чатов ===== */
.admin-chat-row.is-critical{border-color:rgba(255,92,92,.42);box-shadow:0 0 0 1px rgba(255,92,92,.06),0 12px 36px rgba(255,60,60,.05)}
.admin-risk-line{display:flex;gap:9px;align-items:flex-start;margin-top:9px;padding:9px 11px;border-left:2px solid rgba(255,95,95,.65);border-radius:8px;background:rgba(255,70,70,.045)}
.admin-risk-line b{font-size:.75rem;color:#ff9a9a;white-space:nowrap}.admin-risk-line span{font-size:.74rem;color:#777;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-risk-critical{background:rgba(255,70,70,.11)!important;border-color:rgba(255,70,70,.32)!important;color:#ff8b8b!important}
.admin-chat-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.admin-chat-risk-summary{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}.risk-pill{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;border:1px solid #303030;font-size:.7rem;font-weight:800}.risk-pill.critical{color:#ff8d8d;border-color:rgba(255,80,80,.38);background:rgba(255,70,70,.08)}.risk-pill.high{color:#ffb17b;border-color:rgba(244,162,97,.32);background:rgba(244,162,97,.07)}.risk-pill.clean{color:#7fd9a4;border-color:rgba(127,217,164,.2);background:rgba(127,217,164,.04)}
.admin-chat-meta-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.admin-chat-meta-card>div{padding:11px 12px;border:1px solid #292929;border-radius:12px;background:#111}.admin-chat-meta-card b{display:block;color:#666;font-size:.68rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px}.admin-chat-meta-card span{display:block;color:#ddd;font-size:.77rem;overflow-wrap:anywhere}
.admin-alerts-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;border-bottom:1px solid #242424;margin-bottom:4px}.admin-alerts-head span{color:#666;font-size:.7rem}.admin-chat-alert{padding:11px 13px;border:1px solid rgba(244,162,97,.2);border-radius:12px;background:rgba(244,162,97,.045)}.admin-chat-alert.is-critical{border-color:rgba(255,75,75,.38);background:rgba(255,65,65,.065)}.admin-chat-alert>div{display:flex;justify-content:space-between;gap:10px;align-items:center}.admin-chat-alert b{color:#fff;font-size:.78rem}.admin-chat-alert>span{display:block;margin-top:5px;color:#777;font-size:.72rem;line-height:1.45}.admin-alert-severity{color:#ff9a9a!important;font-size:.66rem!important;font-weight:800;text-transform:uppercase;white-space:nowrap}
.admin-chat-message>div small{margin-left:auto;color:#555;font-size:.65rem}

/* Печатная копия переписки: создаётся только при печати / сохранении PDF. */
#tfd-chat-print-sheet{display:none}
@media print{
  @page{size:A4;margin:13mm 12mm}
  html,body{background:#fff!important;color:#111!important}
  body>*:not(#tfd-chat-print-sheet){display:none!important}
  #tfd-chat-print-sheet{display:block!important;color:#111;background:#fff;font-family:Arial,Helvetica,sans-serif;font-size:10.5pt;line-height:1.45}
  .tfd-print-header{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid #222;padding-bottom:12px;margin-bottom:14px}
  .tfd-print-brand{font-size:10pt;font-weight:800;letter-spacing:.14em}.tfd-print-header h1{margin:5px 0;font-size:20pt}.tfd-print-header p{margin:0;color:#555}.tfd-print-stamp{font-size:8.5pt;color:#555;text-align:right;white-space:nowrap}
  .tfd-print-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:14px}.tfd-print-meta>div{border:1px solid #ccc;border-radius:5px;padding:7px}.tfd-print-meta b{display:block;font-size:7.5pt;text-transform:uppercase;color:#666;margin-bottom:2px}.tfd-print-meta span{overflow-wrap:anywhere}
  .tfd-print-section{margin-top:14px;break-inside:auto}.tfd-print-section h2{font-size:12pt;border-bottom:1px solid #bbb;padding-bottom:5px;margin:0 0 8px}.tfd-print-alert{border:1px solid #aaa;border-left:4px solid #555;border-radius:5px;padding:7px 9px;margin:6px 0;break-inside:avoid}.tfd-print-alert strong{display:block}.tfd-print-alert span{display:block;color:#555;font-size:8.5pt}.tfd-print-alert p{margin:4px 0 0;white-space:pre-wrap}
  .tfd-print-message{border:1px solid #ccc;border-radius:6px;padding:8px 10px;margin:6px 0;break-inside:avoid}.tfd-print-message-head{display:flex;gap:10px;align-items:baseline;border-bottom:1px solid #eee;padding-bottom:4px}.tfd-print-message-head time,.tfd-print-message-head span{color:#666;font-size:8pt}.tfd-print-message-head span{margin-left:auto}.tfd-print-message p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.tfd-print-message img{display:block;max-width:150mm;max-height:70mm;margin-top:7px;object-fit:contain}.tfd-print-footer{margin-top:18px;padding-top:8px;border-top:1px solid #aaa;color:#666;font-size:7.5pt}
}
@media(max-width:680px){.admin-chat-actions{justify-content:stretch}.admin-chat-actions .btn{flex:1 1 100%}.admin-chat-meta-card{grid-template-columns:1fr}.admin-chat-alert>div{align-items:flex-start;flex-direction:column}.admin-risk-line span{white-space:normal}.admin-alerts-head{align-items:flex-start;flex-direction:column}}

/* ===== Большое служебное окно модерации чата ===== */
.modal-dialog.admin-chat-modal-dialog{
  width:min(1120px,calc(100vw - 44px));
  max-width:none;
  max-height:calc(100vh - 44px);
  padding:26px;
  border-radius:22px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-view{
  min-height:0;
  height:100%;
  gap:16px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-view-head{
  flex:0 0 auto;
  padding-bottom:2px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-actions{
  justify-content:flex-start;
  flex:0 0 auto;
  padding:2px 0 4px;
  border-top:1px solid #242424;
  border-bottom:1px solid #242424;
  padding-top:14px;
  padding-bottom:14px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-meta-card{
  flex:0 0 auto;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-alerts{
  flex:0 0 auto;
  max-height:190px;
  overflow:auto;
  padding-right:3px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-thread{
  flex:1 1 auto;
  min-height:240px;
  max-height:none;
  overflow:auto;
  padding:18px;
}
.modal-dialog.admin-chat-modal-dialog > .admin-chat-view > .modal-actions{
  flex:0 0 auto;
  margin-top:0;
  justify-content:flex-end;
  display:none;
}
@media(max-width:900px){
  .modal-dialog.admin-chat-modal-dialog{
    width:calc(100vw - 24px);
    max-height:calc(100vh - 24px);
    padding:18px;
  }
}
@media(max-width:680px){
  .modal-dialog.admin-chat-modal-dialog{
    width:calc(100vw - 12px);
    max-height:calc(100vh - 12px);
    padding:14px;
    border-radius:17px;
  }
  .modal-dialog.admin-chat-modal-dialog .admin-chat-actions .btn{flex:1 1 100%;}
}

/* ===== Admin chat moderation: workspace layout ===== */
.modal-backdrop.admin-chat-backdrop{
  align-items:flex-start;
  justify-items:center;
  padding:92px 18px 18px;
  background:rgba(0,0,0,.78);
}
.modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{
  width:min(1320px,calc(100vw - 36px));
  max-width:none;
  max-height:calc(100vh - 110px);
  height:calc(100vh - 110px);
  padding:22px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-view{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
  gap:12px;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-view-head{
  flex:0 0 auto;
  align-items:center;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-actions{
  flex:0 0 auto;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 0;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-meta-card{
  flex:0 0 auto;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.admin-chat-workspace{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(250px,300px) minmax(0,1fr);
  gap:12px;
}
.admin-chat-analysis{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:9px;
  padding:13px;
  border:1px solid rgba(255,100,100,.18);
  border-radius:15px;
  background:#101010;
  overflow:hidden;
}
.admin-chat-analysis .admin-alerts-head{
  flex:0 0 auto;
  padding:2px 2px 9px;
  border-bottom:1px solid #242424;
}
.admin-chat-analysis .admin-alerts-head b{font-size:.9rem}
.admin-chat-analysis .admin-alerts-head span{font-size:.69rem;line-height:1.45}
.admin-chat-alert-list{
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding-right:3px;
}
.admin-chat-analysis .admin-chat-alert{
  padding:10px 11px;
  border-radius:11px;
}
.admin-chat-analysis .admin-chat-alert>div{gap:6px}
.admin-chat-analysis .admin-chat-alert span{font-size:.68rem;line-height:1.35}
.modal-dialog.admin-chat-modal-dialog .admin-chat-thread{
  min-width:0;
  min-height:0;
  height:100%;
  max-height:none;
  overflow:auto;
  padding:20px;
  border-radius:17px;
  background:#080808;
}
.modal-dialog.admin-chat-modal-dialog .admin-chat-message{
  max-width:min(72%,620px);
  padding:12px 14px;
}
.modal-dialog.admin-chat-modal-dialog > .admin-chat-view > .modal-actions{display:none}
@media(max-width:900px){
  .modal-backdrop.admin-chat-backdrop{padding:78px 10px 10px}
  .modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{
    width:calc(100vw - 20px);
    height:calc(100vh - 88px);
    max-height:calc(100vh - 88px);
    padding:15px;
  }
  .admin-chat-workspace{grid-template-columns:1fr;grid-template-rows:minmax(130px,34%) minmax(0,1fr)}
  .admin-chat-analysis{min-height:0}
}
@media(max-width:680px){
  .modal-backdrop.admin-chat-backdrop{padding:68px 6px 6px}
  .modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{width:calc(100vw - 12px);height:calc(100vh - 74px);max-height:calc(100vh - 74px);padding:12px;border-radius:16px}
  .modal-dialog.admin-chat-modal-dialog .admin-chat-meta-card{grid-template-columns:1fr}
  .modal-dialog.admin-chat-modal-dialog .admin-chat-actions .btn{flex:1 1 auto}
  .admin-chat-workspace{grid-template-rows:180px minmax(0,1fr)}
  .modal-dialog.admin-chat-modal-dialog .admin-chat-message{max-width:90%}
}

/* ===== Финальная настройка служебной модерации чатов ===== */
.modal-backdrop.admin-chat-backdrop{
  top:90px;
  right:0;
  bottom:0;
  left:0;
  inset:auto;
  padding:14px 18px 18px;
  align-items:flex-start;
  justify-items:center;
  z-index:1200;
}
.modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{
  width:min(1400px,calc(100vw - 36px));
  height:calc(100vh - 122px);
  max-height:calc(100vh - 122px);
  margin:0;
  padding:20px;
}
.admin-chat-workspace{
  grid-template-columns:minmax(220px,250px) minmax(0,1fr);
  gap:14px;
}
.admin-chat-analysis{width:auto;min-width:0}
.admin-chat-alert-list{min-width:0}
.admin-chat-alert{min-width:0;overflow:hidden}
.admin-chat-alert .admin-alert-title{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important;gap:8px!important}
.admin-chat-alert .admin-alert-title b{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.35}
.admin-chat-alert .admin-alert-severity{white-space:normal!important;text-align:right;line-height:1.2;max-width:92px;overflow-wrap:anywhere}
.admin-chat-alert .admin-alert-meta{display:flex!important;justify-content:space-between!important;gap:8px!important;margin-top:6px;color:#777;font-size:.67rem;line-height:1.35;flex-wrap:wrap}
.admin-chat-alert .admin-alert-meta span{margin:0!important;min-width:0;overflow-wrap:anywhere}
.admin-chat-alert p{margin:5px 0 0;color:#8b8b8b;font-size:.7rem;line-height:1.4;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.modal-dialog.admin-chat-modal-dialog .admin-chat-thread{min-width:0;overflow-x:hidden}
@media(max-width:900px){
  .modal-backdrop.admin-chat-backdrop{top:78px;padding:10px}
  .modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{width:calc(100vw - 20px);height:calc(100vh - 98px);max-height:calc(100vh - 98px)}
}
@media(max-width:680px){
  .modal-backdrop.admin-chat-backdrop{top:68px;padding:6px}
  .modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{width:calc(100vw - 12px);height:calc(100vh - 74px);max-height:calc(100vh - 74px)}
}

/* Быстрые действия администратора */
.admin-user-quick{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.admin-user-quick .btn{max-width:100%}
.admin-chat-participants{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #292929;border-radius:12px;background:#111;flex:0 0 auto}
.admin-chat-participants>div:first-child{min-width:0}.admin-chat-participants b{display:block;color:#ddd;font-size:.76rem}.admin-chat-participants span{display:block;color:#666;font-size:.68rem;margin-top:3px}.admin-chat-participant-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.admin-chat-participant-actions .btn{white-space:nowrap}
@media(max-width:900px){.admin-chat-participants{align-items:flex-start;flex-direction:column}.admin-chat-participant-actions{justify-content:flex-start}}

/* ===== Final 11: точечное исправление слоёв окна чата без изменения его дизайна ===== */
.modal-backdrop.admin-chat-backdrop{z-index:5000!important;}
.modal-backdrop.admin-chat-backdrop .modal-dialog.admin-chat-modal-dialog{position:relative;z-index:5001!important;}
.modal-dialog.admin-chat-modal-dialog .admin-chat-view-head{position:relative;z-index:1!important;}
.modal-dialog.admin-chat-modal-dialog .admin-chat-actions{position:relative;z-index:2!important;}
.modal-dialog.admin-chat-modal-dialog .admin-chat-participants{position:relative;z-index:20!important;isolation:isolate;}
.modal-dialog.admin-chat-modal-dialog .admin-chat-participant-actions{position:relative;z-index:21!important;}
.modal-dialog.admin-chat-modal-dialog .admin-chat-meta-card{position:relative;z-index:2!important;}

/* Текст автофлагов: ничего не режем, длинные строки всегда переносятся. */
.admin-chat-alert{overflow:visible!important;min-width:0;}
.admin-chat-alert .admin-alert-title{min-width:0;}
.admin-chat-alert .admin-alert-title b{min-width:0;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.4!important;}
.admin-chat-alert .admin-alert-severity{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.25!important;}
.admin-chat-alert .admin-alert-meta{min-width:0;flex-wrap:wrap!important;}
.admin-chat-alert .admin-alert-meta span{min-width:0;overflow-wrap:anywhere!important;word-break:break-word!important;}
.admin-chat-alert p{white-space:pre-wrap!important;overflow:visible!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.5!important;}

/* Печать / PDF: сохраняем исходный дизайн окна, но печатный документ не обрезает текст. */
@media print{
  html,body{height:auto!important;min-height:0!important;overflow:visible!important;}
  #tfd-chat-print-sheet{display:block!important;position:static!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;}
  .tfd-print-header,.tfd-print-meta,.tfd-print-alert,.tfd-print-message,.tfd-print-footer{overflow:visible!important;}
  .tfd-print-section{overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;}
  .tfd-print-alert,.tfd-print-message{break-inside:avoid!important;page-break-inside:avoid!important;}
  .tfd-print-alert strong,.tfd-print-alert span,.tfd-print-alert p,.tfd-print-message p,.tfd-print-message-head strong,.tfd-print-message-head time,.tfd-print-message-head span{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;max-height:none!important;overflow:visible!important;}
  .tfd-print-alert p,.tfd-print-message p{white-space:pre-wrap!important;}
  .tfd-print-message-head{flex-wrap:wrap!important;}
  .tfd-print-message-head span{margin-left:auto;}
}


/* ===== Final 12: модалка управления пользователем всегда поверх шапки ===== */
.modal-backdrop.admin-user-backdrop{
  z-index:6000!important;
  position:fixed!important;
  inset:0!important;
}
.modal-backdrop.admin-user-backdrop .modal-dialog{
  position:relative!important;
  z-index:6001!important;
  max-height:calc(100vh - 36px)!important;
  overflow:auto!important;
}

/* ===== Final 12: печатная версия без обрезания длинных блоков ===== */
@media print{
  #tfd-chat-print-sheet{
    display:block!important;
    position:static!important;
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  .tfd-print-header,.tfd-print-meta,.tfd-print-section,.tfd-print-footer{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
  .tfd-print-alert,.tfd-print-message{
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    break-inside:auto!important;
    page-break-inside:auto!important;
    box-sizing:border-box!important;
  }
  .tfd-print-message p,.tfd-print-alert p{
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  .tfd-print-message-head{
    display:flex!important;
    flex-wrap:wrap!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
  .tfd-print-message-head strong,.tfd-print-message-head time,.tfd-print-message-head span{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  .tfd-print-message-head span{margin-left:auto!important;}
  .tfd-print-alert strong,.tfd-print-alert span{
    display:block!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  .tfd-print-message img{
    max-width:100%!important;
    height:auto!important;
    max-height:80mm!important;
  }
  .tfd-print-section h2{
    break-after:avoid!important;
    page-break-after:avoid!important;
  }
}

/* ===== Final 13: служебные модалки и печать ===== */
.modal-backdrop:not(.admin-chat-backdrop):not(.admin-user-backdrop){
  z-index:5000!important;
  position:fixed!important;
}
.modal-backdrop:not(.admin-chat-backdrop):not(.admin-user-backdrop) .modal-dialog{
  position:relative!important;
  z-index:5001!important;
  max-height:calc(100vh - 40px)!important;
  overflow:auto!important;
}

/* Заблокированный аккаунт: пользователь видит только это окно. */
.blocked-account-screen{
  position:fixed;inset:0;z-index:99999;display:grid;place-items:center;
  padding:24px;box-sizing:border-box;background:#090909;color:#eee;
}
.blocked-account-card{
  width:min(620px,100%);box-sizing:border-box;padding:34px;border:1px solid #292929;
  border-radius:22px;background:#111;box-shadow:0 24px 80px rgba(0,0,0,.55);text-align:center;
}
.blocked-account-icon{width:56px;height:56px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:#3a1717;color:#ff6b6b;font-size:28px;font-weight:800}
.blocked-account-card h1{margin:8px 0 12px;font-size:30px;line-height:1.15}
.blocked-account-lead{margin:0 auto;color:#aaa;line-height:1.65;max-width:520px}
.blocked-account-reason{margin:22px 0;padding:15px 17px;border:1px solid #3a2424;border-radius:14px;background:#171212;text-align:left}
.blocked-account-reason span{display:block;color:#777;font-size:12px;margin-bottom:6px}.blocked-account-reason strong{display:block;color:#f0d0d0;line-height:1.5;overflow-wrap:anywhere}
.blocked-account-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:20px}.blocked-account-note{margin-top:16px;color:#666;font-size:12px;line-height:1.5}

@media print{
  @page{size:A4 portrait;margin:14mm 12mm 16mm;}
  html,body{background:#fff!important;color:#111!important;width:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;}
  body > *:not(#tfd-chat-print-sheet){display:none!important;}
  #tfd-chat-print-sheet{
    display:block!important;position:static!important;visibility:visible!important;width:100%!important;
    max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;color:#111!important;
    font-family:Arial,Helvetica,sans-serif!important;font-size:10.5pt!important;line-height:1.45!important;
    overflow:visible!important;box-sizing:border-box!important;
  }
  #tfd-chat-print-sheet *{visibility:visible!important;box-sizing:border-box!important;max-width:100%!important;}
  .tfd-print-header{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:18px!important;border-bottom:2px solid #111!important;padding:0 0 12px!important;margin:0 0 14px!important;}
  .tfd-print-brand{font-size:9pt!important;font-weight:800!important;letter-spacing:.16em!important;color:#555!important;margin-bottom:3px!important;}
  .tfd-print-header h1{font-size:19pt!important;line-height:1.2!important;margin:0 0 5px!important;color:#111!important;}
  .tfd-print-header p{font-size:9pt!important;color:#555!important;margin:0!important;}
  .tfd-print-stamp{font-size:8.5pt!important;color:#555!important;text-align:right!important;white-space:nowrap!important;}
  .tfd-print-meta{display:grid!important;grid-template-columns:1fr 1fr!important;border:1px solid #ccc!important;margin:0 0 16px!important;}
  .tfd-print-meta>div{padding:8px 10px!important;border-bottom:1px solid #ddd!important;min-width:0!important;}
  .tfd-print-meta>div:nth-child(odd){border-right:1px solid #ddd!important;}
  .tfd-print-meta b{display:block!important;font-size:8pt!important;color:#666!important;text-transform:uppercase!important;letter-spacing:.04em!important;margin-bottom:2px!important;}
  .tfd-print-meta span{display:block!important;font-size:9.5pt!important;color:#111!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  .tfd-print-section{display:block!important;margin:0 0 18px!important;padding:0!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;}
  .tfd-print-section h2{font-size:12pt!important;margin:0 0 8px!important;padding:0 0 5px!important;border-bottom:1px solid #bbb!important;color:#111!important;break-after:avoid!important;page-break-after:avoid!important;}
  .tfd-print-alert,.tfd-print-message{display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:#fff!important;color:#111!important;border:1px solid #ccc!important;border-radius:0!important;padding:9px 10px!important;margin:0 0 8px!important;box-shadow:none!important;break-inside:auto!important;page-break-inside:auto!important;}
  .tfd-print-alert strong{display:block!important;font-size:10pt!important;color:#111!important;margin:0 0 3px!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  .tfd-print-alert>span{display:block!important;font-size:8.5pt!important;color:#666!important;margin-bottom:5px!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  .tfd-print-alert p,.tfd-print-message p{display:block!important;margin:5px 0 0!important;padding:0!important;font-size:10pt!important;line-height:1.5!important;color:#111!important;white-space:pre-wrap!important;overflow:visible!important;overflow-wrap:anywhere!important;word-break:break-word!important;max-height:none!important;}
  .tfd-print-message-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:2px 10px!important;width:100%!important;margin:0!important;padding:0 0 5px!important;border-bottom:1px solid #ddd!important;}
  .tfd-print-message-head strong{font-size:10pt!important;color:#111!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  .tfd-print-message-head time,.tfd-print-message-head span{font-size:8.5pt!important;color:#666!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  .tfd-print-message-head span{grid-column:2!important;grid-row:1!important;text-align:right!important;margin:0!important;}
  .tfd-print-message img{display:block!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:80mm!important;margin:8px 0 0!important;object-fit:contain!important;}
  .tfd-print-footer{border-top:1px solid #bbb!important;margin-top:20px!important;padding-top:8px!important;color:#666!important;font-size:8pt!important;line-height:1.4!important;}
}

/* Избранное и история просмотров */
.favorites-tools{margin:0 0 22px}.favorites-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.favorites-tabs .my-tab{display:inline-flex;align-items:center;gap:8px;text-decoration:none}.favorites-tabs .my-tab span{font-size:.72rem;opacity:.7}.favorites-filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr 1fr auto;gap:10px;align-items:center;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.favorites-filter-grid .input,.favorites-filter-grid .select-input{min-width:0}@media(max-width:1100px){.favorites-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.favorites-filter-grid{grid-template-columns:1fr}.favorites-filter-grid .btn{width:100%}}
/* Настройки администратора: справочник Market находится только здесь */
.market-settings-host{margin-top:18px}.market-settings-host .market-settings-placeholder{display:none}.market-settings-host [data-spec-directory]{margin:0}.market-settings-host .content-card{background:linear-gradient(180deg,rgba(255,255,255,.025),transparent),var(--surface);border:1px solid var(--border-light);border-radius:18px;padding:20px}.market-settings-host .content-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}.market-settings-host .content-card-head h2{margin:0}.market-settings-host .admin-directory-grid>div{background:rgba(255,255,255,.018);border-color:var(--border-light);padding:16px}.market-settings-host .admin-directory-grid h3{margin:0 0 4px}.market-settings-host .admin-dir-add{align-items:center}.market-settings-host .admin-accounts{background:rgba(255,255,255,.018)}

/* Проданные объявления и поиск каталога */
.sold-price-box{padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--bg-soft);margin-bottom:14px}.sold-price-box>label{display:block;font-size:.8rem;font-weight:700;margin-bottom:7px}.sold-price-input{display:flex;align-items:center;gap:8px}.sold-price-input .input{flex:1}.sold-price-input>span{color:var(--text-muted);font-weight:700}.sold-price-box small{display:block;margin-top:6px;color:var(--text-muted);font-size:.74rem}.listing-sale-price{display:block;margin-top:2px;color:var(--text-muted);font-size:.68rem}.my-sale-meta{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:8px;padding:9px 11px;border:1px solid var(--accent-border);border-radius:10px;background:var(--accent-soft);font-size:.76rem}.my-sale-meta b{color:var(--accent-light)}.my-sale-meta span{color:var(--text-muted)}.sold-deal-meta{display:flex;flex-wrap:wrap;gap:5px 12px}.sold-deal-meta b{color:var(--accent-light)}.sold-deal-meta span{color:var(--text-muted)}.detail-sale-price{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding:9px 11px;border:1px solid var(--accent-border);border-radius:10px;background:var(--accent-soft);font-size:.78rem}.detail-sale-price b{color:var(--accent-light)}.detail-sale-price span{color:var(--text-muted)}
.search-box{position:relative}.catalog-autocomplete{display:none;position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:80;padding:6px;border:1px solid var(--border-light);border-radius:13px;background:var(--surface);box-shadow:var(--shadow-lg)}.catalog-autocomplete.show{display:block}.catalog-autocomplete-item{display:block;width:100%;padding:10px 12px;border:0;border-radius:9px;background:transparent;color:var(--text);text-align:left;font:inherit;cursor:pointer}.catalog-autocomplete-item:hover{background:var(--accent-soft);color:var(--accent-light)}

/* Legal pages / registration consents */
.legal-page .page-head{margin-bottom:22px}.legal-card{max-width:920px;margin:0 auto;padding:28px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(180deg,#111 0%,#0d0d0d 100%);box-shadow:0 20px 50px rgba(0,0,0,.18)}.legal-card h2{margin:26px 0 9px;font-size:18px;color:#fff}.legal-card h2:first-of-type{margin-top:0}.legal-card h3{margin:22px 0 8px;font-size:15px;color:#eee}.legal-card p,.legal-card li{color:#a2a2a2;font-size:13px;line-height:1.75}.legal-card ul{padding-left:20px}.legal-card a{color:#f4a261}.legal-note{display:inline-flex;padding:7px 10px;border:1px solid #282828;border-radius:9px;color:#777;font-size:11px}.legal-warning,.legal-placeholder{margin-top:20px;padding:14px 16px;border:1px solid rgba(244,162,97,.24);border-radius:12px;background:rgba(244,162,97,.05);color:#a9a9a9;font-size:12px;line-height:1.65}.legal-contact{font-size:17px!important}.auth-consents{display:grid;gap:8px;margin-top:1px;padding:11px;border:1px solid #242424;border-radius:12px;background:#0d0d0d}.consent-row{display:flex!important;align-items:flex-start;gap:9px!important;padding:4px 0;cursor:pointer;font-size:10.5px!important;line-height:1.5}.consent-row input{width:15px;height:15px;flex:0 0 15px;margin-top:1px;accent-color:#f4a261}.consent-row span{color:#8f8f8f}.consent-row a{color:#f4a261;text-decoration:underline;text-underline-offset:2px}.consent-optional{border-top:1px solid #202020;padding-top:10px;margin-top:2px}.auth-consents .field-hint{padding-left:24px}
@media(max-width:650px){.legal-card{padding:20px 16px;border-radius:14px}.legal-card p,.legal-card li{font-size:12px}.legal-card h2{font-size:16px}}


/* ===== Fix: стейджи в окне редактирования объявления ===== */
.modal-form .stage-grid{grid-template-columns:minmax(0,1fr);gap:10px;margin-top:0}
.modal-form .stage-grid[hidden],.modal-form .stage-edit-step[hidden]{display:none!important}
.modal-form .stage-edit-step{min-width:0}
.modal-form .stage-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.modal-form .stage-choice{height:auto;min-height:40px;padding:8px 11px;white-space:normal;line-height:1.2;overflow:hidden}
.modal-form .stage-choice > span:last-child{min-width:0;overflow-wrap:anywhere}
.modal-form .stage-choice-muted{grid-column:1 / -1}


/* ===== Fix: согласия показываются только при регистрации ===== */
.auth-consents[hidden],.auth-form [hidden]{display:none!important}


/* ===== Аналитика по стейджам ===== */
.market-cfg-note{margin:-4px 0 12px;color:var(--text-muted,#888);font-size:.72rem;line-height:1.5}
.market-cfgs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 0 12px;padding-bottom:2px}
.market-cfgs::-webkit-scrollbar{display:none}
.market-cfg{flex:none;white-space:nowrap}
.market-cfg i{font-style:normal;opacity:.6;font-size:.9em}
.market-verdict{display:grid;gap:3px;margin:0 0 14px;padding:11px 14px;border:1px solid var(--border,#2a2a2a);border-radius:12px;background:rgba(255,255,255,.02)}
.market-verdict[hidden]{display:none}
.market-verdict b{color:#fff;font-size:.82rem}
.market-verdict span{color:var(--text-muted,#888);font-size:.7rem;line-height:1.45}
.market-verdict[data-level="low"]{border-color:rgba(121,214,157,.35);background:rgba(121,214,157,.06)}
.market-verdict[data-level="low"] b{color:#79d69d}
.market-verdict[data-level="high"]{border-color:rgba(231,111,81,.35);background:rgba(231,111,81,.06)}
.market-verdict[data-level="high"] b{color:#ff9b83}
.market-cfg-table{margin-top:18px}
.market-cfg-table h3{margin:0 0 10px;font-size:.9rem;color:#fff}
.cfg-head,.cfg-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.1fr);gap:10px;align-items:center;text-align:left}
.cfg-head{padding:0 12px 6px;color:var(--text-muted,#888);font-size:.62rem;text-transform:uppercase;letter-spacing:.04em}
.cfg-row{width:100%;margin-bottom:6px;padding:10px 12px;border:1px solid var(--border,#2a2a2a);border-radius:12px;background:rgba(255,255,255,.02);color:#cfd3d8;font:inherit;font-size:.74rem;cursor:pointer;transition:border-color .18s,background .18s}
.cfg-row:hover{border-color:#3b4047;background:rgba(255,255,255,.04)}
.cfg-row.active{border-color:rgba(244,162,97,.58);background:rgba(244,162,97,.08)}
.cfg-name{font-weight:700;color:#fff;min-width:0;overflow-wrap:anywhere}
.cfg-name i{display:block;margin-top:2px;font-style:normal;font-weight:500;color:var(--accent-light,#f4a261);font-size:.62rem}
.cfg-price{font-weight:700;color:#fff}
.cfg-price small{display:block;margin-top:2px;font-weight:500;color:var(--text-muted,#888);font-size:.62rem}
.cfg-count{color:var(--text-muted,#888);font-size:.68rem;line-height:1.4}
.cfg-delta{font-weight:600;font-size:.72rem}
.cfg-delta.up{color:#79d69d}.cfg-delta.down{color:#ff9b83}
@media(max-width:680px){
  .cfg-head{display:none}
  .cfg-row{grid-template-columns:1fr 1fr;gap:6px 10px}
  .cfg-name{grid-column:1 / -1}
}

/* Фиксированная госцена автомобиля */
.listing-gov-price {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #777;
}
.listing-gov-price strong {
    font-weight: 700;
    color: #444;
}
.detail-gov-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    font-size: 14px;
    color: #777;
}
.detail-gov-price strong {
    color: #555;
    font-weight: 700;
}
.gov-price-picker {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #252525;
    border-radius: 12px;
    background: #0b0b0b;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 12px;
    align-items: center;
}
.gov-price-picker > span {
    font-size: 13px;
    color: #777;
}
.gov-price-picker > strong {
    font-size: 16px;
    color: #eee;
}
.gov-price-picker > small {
    grid-column: 1 / -1;
    color: #6f6f6f;
    font-size: 11px;
}


/* Accessory catalog */
.filter-accessory-group{display:none;}
.filter-accessory-group.is-relevant{display:block;}
.accessory-meta-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px;padding:12px 14px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.025);}
.accessory-meta-picker>div{display:flex;flex-direction:column;gap:4px;}
.accessory-meta-picker span{font-size:11px;color:#777;text-transform:uppercase;letter-spacing:.08em;}
.accessory-meta-picker strong{font-size:13px;color:#e8e8e8;}

.filter-wheel-group{display:none;}
.filter-wheel-group.is-relevant{display:block;}

.filter-skin-group{display:none;}
.filter-skin-group.is-relevant{display:block;}

.filter-realestate-group{display:none}.filter-realestate-group.is-relevant{display:block}

.filter-business-group{display:none;}
.filter-business-group.is-relevant{display:block;}

/* =========================================================
   TFD Notifications redesign
   ========================================================= */
.toast-stack{
    position:fixed;
    top:82px;
    right:22px;
    bottom:auto;
    z-index:30000;
    display:flex;
    flex-direction:column;
    gap:10px;
    width:min(380px,calc(100vw - 28px));
    pointer-events:none;
}
.toast{
    position:relative;
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 28px;
    align-items:center;
    gap:11px;
    min-height:66px;
    padding:11px 12px 13px 11px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:15px;
    background:linear-gradient(180deg,rgba(24,24,24,.98),rgba(15,15,15,.98));
    box-shadow:0 20px 55px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.015) inset;
    backdrop-filter:blur(16px);
    color:#f2f2f2;
    opacity:0;
    transform:translate3d(18px,-4px,0) scale(.985);
    transition:opacity .2s ease,transform .2s ease;
    pointer-events:auto;
    overflow:hidden;
}
.toast.show{opacity:1;transform:none}
.toast::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:3px;
    background:var(--accent,#f4a261);
}
.toast-success::before{background:#73d99b}
.toast-error::before{background:#ff6b6b}
.toast-warning::before{background:#ffd36a}
.toast-icon{
    width:38px;
    height:38px;
    border-radius:11px;
    display:grid;
    place-items:center;
    background:rgba(244,162,97,.08);
    border:1px solid rgba(244,162,97,.16);
    color:var(--accent,#f4a261);
    font-size:.88rem;
    font-weight:900;
}
.toast-success .toast-icon{color:#73d99b;background:rgba(115,217,155,.08);border-color:rgba(115,217,155,.16)}
.toast-error .toast-icon{color:#ff7c7c;background:rgba(255,107,107,.08);border-color:rgba(255,107,107,.16)}
.toast-warning .toast-icon{color:#ffd36a;background:rgba(255,211,106,.08);border-color:rgba(255,211,106,.16)}
.toast-message{min-width:0;color:#ededed;font-size:.78rem;line-height:1.45;letter-spacing:.005em}
.toast-close{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#666;
    font-size:19px;
    line-height:1;
    cursor:pointer;
    transition:.16s ease;
}
.toast-close:hover{background:rgba(255,255,255,.06);color:#fff}
.toast-progress{
    position:absolute;
    left:3px;
    right:0;
    bottom:0;
    height:2px;
    background:var(--accent,#f4a261);
    transform-origin:left;
    animation:tfdToastProgress 3.2s linear forwards;
}
.toast-error .toast-progress{background:#ff6b6b}
.toast-success .toast-progress{background:#73d99b}
.toast-warning .toast-progress{background:#ffd36a}

.notif-popover{
    width:365px;
    padding:8px;
    background:rgba(15,15,15,.98);
    border:1px solid rgba(255,255,255,.09);
    border-radius:16px;
    box-shadow:0 24px 70px rgba(0,0,0,.52),0 0 0 1px rgba(255,255,255,.015) inset;
    backdrop-filter:blur(16px);
}
.notif-popover-head{
    padding:10px 10px 11px;
    border-bottom:1px solid rgba(255,255,255,.07);
}
.notif-popover-head strong{font-size:.82rem;color:#f1f1f1;letter-spacing:.01em}
.notif-pop-item{
    position:relative;
    display:block;
    width:100%;
    margin-top:3px;
    padding:11px 11px 10px 30px;
    border:0;
    border-radius:11px;
    text-align:left;
    background:transparent;
    color:#bdbdbd;
    font-size:.76rem;
    line-height:1.45;
    cursor:pointer;
    transition:background .16s ease,color .16s ease;
}
.notif-pop-item::before{
    content:"";
    position:absolute;
    left:12px;
    top:15px;
    width:6px;
    height:6px;
    border-radius:50%;
    background:transparent;
}
.notif-pop-item.unread{background:rgba(244,162,97,.07);color:#f0f0f0}
.notif-pop-item.unread::before{background:var(--accent,#f4a261);box-shadow:0 0 10px rgba(244,162,97,.35)}
.notif-pop-item:hover{background:rgba(255,255,255,.055);color:#fff}
.notif-pop-item time{display:block;margin-top:5px;color:#626262;font-size:.65rem}
.notif-pop-empty{padding:26px 10px;text-align:center;color:#666;font-size:.76rem}

@media(max-width:680px){
    .toast-stack{top:auto;right:14px;left:14px;bottom:14px;width:auto}
    .toast{transform:translateY(10px) scale(.985)}
    .notif-popover{position:fixed;top:68px;left:12px;right:12px;width:auto}
}

/* =========================================================
   TFD Notifications — VK-like notification center
   ========================================================= */
.notif-popover{width:420px;padding:0;overflow:hidden;background:#202020;border:1px solid rgba(255,255,255,.08);border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.02) inset;}
.notif-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.07);background:#232323;}
.notif-popover-head strong{font-size:.92rem;color:#f3f3f3;letter-spacing:.01em}.notif-pop-all-link{color:#b9b9b9;text-decoration:none;font-size:.74rem;font-weight:600}.notif-pop-all-link:hover{color:#fff}
.notif-pop-scroll{max-height:500px;overflow:auto;padding:6px;scrollbar-width:thin;scrollbar-color:#454545 transparent}.notif-pop-scroll::-webkit-scrollbar{width:8px}.notif-pop-scroll::-webkit-scrollbar-thumb{background:#3b3b3b;border-radius:99px}
.notif-pop-item{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 8px;align-items:start;gap:11px;width:100%;padding:12px 10px;border:0;border-radius:12px;background:transparent;color:#c9c9c9;text-align:left;cursor:pointer;font:inherit;transition:background .15s ease}.notif-pop-item:hover{background:rgba(255,255,255,.05)}.notif-pop-item.unread{background:rgba(244,162,97,.06)}
.notif-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:#303030;color:#f5f5f5;font-size:.68rem;font-weight:800;flex:none;box-shadow:0 0 0 1px rgba(255,255,255,.07)}.notif-avatar img{width:100%;height:100%;object-fit:cover;display:block}.notif-avatar-system{background:#1b1b1b}.notif-avatar-system img{padding:8px;object-fit:contain}
.notif-pop-body{min-width:0;display:flex;flex-direction:column;gap:3px;padding-top:1px}.notif-pop-body strong{font-size:.77rem;line-height:1.25;color:#eee}.notif-pop-body span{font-size:.76rem;line-height:1.42;color:#b5b5b5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.notif-pop-item.unread .notif-pop-body span{color:#d9d9d9}.notif-pop-body time{font-size:.67rem;color:#707070;margin-top:2px}.notif-pop-dot,.notif-page-unread-dot{width:7px;height:7px;border-radius:50%;margin-top:5px;background:transparent}.notif-pop-item.unread .notif-pop-dot,.notif-page-item.unread .notif-page-unread-dot{background:var(--accent,#f4a261);box-shadow:0 0 0 3px rgba(244,162,97,.07)}
.notif-pop-footer{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.07);background:#222;color:#d7d7d7;font-size:.76rem;font-weight:700;text-decoration:none}.notif-pop-footer:hover{background:#282828;color:#fff}.notif-pop-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:34px 18px;color:#777;text-align:center;font-size:.73rem}.notif-pop-empty strong{color:#d4d4d4;font-size:.8rem}.notif-empty-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#2a2a2a;color:#777;font-weight:800;margin-bottom:2px}

.notifications-page-head{align-items:flex-end}.notifications-page-count{min-width:120px;padding:14px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface);display:flex;flex-direction:column;gap:3px}.notifications-page-count span{font-size:.7rem;color:var(--text-muted)}.notifications-page-count strong{font-size:1.5rem;color:#fff;line-height:1}
.notifications-page-card{border:1px solid var(--border);border-radius:18px;background:var(--surface);overflow:hidden}.notifications-page-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border)}.notif-page-tabs{display:flex;gap:5px;padding:4px;border-radius:11px;background:#151515}.notif-page-tab{border:0;background:transparent;color:#8e8e8e;border-radius:8px;padding:8px 12px;font-size:.75rem;font-weight:700;cursor:pointer}.notif-page-tab:hover{color:#ddd}.notif-page-tab.active{background:#2a2a2a;color:#fff}
.notifications-page-list{padding:8px 12px 18px}.notif-day{padding:12px 8px 7px;color:#777;text-transform:uppercase;font-size:.67rem;font-weight:800;letter-spacing:.08em}.notif-page-item{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr) 8px;align-items:start;gap:13px;width:100%;padding:15px 10px;border:0;border-radius:13px;background:transparent;color:#ddd;text-align:left;cursor:pointer;font:inherit;transition:background .15s ease}.notif-page-item:hover{background:rgba(255,255,255,.04)}.notif-page-item.unread{background:rgba(244,162,97,.055)}.notif-page-avatar{width:48px;height:48px}.notif-page-body{min-width:0}.notif-page-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.notif-page-top strong{color:#f1f1f1;font-size:.8rem}.notif-page-top time{flex:none;color:#656565;font-size:.68rem}.notif-page-text{display:block;margin-top:5px;color:#a9a9a9;font-size:.78rem;line-height:1.48}.notif-page-item.unread .notif-page-text{color:#d0d0d0}.notif-page-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:280px;padding:32px;text-align:center}.notif-page-empty-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:50%;background:#242424;color:#7a7a7a;font-weight:800;font-size:1rem}.notif-page-empty h3{margin:4px 0 0;color:#eee;font-size:.95rem}.notif-page-empty p{margin:0;max-width:440px;color:#777;font-size:.78rem;line-height:1.5}
@media(max-width:760px){.notif-popover{position:fixed;top:68px;left:10px;right:10px;width:auto}.notifications-page-head{align-items:stretch;flex-direction:column}.notifications-page-count{min-width:0}.notifications-page-toolbar{align-items:stretch;flex-direction:column}.notif-page-tabs{width:100%}.notif-page-tab{flex:1}.notif-page-item{grid-template-columns:42px minmax(0,1fr) 7px;gap:10px}.notif-page-avatar{width:42px;height:42px}}

/* =========================================================
   TFD Market — посты обновлений в стиле ProvPortal, но в дизайне TFD
   ========================================================= */
.home-updates-section{padding-bottom:8px}
.home-updates-feed{margin-top:18px;display:grid;grid-template-columns:1fr;gap:18px}
.home-update-post{display:grid;grid-template-columns:285px minmax(0,1fr);min-width:0;overflow:hidden;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.home-update-post:hover{border-color:rgba(244,162,97,.24);box-shadow:var(--shadow-md);transform:translateY(-2px)}
.home-update-visual{position:relative;min-height:100%;padding:20px;overflow:hidden;border-right:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;justify-content:flex-end;background:linear-gradient(145deg,#15171a 0%,#22252b 48%,#101112 100%)}
.home-update-visual-beta1{background:linear-gradient(145deg,#121416 0%,#1e2326 50%,#101112 100%)}
.home-update-visual-glow{position:absolute;width:230px;height:230px;right:-100px;top:-90px;border-radius:50%;background:radial-gradient(circle,rgba(244,162,97,.26),rgba(244,162,97,0) 68%);pointer-events:none}
.home-update-visual-top{position:absolute;left:20px;right:20px;top:18px;display:flex;justify-content:space-between;gap:10px;color:#9098a2;font-size:.62rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.home-update-visual-main{position:relative;color:#f7f8fa;font-size:1.45rem;font-weight:850;letter-spacing:-.03em}
.home-update-visual-sub{position:relative;margin-top:6px;color:#9aa2ad;font-size:.72rem;line-height:1.35}
.home-update-body{min-width:0;padding:19px 20px 20px}
.home-update-headline{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.home-update-headline h3{margin:4px 0 0;color:#f2f4f7;font-size:1.02rem;font-weight:800}
.home-update-dot{color:#777;font-weight:500}
.home-update-date{font-size:.69rem;color:var(--text-muted);font-weight:600}
.home-update-badge{display:inline-flex;align-items:center;padding:5px 8px;border-radius:8px;border:1px solid rgba(244,162,97,.22);background:rgba(244,162,97,.09);color:#f4a261;font-size:.62rem;font-weight:800;letter-spacing:.05em}
.home-update-badge-muted{border-color:rgba(255,255,255,.09);background:rgba(255,255,255,.035);color:#9a9a9a}
.home-update-intro{margin-top:12px;color:#b0b6bf;font-size:.78rem;line-height:1.55}
.home-update-list{display:grid;gap:7px;margin-top:13px}
.home-update-item{display:grid;grid-template-columns:34px minmax(0,1fr);gap:7px;align-items:start;color:#aeb6c0;font-size:.77rem;line-height:1.5}
.home-update-item strong{color:#e8ebef;font-weight:800}
.home-update-more{margin-top:2px}
.home-update-more summary{display:inline-flex;align-items:center;gap:7px;list-style:none;color:#d8d8d8;font-size:.73rem;font-weight:700;cursor:pointer;padding:5px 0}
.home-update-more summary::-webkit-details-marker{display:none}
.home-update-more summary::after{content:'↓';font-size:.72rem;color:#777;transition:transform .16s ease}
.home-update-more[open] summary::after{transform:rotate(180deg)}
.home-update-more-content{display:grid;gap:7px;padding-top:6px}
@media(max-width:880px){.home-update-post{grid-template-columns:1fr}.home-update-visual{min-height:165px;border-right:0;border-bottom:1px solid rgba(255,255,255,.06)}}
@media(max-width:600px){.home-updates-feed{gap:14px}.home-update-body{padding:16px}.home-update-visual{min-height:150px;padding:16px}.home-update-visual-top{left:16px;right:16px;top:15px}.home-update-item{grid-template-columns:29px minmax(0,1fr);font-size:.74rem}}

.detail-support-link{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding:10px 12px;border:1px solid rgba(255,255,255,.09);border-radius:12px;color:#bcbcbc;text-decoration:none;background:rgba(255,255,255,.025);font-size:.78rem;font-weight:700;transition:.18s ease}.detail-support-link:hover{color:#fff;border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.05)}

.admin-user-account{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin:14px 0;border:1px solid var(--border,#2a2a2a);border-radius:14px;background:rgba(255,255,255,.025)}
.admin-user-account>div:first-child{display:flex;flex-direction:column;gap:4px}.admin-user-account>div:first-child span{font-size:12px;color:var(--muted,#8b8b8b)}
.admin-account-grid{display:flex;gap:22px;align-items:center}.admin-account-grid>div{display:flex;flex-direction:column;gap:3px}.admin-account-grid small{font-size:11px;color:var(--muted,#8b8b8b)}.admin-account-grid strong{font-size:13px}
.user-warning-line>span{display:flex;flex-direction:column;gap:3px}.user-warning-line time{font-size:11px;color:var(--muted,#8b8b8b)}
@media(max-width:640px){.admin-user-account{align-items:flex-start;flex-direction:column}.admin-account-grid{width:100%;justify-content:space-between}}


/* ===== Плашка cookie ===== */
.cookie-notice{position:fixed;left:22px;bottom:22px;z-index:29000;width:min(380px,calc(100vw - 28px));padding:16px 16px 14px;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:rgba(18,18,18,.97);box-shadow:0 18px 50px rgba(0,0,0,.45);backdrop-filter:blur(10px);color:#cfd3d8;opacity:0;transform:translateY(12px);transition:opacity .25s ease,transform .25s ease}
.cookie-notice.show{opacity:1;transform:none}
.cookie-notice-head{display:flex;align-items:center;gap:9px;margin-bottom:8px;color:#fff;font-size:.9rem}
.cookie-notice-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:rgba(244,162,97,.1);border:1px solid rgba(244,162,97,.2);font-size:.95rem}
.cookie-notice p{margin:0 0 12px;font-size:.74rem;line-height:1.55;color:#9aa0a6}
.cookie-notice p a{color:var(--accent-light,#f4a261);text-decoration:underline;text-underline-offset:2px}
.cookie-notice-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:560px){.cookie-notice{left:14px;right:14px;bottom:14px;width:auto}}
@media(prefers-reduced-motion:reduce){.cookie-notice{transition:none}}


/* ===== Страница «Контакты» ===== */
.contact-page .ct-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px;align-items:stretch;margin-top:8px}
.ct-hero-card{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;min-height:260px;padding:22px;border:1px solid #272727;border-radius:20px;overflow:hidden;background:radial-gradient(circle at 85% 12%,rgba(244,162,97,.2),transparent 42%),linear-gradient(145deg,#151515,#0b0b0b);box-shadow:0 20px 60px rgba(0,0,0,.2)}
.ct-hero-card strong{font-size:1.45rem;line-height:1.2;color:#fff}
.ct-hero-card>span:not(.about-card-label){color:var(--text-muted);font-size:.8rem;line-height:1.5}
.ct-handle{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px;padding:11px 14px;border:1px solid var(--accent-border);border-radius:12px;background:var(--accent-soft);color:var(--accent-light);font-weight:700;font-size:.85rem;text-decoration:none;transition:background .18s,transform .18s}
.ct-handle:hover{background:rgba(244,162,97,.18);transform:translateY(-1px)}
.ct-handle i{font-style:normal}
.ct-section{margin-top:34px}
.ct-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ct-card{display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid #222;border-radius:16px;background:#101010;color:inherit;text-decoration:none;transition:border-color .18s,transform .18s,background .18s}
.ct-card:hover{border-color:var(--accent-border);background:#131313;transform:translateY(-2px)}
.ct-card h3{margin:0 0 6px;color:#fff;font-size:.95rem}
.ct-card p{margin:0 0 10px;color:var(--text-muted);font-size:.76rem;line-height:1.55}
.ct-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--accent-soft);border:1px solid var(--accent-border);color:var(--accent-light);font-size:.85rem;font-weight:800}
.ct-link{display:inline-block;max-width:100%;overflow-wrap:anywhere;color:var(--accent-light);font-size:.76rem;font-weight:700}
.ct-topics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ct-topics article{padding:18px;border:1px solid #222;border-radius:16px;background:linear-gradient(160deg,#131313,#0d0d0d)}
.ct-topics b{display:block;margin-bottom:10px;color:var(--accent);font-size:.7rem;letter-spacing:.08em}
.ct-topics h3{margin:0 0 7px;color:#fff;font-size:.9rem}
.ct-topics p{margin:0;color:var(--text-muted);font-size:.76rem;line-height:1.55}
.ct-topics a{color:var(--accent-light);text-decoration:underline;text-underline-offset:2px}
.ct-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.ct-tips,.ct-operator{padding:22px;border:1px solid #222;border-radius:18px;background:#101010}
.ct-tips h2,.ct-operator h2{margin:6px 0 12px;color:#fff;font-size:1.15rem}
.ct-operator p{margin:0 0 14px;color:var(--text-muted);font-size:.82rem;line-height:1.6}
.ct-tips ul{margin:0 0 14px;padding:0;list-style:none;display:grid;gap:8px}
.ct-tips li{position:relative;padding-left:24px;color:var(--text-soft);font-size:.82rem;line-height:1.5}
.ct-tips li::before{content:"✓";position:absolute;left:0;top:0;display:grid;place-items:center;width:17px;height:17px;border-radius:6px;background:var(--success-soft);color:var(--success);font-size:.62rem;font-weight:800}
.ct-warn{padding:11px 13px;border:1px solid rgba(255,211,106,.28);border-radius:12px;background:rgba(255,211,106,.06);color:#e9d9a6;font-size:.76rem;line-height:1.5}
.ct-warn b{color:#ffd36a}
.ct-docs{margin-top:34px}
.ct-doc-links{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:1020px){.ct-grid,.ct-topics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.contact-page .ct-hero,.ct-two{grid-template-columns:1fr}.ct-hero-card{min-height:200px}.ct-docs{flex-direction:column;align-items:flex-start}.ct-doc-links{justify-content:flex-start}}
@media(max-width:560px){.ct-grid,.ct-topics{grid-template-columns:1fr}}


/* ===== Удаление аккаунта ===== */
.pf-danger-zone{border-color:rgba(232,120,120,.25)}
.pf-danger-zone .pf-card-head h2{color:#ff9b83}
.delete-acc-box{margin:12px 0 14px;padding:12px 14px;border:1px solid var(--border,#262626);border-radius:12px;background:rgba(255,255,255,.02);font-size:.78rem;line-height:1.5;color:var(--text-soft,#c2c2c2)}
.delete-acc-box b{display:block;margin:2px 0 4px;color:#fff;font-size:.78rem}
.delete-acc-box ul{margin:0 0 10px;padding-left:18px}
.delete-acc-box ul:last-child{margin-bottom:0}
.delete-acc-box li{margin:2px 0}
.modal-dialog .field{margin-top:12px}
.modal-dialog .auth-error[hidden]{display:none}
.modal-dialog .auth-error{margin-top:12px}
