﻿/* =========================================================
   GLOBAL.CSS - ЕДИНЫЙ ДИЗАЙН-КОД (ПОСИДЕЛКИ SUPERAPP)
   ========================================================= */

/* =========================================================
   STYLEGUIDE / КАРТА ФАЙЛА (E4.4) — как пользоваться дизайн-системой
   ---------------------------------------------------------
   СТРУКТУРА ФАЙЛА:
     0.   Токены дизайн-системы (:root) — color / radius / shadow / space
     1.   Стили главного приложения (MiniApp / биржа)
     1.1  Маркетплейс — компонентные классы (вынос инлайнов, E4.2)
     1.2  Админка — компонентные классы (вынос инлайнов, E4.2-admin)
     2.   База знаний (EdTech) — ИЗОЛИРОВАНА, префикс .edtech-page / токены --ed-*

   ОТДЕЛЬНЫЕ ПОДСИСТЕМЫ (не смешивать):
     --tg-theme-*  — тема Telegram (приходит из клиента; всегда с fallback).
     --ed-*        — база знаний; трогать только под .edtech-page.

   ТОКЕНЫ (объявлены в :root, секция 0):
     Цвет:   --color-primary/success/warning/danger/accent,
             --color-text/-text-muted/-text-faint, --color-surface/-bg/-border/-border-soft
     Радиус: --radius-xs(6) / -sm(8) / -md(12) / -lg(16) / -xl(20) / -pill(999) / -circle(50%)
     Тень:   --shadow-soft / -card / -lg
     Отступ: --space-xs(4)/-sm(8)/-md(12)/-lg(15)/-xl(20)/-2xl(30)

   УТИЛИТЫ (атомарные, одно свойство; для одиночных инлайнов):
     Отступы:  .u-mt-6/7/8/10/12/15/16   .u-mb-4/6/8/10/12/14/16/18/20   .u-m-0
     Прочее:   .u-w-auto  .u-text-center  .u-cursor-default
     ВАЖНО: .u-m-0 объявлен раньше longhand .u-mb-N и .u-mt-N — при наложении
     (.u-m-0.u-mb-12 = margin:0 0 12px) выигрывает longhand по порядку каскада.

   КЛАСТЕРЫ СВОЙСТВ → семантические компонентные классы (секции 1.1 / 1.2),
   НЕ утилита-суп. Имена: блок (.ad-card), элемент (.ad-card__title),
   модификатор (.status-badge--hot).

   ПРАВИЛА:
     • Не добавлять inline style= в разметку — заводить класс здесь.
       Исключение: поведенческое управление видимостью (style="display:none" +
       el.style.display из JS) — это НЕ оформление, остаётся в JS.
     • Значения держать тождественными при выносе (вид не меняется);
       замену #hex→var(--token) делать отдельным проходом (E4.3-replace).
     • «Висячие» токены без объявления (--danger/--primary/--border/--text-muted
       в части админ-правил) сейчас инертны; не «оживлять» молча — это меняет вид.
   ========================================================= */

/* =========================================================
   0. ТОКЕНЫ ДИЗАЙН-СИСТЕМЫ (E4.3, additive)
   Только объявление. Существующие правила НЕ переведены на токены —
   это сделает E4.3 «замена хардкода» после влития E2. Имена новые,
   нигде пока не используются → на текущий рендер не влияют.
   Не дублируют и не отменяют --tg-theme-* (тема Telegram) и --ed-*
   (изолированная база знаний) — это отдельные подсистемы.
   ========================================================= */
:root {
    /* --- A11Y-1 (2026-10-23): запасные цвета светлой темы с контрастом ≥ 4,5:1 (WCAG AA).
       Внутри Telegram кнопки и подсказки красит клиент (--tg-theme-*); эти значения видят
       VK и веб. Тёмная тема держит прежние — там они на тёмном фоне читаются. --- */
    --fallback-accent: #1d6fb0;  /* был #2481cc: 4,1:1 → 5,3:1 */
    --fallback-hint:   #6e6e73;  /* были #999/#888/#777: 2,8–4,5:1 → 5,1:1 */
    /* --- Бренд / семантика --- */
    --color-primary: var(--fallback-accent);   /* основной синий (= fallback --tg-theme-button-color) */
    --color-success: #1a7f45;   /* успех / цена (A11Y-1: был #2ecc71, 2,1:1) */
    --color-warning: #a85a00;   /* внимание / FOMO (A11Y-1: был #f39c12, 2,2:1) */
    --color-danger:  #c0392b;   /* опасность / удаление (A11Y-1: был #e74c3c, 3,8:1) */
    --color-accent:  #d35400;   /* тёплый акцент (readiness/FOMO-заголовки) */

    /* --- Нейтральные: текст --- */
    --color-text:        #111;
    --color-text-muted:  #666;
    --color-text-faint:  var(--fallback-hint);

    /* --- Нейтральные: поверхности и границы --- */
    --color-surface:     #fff;  /* карточки/панели */
    --color-bg:          #f4f4f5;
    --color-border:      #e0e0e0;
    --color-border-soft: #eee;

    /* --- Радиусы --- */
    --radius-xs:   6px;
    --radius-sm:   8px;
    --radius-md:   12px;   /* самый частый */
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-pill: 999px;
    --radius-circle: 50%;

    /* --- Тени --- */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);  /* стандарт карточки */
    --shadow-lg:   0 8px 24px rgba(15, 23, 42, 0.06);

    /* --- Отступы (шкала) --- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 15px;
    --space-xl: 20px;
    --space-2xl: 30px;

    /* --- Семантические токены (сводят hardcoded hex к переменным) --- */
    --surface: var(--tg-theme-secondary-bg-color, #fff);
    --surface-alt: var(--tg-theme-bg-color, #f4f4f5);
    --border: var(--tg-theme-hint-color, #e6e9ee);
    --border-soft: var(--tg-theme-hint-color, #eef0f3);
    --text-main: var(--tg-theme-text-color, #111);
    --text-muted: var(--tg-theme-hint-color, #666);
    --text-faint: var(--tg-theme-hint-color, var(--fallback-hint));
    --color-urgent: #93372f;
    --color-urgent-bg: #f6e4e1;
    --color-amber: #b87800;
    --color-amber-bg: #fdf8e7;
    --color-success-dark: #47693d;
    --color-success-bg: #e8f4fd;
    --color-warning-bg: #fef5e7;
    --surface-dim: #f1f3f7;
    --surface-own: #e7eef0;
    --color-amber-text: #7a5416;
    --focus-ring: #6b8fa3;
    --shadow-card-soft: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Роли в жалобах консоли (COMPL-UI): синий — жалобщик, красный — на кого жалуются. */
    --role-rep: #2563d0;
    --role-rep-bg: rgba(37, 99, 208, 0.1);
    --role-tgt: #cf3b2b;
    --role-tgt-bg: rgba(207, 59, 43, 0.09);
    /* Споры консоли (DISP-UI): жёлтое — чего система не увидела. */
    --role-warn: #b26a00;
    --role-warn-bg: rgba(178, 106, 0, 0.1);
}

/* Тема Telegram важнее системной (A11Y-1; атрибут ставит boot/telegram.js): светлый Telegram
   при тёмной системе — светлые, тёмный при светлой — эти же тёмные. Тела совпадают — сторож
   tools/tg_scheme_tokens.test.js. */
@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) {
        /* A11Y-1: в тёмной теме прежние яркие значения. */
        --fallback-accent: #2481cc;
        --fallback-hint: #999;
        --color-success: #2ecc71;
        --color-warning: #f39c12;
        --color-danger: #e74c3c;
        --surface: #1c1c1e;
        --surface-alt: #2c2c2e;
        --border: rgba(255, 255, 255, 0.12);
        --border-soft: rgba(255, 255, 255, 0.08);
        --text-main: #e5e5e7;
        --text-muted: #8e8e93;
        --text-faint: #636366;
        --color-urgent: #ff6b6b;
        --color-urgent-bg: rgba(255, 107, 107, 0.12);
        --color-amber: #ffb340;
        --color-amber-bg: rgba(255, 179, 64, 0.12);
        --color-success-dark: #6ee7a0;
        --color-success-bg: rgba(110, 231, 160, 0.10);
        --color-warning-bg: rgba(243, 156, 18, 0.12);
        --surface-dim: #2c2c2e;
        --surface-own: #3a3a3c;
        --color-amber-text: #ffb340;
        --focus-ring: #5ba3d9;
        --shadow-card-soft: 0 2px 8px rgba(0, 0, 0, 0.2);
        --role-rep: #73a6ff;
        --role-rep-bg: rgba(115, 166, 255, 0.14);
        --role-tgt: #ff7b6b;
        --role-tgt-bg: rgba(255, 123, 107, 0.13);
        --role-warn: #f2b45a;
        --role-warn-bg: rgba(242, 180, 90, 0.13);
    }
}
:root[data-tg-scheme="dark"] {
    /* A11Y-1: в тёмной теме прежние яркие значения. */
    --fallback-accent: #2481cc;
    --fallback-hint: #999;
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    --surface: #1c1c1e;
    --surface-alt: #2c2c2e;
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.08);
    --text-main: #e5e5e7;
    --text-muted: #8e8e93;
    --text-faint: #636366;
    --color-urgent: #ff6b6b;
    --color-urgent-bg: rgba(255, 107, 107, 0.12);
    --color-amber: #ffb340;
    --color-amber-bg: rgba(255, 179, 64, 0.12);
    --color-success-dark: #6ee7a0;
    --color-success-bg: rgba(110, 231, 160, 0.10);
    --color-warning-bg: rgba(243, 156, 18, 0.12);
    --surface-dim: #2c2c2e;
    --surface-own: #3a3a3c;
    --color-amber-text: #ffb340;
    --focus-ring: #5ba3d9;
    --shadow-card-soft: 0 2px 8px rgba(0, 0, 0, 0.2);
    --role-rep: #73a6ff;
    --role-rep-bg: rgba(115, 166, 255, 0.14);
    --role-tgt: #ff7b6b;
    --role-tgt-bg: rgba(255, 123, 107, 0.13);
    --role-warn: #f2b45a;
    --role-warn-bg: rgba(242, 180, 90, 0.13);
}


/* ---------- ОБЩИЕ БАЗОВЫЕ СТИЛИ ---------- */
* { 
    box-sizing: border-box; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

/* =========================================================
   1. СТИЛИ ГЛАВНОГО ПРИЛОЖЕНИЯ (INDEX.HTML / БИРЖА)
   ========================================================= */
body {
    background-color: var(--tg-theme-bg-color, #f4f4f5);
    color: var(--tg-theme-text-color, #000000);
    /* Низ — под стеклянный островок: 14 + 62 + зазор 14 (TABBAR-GLASS). */
    margin: 0; padding: 15px; padding-bottom: calc(90px + env(safe-area-inset-bottom)); box-sizing: border-box;
    /* Полноэкранный Telegram рисует «✕ Закрыть» и «⋯» ПОВЕРХ страницы и своей
       высоты не резервирует. Её отдаёт boot/telegram.js в --tg-safe-top.
       max(), а не сумма: --tg-safe-top уже включает вырез устройства, поэтому
       складывать с env() значило бы посчитать вырез дважды. Вне Telegram
       переменной нет → работает env(), как и раньше. */
    padding-top: max(15px, calc(15px + var(--tg-safe-top, 0px)), calc(15px + env(safe-area-inset-top)));
}

h2 { text-align: center; margin-top: 0; position: relative; }

/* --- НИЖНЕЕ МЕНЮ (TAB BAR) ---
   TABBAR-GLASS (макет утверждён владельцем 2026-10-30): плавающий стеклянный островок
   как в Telegram — капсула над содержимым, выбранная вкладка в своей капсуле.
   Стекло — свои токены (--glass-*), тёмные значения по схеме Telegram, как у чата. */
:root {
    --glass-bg: rgba(255, 255, 255, 0.55); --glass-solid: #f7f7f8;
    --glass-edge: rgba(255, 255, 255, 0.9); --glass-hi: rgba(255, 255, 255, 0.95);
    --glass-text: #3c3c43; --glass-ink: #000;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) {
        --glass-bg: rgba(28, 28, 30, 0.6); --glass-solid: #1f1f22;
        --glass-edge: rgba(255, 255, 255, 0.12); --glass-hi: rgba(255, 255, 255, 0.08);
        --glass-text: #c7c7cc; --glass-ink: #fff;
    }
}
:root[data-tg-scheme="dark"] {
    --glass-bg: rgba(28, 28, 30, 0.6); --glass-solid: #1f1f22;
    --glass-edge: rgba(255, 255, 255, 0.12); --glass-hi: rgba(255, 255, 255, 0.08);
    --glass-text: #c7c7cc; --glass-ink: #fff;
}
:root {
    --glass-blur: blur(14px) saturate(190%);
    --glass-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(0, 0, 0, 0.05), 0 6px 22px rgba(0, 0, 0, 0.16);
}
.bottom-nav {
    background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 0.5px solid var(--glass-edge); box-shadow: var(--glass-shadow);
    position: fixed; z-index: 1000; box-sizing: border-box;
    left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
    max-width: 520px; margin: 0 auto;
    height: 62px; border-radius: 31px; padding: 0 5px;
    display: flex; align-items: center;
}
.nav-item {
    flex: 1; min-width: 0; height: 52px; border-radius: 26px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11px; line-height: 13px; color: var(--glass-text); cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.nav-item.active {
    /* Подпись 11px на подложке 13% чистым акцентом даёт 4,3:1 (axe, нужно 4,5) —
       акцент на 15% темнее (в тёмной теме светлее). */
    color: var(--tg-theme-button-color, var(--fallback-accent)); font-weight: 600;
    color: color-mix(in srgb, var(--tg-theme-button-color, var(--fallback-accent)) 85%, var(--glass-ink));
    background: rgba(30, 111, 176, 0.13);
    background: color-mix(in srgb, var(--tg-theme-button-color, var(--fallback-accent)) 13%, transparent);
}
.nav-icon { position: relative; display: block; width: 24px; height: 24px; }
.nav-icon svg {
    display: block; width: 24px; height: 24px;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* --- ПЕРЕКЛЮЧАТЕЛИ И ЧИПСЫ --- */
.segmented-control {
    display: flex; background: var(--tg-theme-secondary-bg-color, #e0e0e0);
    border-radius: var(--radius-sm); padding: 3px; margin-bottom: 15px;
}
.segment {
    flex: 1; text-align: center; padding: 8px; border-radius: var(--radius-xs);
    font-size: 14px; font-weight: 500; color: var(--tg-theme-hint-color, #666);
    transition: 0.2s; cursor: pointer;
}
.segment.active {
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000); box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chips-container {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 5px;
    scrollbar-width: none; cursor: grab;
}
.chips-container:active { cursor: grabbing; }
.chips-container::-webkit-scrollbar { display: none; }
/* MARKET-UI: любую горизонтальную ленту на ПК тянут мышью (lib/hscroll.ts) —
   на время жеста курсор «держу» и без выделения текста. */
.hscroll-dragging, .hscroll-dragging * { cursor: grabbing !important; user-select: none; }
.chip {
    white-space: nowrap; padding: 6px 14px; background: var(--tg-theme-secondary-bg-color, #fff);
    border: 1px solid var(--tg-theme-hint-color, #ccc); border-radius: var(--radius-lg); font-size: 13px;
    color: var(--tg-theme-text-color, #000); transition: 0.2s; user-select: none;
}
.chip.active {
    background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff; border-color: var(--tg-theme-button-color, var(--fallback-accent));
}
/* MARKET-UI2: фильтры Биржи — плитки в один ряд (значок над подписью), все видны без прокрутки вбок. */
.chips-container.market-filters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; overflow: visible; cursor: default; padding-bottom: 0; margin-bottom: 10px; }
.chip.market-filter {
    display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 9px 2px 8px;
    border: 1px solid transparent; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft);
    color: var(--text-muted); font-size: 12px; font-weight: 500; text-align: center; cursor: pointer;
}
.chip.market-filter.active {
    background: var(--tg-theme-button-color, var(--fallback-accent)); border-color: var(--tg-theme-button-color, var(--fallback-accent));
    color: var(--tg-theme-button-text-color, #fff); font-weight: 600; box-shadow: none;
}
.market-filter__icon { font-size: 22px; line-height: 1; }
.market-filter__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }

.skill-tag {
    display: inline-block; padding: 6px 12px; margin: 4px; border-radius: var(--radius-md);
    border: 1px solid var(--tg-theme-button-color, var(--fallback-accent)); color: var(--tg-theme-button-color, var(--fallback-accent));
    font-size: 13px; cursor: pointer; transition: 0.2s;
}
.skill-tag.active {
    background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff;
}

/* --- ОБЩИЕ ЭЛЕМЕНТЫ --- */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

input, select, textarea {
    width: 100%; padding: 12px; border: 1px solid var(--tg-theme-hint-color, #ccc);
    border-radius: 10px; background-color: var(--tg-theme-bg-color, #f4f4f5);
    color: var(--tg-theme-text-color, #000); font-size: 16px; box-sizing: border-box;
    outline: none; margin-bottom: 15px; -webkit-appearance: none; font-family: inherit;
}

/* Флажок и радио — родные: под `appearance: none` выбранное не отличить от невыбранного. */
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; }

input:focus, select:focus, textarea:focus { border-color: var(--tg-theme-button-color, var(--fallback-accent)); }
.btn {
    width: 100%; padding: 14px; border-radius: var(--radius-md); border: none;
    font-size: 16px; font-weight: bold; cursor: pointer; text-decoration: none;
    box-sizing: border-box; text-align: center; display: block; transition: 0.2s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:active:not(:disabled) { opacity: 0.8; transform: scale(0.98); }
.btn-primary { background-color: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff; }
.btn-outline { background-color: transparent; border: 2px solid var(--tg-theme-button-color, var(--fallback-accent)); color: var(--tg-theme-button-color, var(--fallback-accent)); }
.btn-danger { color: var(--color-danger); border-color: var(--color-danger); }
.btn-warning { color: var(--color-warning); border-color: var(--color-warning); }
.btn-success { background-color: var(--color-success); color: #fff; }
.btn-purple { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); color: #fff; box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4); }

.btn-viral { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%); color: #fff; border: none; box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4); animation: pulseBtn 2s infinite; }
@keyframes pulseBtn {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 6px 20px rgba(255, 65, 108, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4); }
}

/* --- КАРТОЧКИ БИРЖИ --- */
.feed { display: flex; flex-direction: column; gap: 15px; }
.card { background-color: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); }
.card-header { font-size: 18px; font-weight: bold; margin-bottom: 12px; }
.card-details { font-size: 14px; color: var(--tg-theme-hint-color, #666); margin-bottom: 15px; line-height: 1.6; }
.price { font-size: 22px; font-weight: 800; color: var(--color-success); margin-bottom: 15px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty-state span { font-size: 40px; display: block; margin-bottom: 15px; }
.empty-state .btn { display: block; width: 100%; max-width: 280px; margin: 14px auto 0; }
.card-hint { font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); margin-top: 6px; line-height: 1.35; }
.marketplace-empty-state { color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.marketplace-empty-state b { display: block; color: var(--tg-theme-text-color, #111); margin-bottom: 6px; }
.marketplace-empty-state__text { max-width: 320px; margin: 0 auto 14px; font-size: 13px; line-height: 1.4; }
.marketplace-product-price { color: var(--color-success); }

.badge { background: var(--color-success); color: white; padding: 2px 6px; border-radius: 10px; font-size: 11px; vertical-align: middle; margin-left: 5px; }
.badge-rank { background: var(--color-warning); color: white; padding: 2px 6px; border-radius: 10px; font-size: 11px; vertical-align: middle; margin-left: 5px; }
.status-badge { display: inline-block; padding: 4px 8px; border-radius: var(--radius-xs); font-size: 12px; font-weight: bold; margin-bottom: 10px; }
.status-active { background: var(--color-success-bg); color: var(--color-primary); }
.status-progress { background: var(--color-warning-bg); color: var(--color-warning); }

/* --- ADMIN PANEL V2 --- */
.admin-shell-v2 { max-width: 1280px; margin: 0 auto; }
.admin-topbar { border: 1px solid var(--border-soft); background: linear-gradient(135deg, var(--surface) 0%, var(--color-success-bg) 100%); }
.admin-access-strip { padding: 14px 18px; }
.admin-workspace-v2 { padding: 0; overflow: hidden; border: 1px solid var(--border-soft); }
.admin-workspace-v2 > div:first-child { padding: 18px 20px 4px; }
.admin-workspace-v2 #admin-panel-content { padding: 0 20px 20px; }
.admin-nav-tabs { padding: 0 20px 14px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.admin-nav-tab { border: 1px solid var(--border); background: var(--surface); color: var(--tg-theme-button-color, var(--fallback-accent)); border-radius: var(--radius-pill); padding: 10px 13px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.admin-nav-tab.active { background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff; box-shadow: 0 8px 22px rgba(36, 129, 204, 0.20); }
.admin-v2-page { display: grid; gap: 14px; }
.admin-section-hero { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(52, 199, 89, 0.06)); border: 1px solid rgba(0, 113, 227, 0.10); }
.admin-section-hero h2 { text-align: left; margin: 0 0 6px; font-size: 24px; }
.admin-section-hero p { margin: 0; color: var(--text-muted); line-height: 1.4; }
.admin-section-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tg-theme-button-color, var(--fallback-accent)); font-weight: 900; margin-bottom: 5px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-grid--wide { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr); }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-kpi-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); }
.admin-kpi-card span { display: block; color: var(--text-muted); font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.admin-kpi-card strong { display: block; font-size: 24px; line-height: 1; color: var(--text-main); }
.admin-kpi-card small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 8px; line-height: 1.35; }
.admin-card { margin: 0; border: 1px solid var(--border-soft); }
.admin-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.admin-chip { display: inline-flex; align-items: center; border-radius: var(--radius-pill); padding: 5px 9px; font-size: 12px; font-weight: 800; line-height: 1; }
.admin-chip--ok { background: rgba(52, 199, 89, 0.12); color: var(--color-success-dark); }
.admin-chip--warn { background: rgba(255, 149, 0, 0.14); color: #a15400; }
.admin-chip--danger { background: rgba(255, 59, 48, 0.12); color: #b42318; }
.admin-chip--info { background: rgba(0, 113, 227, 0.12); color: var(--tg-theme-button-color, var(--fallback-accent)); }
.admin-chip--muted { background: rgba(102, 112, 133, 0.12); color: #475467; }
.admin-attention-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.admin-attention-row:first-of-type { border-top: 0; }
.admin-attention-row b { display: block; font-size: 14px; }
.admin-attention-row small { display: block; margin-top: 3px; color: var(--text-muted); line-height: 1.35; }
.admin-action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-action-row .btn, .admin-attention-row .btn { width: auto; margin: 0; padding: 9px 12px; font-size: 13px; }
.admin-action-list { display: grid; gap: 8px; }
.admin-action-card { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; }
.admin-action-card b, .admin-action-card small { display: block; }
.admin-action-card small { color: var(--text-muted); margin-top: 4px; line-height: 1.35; }
.admin-subtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-empty-state { display: grid; gap: 4px; padding: 18px; border-radius: 14px; background: var(--surface-alt); color: var(--text-muted); }
.admin-empty-state b { color: var(--text-main); }
@media (max-width: 900px) {
    .admin-grid, .admin-grid--wide, .admin-kpi-grid { grid-template-columns: 1fr; }
    .admin-section-hero { display: grid; }
    .admin-attention-row { grid-template-columns: 1fr; align-items: flex-start; }
}
.inline-banner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.4; box-shadow: var(--shadow-card); }
.inline-banner-success { border-color: rgba(46,204,113,0.32); background: var(--color-success-bg); color: var(--color-success-dark); font-weight: 700; }
.inline-banner-warning { border-color: rgba(241,196,15,0.45); background: var(--color-amber-bg); color: var(--color-amber-text); font-weight: 700; }
.inline-banner-actions { display: flex; gap: 8px; margin-top: 10px; }
.inline-banner-actions .btn { flex: 1; padding: 10px; font-size: 14px; }

/* --- Форма создания заказа: черновик, гейт ВУЗа, подсветка пустого поля --- */

/* O-52. Одна строка «заполните все поля» не говорила, КАКОЕ поле пустое.
   Рамка отвечает на этот вопрос там же, где человек его задаёт — у поля. */
.field-invalid { border-color: var(--color-danger) !important; }

/* O-50. Плашка восстановленного черновика. Молча подставленный текст пугает
   сильнее, чем потерянный, поэтому рядом всегда есть «Очистить». */
.create-draft-banner,
.create-institution-gate {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.create-draft-banner .btn,
.create-institution-gate .btn { flex-shrink: 0; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

/* FB24 E7: шаги гейта VK над «Опубликовать» (`screens/create/VkPublishSteps`). */
.vk-publish-steps__list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.vk-publish-steps__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vk-publish-steps__item .btn { flex-shrink: 0; }
.vk-publish-steps__item.is-done { font-weight: 400; opacity: 0.75; }
@media (max-width: 420px) {
    .vk-publish-steps__item:not(.is-done) { flex-direction: column; align-items: stretch; }
    .vk-publish-steps__item .btn { width: 100%; }
}

/* На узком экране (VK на Android — 360px) кнопка рядом с текстом ужимает его
   до одного слова в строке. Ниже порога переносим её под текст. */
@media (max-width: 420px) {
    .create-draft-banner,
    .create-institution-gate { flex-direction: column; align-items: stretch; }
    .create-draft-banner .btn,
    .create-institution-gate .btn { width: 100%; }
}

/* --- Выпадающие списки справочников (ВУЗ, город) --- */

/* O-49. Оба списка были нарисованы жёстко белым (background: "#fff" в
   CityPicker/InstitutionPicker), а цвет текста пунктов не задавался и
   наследовался от темы. В тёмной теме Telegram и VK получалось белое на белом:
   список открывался, а прочитать в нём было нечего. Подписи «Загрузка…» и
   город под названием ВУЗа тонули там же — они были прибиты к #999.

   Токены те же, что у остальных поверхностей приложения: ни одного «цвета по
   месту», иначе следующая тема сломает это снова. */
.picker-wrap { position: relative; }
.picker-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    margin-top: 4px; max-height: 220px; overflow-y: auto;
    background: var(--surface); color: var(--tg-theme-text-color, #000);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}
.picker-item {
    padding: 10px 14px; font-size: 15px; cursor: pointer;
    border-bottom: 1px solid var(--border-soft);
}
.picker-item:last-child { border-bottom: none; }
.picker-item-sub { font-size: 12px; color: var(--text-muted); }
.picker-note { padding: 10px 14px; font-size: 14px; color: var(--text-muted); }

/* O-65. Предложить новое место. Ссылкой, а не кнопкой: это не действие формы,
   а мелкая просьба на стороне — полноразмерная кнопка спорила бы с
   «Опубликовать заказ». */
.picker-request { margin-top: 6px; }
.picker-request-btn {
    padding: 0; border: none; background: none; font: inherit; cursor: pointer;
    color: var(--tg-theme-button-color, var(--fallback-accent)); text-decoration: underline;
}
.picker-request-btn:disabled { opacity: .6; cursor: default; }

/* O-63. Отданный контакт — кнопка, а не строка. Прижата к своему пузырю и не
   растягивается на всю ширину: это действие по одному сообщению, а не команда
   экрана. */
.chat-msg-contact {
    display: inline-block; margin-top: 8px; padding: 8px 12px; font-size: 13px;
    text-decoration: none;
}

/* --- Шторка «Проблема» (O-58) --- */

/* Два пункта во всю ширину, у каждого — последствие вторым абзацем. Разница
   между жалобой и спором была не видна, и выбор делался наугад; теперь он
   делается по написанному. */
.issue-option {
    display: block; width: 100%; text-align: left; cursor: pointer;
    margin: 0 0 10px; padding: 14px;
    background: var(--surface); color: var(--tg-theme-text-color, #000);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    font: inherit;
}
.issue-option b { display: block; margin-bottom: 4px; font-size: 15px; }
.issue-option span { display: block; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
/* Спор — предупреждающая рамка: он останавливает сделку, и это нужно видеть
   до нажатия, а не после. */
.issue-option--warning { border-color: rgba(241, 196, 15, 0.55); }

/* --- «Мои дела» на раскладке Биржи (O-57) --- */

/* Шапка карточки Биржи держит отступ справа под кнопку-флажок жалобы. В «Делах»
   флажка нет, а бейдж статуса стоит строкой выше и места не занимает — отступ
   там был бы дырой. */
.my-order-card-track .order-card__head,
.task-order-card-track .order-card__head,
.my-response-card .order-card__head { padding-right: 0; }

/* Строка цены у карточек «Дел» стоит перед кнопками действий, а не перед
   отдельным блоком, поэтому нижний отступ меньше. */
.my-order-card-track .order-card__bar,
.task-order-card-track .order-card__bar,
.my-response-card .order-card__bar { margin-bottom: 10px; }
/* FB24 A4: строка выбранного исполнителя с кнопкой профиля. */
.my-order-executor { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-order-executor .btn { width: auto; flex: none; padding: 6px 12px; font-size: 14px; }

/* Непрочитанные висят у названия — у него теперь свой класс. */
.order-card__title .chat-unread-badge { margin-left: 8px; vertical-align: middle; }
.market-home-summary { margin-bottom: 14px; }
.home-command-center { display: flex; flex-direction: column; gap: 14px; }
.home-hero {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
    background: linear-gradient(135deg, rgba(36, 129, 204, 0.14), rgba(46, 204, 113, 0.10));
    border: 1px solid rgba(36, 129, 204, 0.16); border-radius: 22px; padding: 18px;
    box-shadow: 0 8px 22px rgba(36, 129, 204, 0.08);
}
.home-hero h2 { text-align: left; margin: 2px 0 8px; font-size: 26px; letter-spacing: -0.03em; }
.home-hero__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tg-theme-button-color, var(--fallback-accent)); }
.home-hero__context { font-size: 15px; font-weight: 800; color: var(--tg-theme-text-color, #111); line-height: 1.35; overflow-wrap: anywhere; }
.home-hero__hint { font-size: 13px; color: var(--tg-theme-hint-color, #666); line-height: 1.4; margin-top: 4px; }
.home-hero__edit {
    flex: 0 0 auto; border: 0; border-radius: var(--radius-pill); padding: 9px 12px;
    background: var(--surface); color: var(--tg-theme-button-color, var(--fallback-accent));
    font-size: 13px; font-weight: 800; cursor: pointer;
}
.home-section {
    background: var(--tg-theme-secondary-bg-color, #fff); border-radius: 18px; padding: 14px;
    box-shadow: var(--shadow-card);
}
.home-section__title { font-size: 13px; font-weight: 900; color: var(--tg-theme-text-color, #111); margin-bottom: 10px; }
/* HOME-2: readiness-подсказка — узкая строка, без заголовка «Подсказка». */
.home-readiness {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    border: 1px dashed rgba(243, 156, 18, 0.55); border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(243,156,18,0.12), var(--surface));
    padding: 8px 10px;
}
.home-readiness__text { font-size: 13px; line-height: 1.3; color: var(--tg-theme-text-color, #111); }
.home-readiness__button {
    flex: 0 0 auto; border: 0; border-radius: var(--radius-pill); padding: 7px 11px;
    background: var(--surface); color: var(--color-accent); font-size: 13px; font-weight: 900; cursor: pointer;
}
/* Плашка «Посиделки есть и в браузере» (идея владельца 2026-10-08): синяя, не тревожная. */
.home-web-banner {
    border-color: rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, rgba(52,152,219,0.12), var(--surface));
}
.home-web-banner__close {
    flex: 0 0 auto; border: 0; background: none; padding: 4px; margin-left: -4px;
    color: var(--text-muted, #888); font-size: 14px; line-height: 1; cursor: pointer;
}
/* ACAD-1, шаг 2. Каталог видов академ-работы: две колонки и на узком экране —
   так решил владелец, плитка короткая и в одну колонку растянула бы список на
   два экрана. Бейдж говорит, как исполнитель получает работу. */
.acad-catalog { margin-top: 4px; }
.acad-catalog__title { font-size: 15px; font-weight: 900; color: var(--text-main); margin-bottom: 10px; }
.acad-catalog__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.acad-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    min-height: 118px; padding: 12px; text-align: left; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); color: var(--text-main); box-shadow: var(--shadow-soft);
}
.acad-tile:active { transform: scale(0.98); }
.acad-tile__icon, .acad-picked__icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--color-success-bg); font-size: 22px; line-height: 1;
}
.acad-tile__label { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.acad-tile__badge {
    margin-top: auto; padding: 3px 8px; border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 800; background: var(--surface-dim); color: var(--text-muted);
}
.acad-tile__badge--digital { background: var(--color-success-bg); color: var(--tg-theme-button-color, var(--fallback-accent)); }
.acad-tile__badge--physical { background: var(--color-warning-bg); color: var(--color-amber-text); }
/* HOME-2. Плитки «Что хочешь сделать?» — тот же язык, что у каталога видов работ.
   Две колонки и на телефоне; в VK плиток три — первая во всю ширину. */
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.home-tiles--odd .home-tile:first-child { grid-column: 1 / -1; }
.home-tile {
    display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px;
    text-align: left; cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); color: var(--text-main); box-shadow: var(--shadow-soft);
}
.home-tile:active { transform: scale(0.98); }
.home-tile b { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.home-tile__icon {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius-md);
    background: var(--color-success-bg); font-size: 21px; line-height: 1;
}
/* «Мои дела» — одна кликабельная строка; число — сколько дел ждут действия. */
.home-deals {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; text-align: left;
    cursor: pointer; border: 0; border-radius: 18px; color: var(--text-main);
    background: var(--tg-theme-secondary-bg-color, #fff); box-shadow: var(--shadow-card);
}
.home-deals__title { flex: 0 0 auto; font-size: 13px; font-weight: 900; }
.home-deals__text { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.home-deals__count {
    flex: 0 0 auto; min-width: 22px; padding: 2px 7px; border-radius: var(--radius-pill);
    background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 900; text-align: center;
}
.home-deals__chevron { flex: 0 0 auto; color: var(--text-faint); font-size: 18px; }
/* Лента «Свежее»: строка = иконка, тема с видом работы, цена. */
.home-feed__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.home-feed__all {
    border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; font-weight: 800;
    color: var(--tg-theme-button-color, var(--fallback-accent));
}
.home-feed__item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; text-align: left;
    cursor: pointer; border: 0; border-top: 1px solid var(--border-soft); background: none; color: var(--text-main);
}
.home-feed__item:first-of-type { border-top: 0; }
.home-feed__icon { flex: 0 0 auto; font-size: 20px; width: 28px; text-align: center; }
.home-feed__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-feed__text b { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-feed__text small { font-size: 12px; color: var(--text-muted); }
.home-feed__price { flex: 0 0 auto; font-size: 14px; font-weight: 900; color: var(--color-success); }
/* Выбранный вид над анкетой: видно, что заполняешь, и можно вернуться в каталог. */
.acad-picked {
    display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.acad-picked__label { flex: 1 1 auto; font-size: 15px; line-height: 1.25; }
.acad-picked__change { width: auto; margin: 0; }
/* ACAD-1, шаг 2б. «Шаг N из 2» — отрезок на шаг (с 2026-09-30 их два), пройденные подсвечены. */
.acad-steps { margin: 2px 0 12px; }
.acad-steps__bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; margin-bottom: 6px; }
.acad-steps__seg { height: 4px; border-radius: var(--radius-pill); background: var(--surface-dim); }
.acad-steps__seg--done { background: var(--tg-theme-button-color, var(--fallback-accent)); }
.acad-steps__text { font-size: 12px; font-weight: 800; color: var(--text-muted); }
/* «Как получаешь работу?» — две кнопки-варианта; последствие выбора под ними. */
.acad-format { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acad-format__option {
    padding: 11px 10px; text-align: left; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1.25;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-main);
    overflow-wrap: anywhere;
}
.acad-format-hint { margin: 6px 0 12px; }
/* Галочка «речь к защите»: общий input растягивается на 100%, у чекбокса — нет. */
.acad-check { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.acad-check input { width: auto; margin: 0; flex: 0 0 auto; }
.acad-format__option--active {
    border-color: var(--tg-theme-button-color, var(--fallback-accent)); background: var(--color-success-bg);
    box-shadow: 0 0 0 1px var(--tg-theme-button-color, var(--fallback-accent)) inset;
}
/* CREATE-6 — форма Встречи нажатиями: место, день, время, цена, «кто нужен». */
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pick-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pick-chips--scroll::-webkit-scrollbar { display: none; }
.pick-chip {
    flex: 0 0 auto; width: auto; margin: 0; padding: 9px 12px; cursor: pointer; text-align: center;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-main);
}
.pick-chip small { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
/* Оттенок поверх своей подложки, а не поверх страницы: в тёмной теме токен
   полупрозрачный, и на светлом фоне страницы текст кнопки пропадал. */
.pick-chip--on {
    border-color: var(--tg-theme-button-color, var(--fallback-accent));
    background: linear-gradient(var(--color-success-bg), var(--color-success-bg)), var(--surface);
    box-shadow: 0 0 0 1px var(--tg-theme-button-color, var(--fallback-accent)) inset;
}
.pick-chip--more { border-style: dashed; }
.pick-chip:disabled { opacity: 0.4; cursor: default; }
.pick-chips.field-invalid .pick-chip:not(.pick-chip--on) { border-color: var(--color-danger); }
.pick-full, .pick-hint { margin: -4px 0 10px; }
/* CREATE-6, макет 2026-10-10 — форма Встречи: заголовок блока обычным регистром,
   пояснение серым справа; места лентой в 3 строки; «Когда» одной карточкой;
   низ (сводка + кнопка-прогресс) закреплён над нижним меню. */
.create-title-back {
    display: flex; align-items: center; gap: 6px; width: auto; margin: 0 0 12px -2px; padding: 2px;
    border: 0; background: none; color: inherit; cursor: pointer; font: inherit;
}
.create-title-back h2 { margin: 0; font-size: 21px; font-weight: 800; text-align: left; }
.create-title-back i { font-style: normal; font-size: 28px; line-height: 1; margin-top: -3px; color: var(--tg-theme-button-color, var(--fallback-accent)); }
.pick-block, #wrap-audience { margin-bottom: 16px; }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pick-head > span { font-size: 16px; font-weight: 700; }
.pick-head em { font-style: normal; font-size: 12px; text-align: right; color: var(--text-faint); }
.pick-link {
    width: auto; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--tg-theme-button-color, var(--fallback-accent));
}
.pick-add { display: block; margin-bottom: 16px; text-align: left; white-space: normal; }
.pick-add span { font-size: 12px; font-weight: 400; color: var(--text-faint); }
input.pick-own { margin-bottom: 10px; }
#audience.pick-own:not(.field-invalid) { border-color: var(--tg-theme-button-color, var(--fallback-accent)); box-shadow: 0 0 0 1px var(--tg-theme-button-color, var(--fallback-accent)) inset; }
/* Лента мест: строки листаются вбок разом; край обрезанной кнопки и затухание
   справа говорят, что дальше есть ещё. Выходит за отступ страницы до края экрана. */
.pick-ribbon { position: relative; margin-right: -15px; }
.pick-ribbon::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--tg-theme-bg-color, #f4f4f5));
}
.pick-ribbon__scroll { overflow-x: auto; scrollbar-width: none; padding-right: 15px; }
.pick-ribbon__scroll::-webkit-scrollbar { display: none; }
.pick-ribbon__rows { display: flex; flex-direction: column; gap: 8px; width: max-content; }
.pick-chips--row { flex-wrap: nowrap; margin-bottom: 0; }
/* «Когда»: дни и время на одной карточке, между ними тонкая линия. */
.pick-card { padding: 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card-soft); }
.pick-card .pick-chip { background: var(--surface-alt); border-color: transparent; }
.pick-card .pick-chip--on { border-color: var(--tg-theme-button-color, var(--fallback-accent)); background: linear-gradient(var(--color-success-bg), var(--color-success-bg)), var(--surface); }
.pick-card .pick-chip--more { border-color: var(--border); }
.pick-card__line { height: 1px; margin: 10px -10px; background: var(--border-soft); }
.pick-card__input { margin: 8px 0 0; }
.pick-grid { display: grid; gap: 6px; }
.pick-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pick-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick-grid .pick-chip { min-width: 0; padding: 9px 2px; white-space: nowrap; }
#price-chips { margin-bottom: 10px; }
.pick-grid.field-invalid .pick-chip:not(.pick-chip--on) { border-color: var(--color-danger); }
.pick-card + .pick-hint { margin-top: 8px; }
/* «Кого ищете»: сегмент — серый трек, выбранное белой «таблеткой». */
.pick-seg { display: flex; padding: 3px; border-radius: var(--radius-md); background: var(--surface-dim); }
.pick-seg__opt {
    flex: 1 1 0; width: auto; margin: 0; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--text-main);
}
.pick-seg__opt--on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
/* Закреплённый низ: над островком нижнего меню (14 + 62 + зазор 8 + вырез), во всю ширину. */
.meeting-foot {
    position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5;
    margin: 8px -15px 0; padding: 8px 15px 10px;
    background: var(--surface); border-top: 1px solid var(--border-soft);
}
.meeting-foot__summary {
    margin: 0 0 8px; text-align: center; font-size: 13px; color: var(--text-faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meeting-foot__summary--ready { color: var(--text-main); font-weight: 600; }
.meeting-foot__btn { display: block; width: 100%; margin: 0; }
.meeting-foot__btn--progress { position: relative; overflow: hidden; background: var(--surface-dim); color: var(--text-muted); }
.meeting-foot__fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(46, 204, 113, 0.32); transition: width .3s ease; }
.meeting-foot__text { position: relative; }
.meeting-foot__text b { margin-left: 6px; font-size: 13px; opacity: .7; }
/* CREATE-8 — «Повторить» прошлую Встречу над формой и «Отменить» после повтора. */
.repeat-block { margin: 4px 0 14px; }
.repeat-card {
    margin-bottom: 8px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-main);
}
.repeat-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.repeat-card__uses { flex: 0 0 auto; font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.repeat-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.repeat-card__actions .btn { width: auto; margin: 0; }
.repeat-lead { margin: -4px 0 12px; }
.repeat-filled {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-main);
    overflow-wrap: anywhere;
}
.repeat-filled span { flex: 0 0 auto; font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.create-back { width: auto; margin: 0 0 6px; }
/* «‹ Назад» и заголовок — одной строкой (владелец 2026-10-10): кнопка слева,
   заголовок по центру экрана, как и без кнопки. */
/* FB24 B3: подписи блоков «Повторить» / «Новый заказ» — разделитель по центру,
   без стикеров (стикер сливался с блоком под ним; владелец 2026-10-24). */
.create-section { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tg-theme-hint-color, var(--fallback-hint)); } /* A11Y-1: #8a8a8e — 3,1:1 */
.create-section::before, .create-section::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.create-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 34px; margin-bottom: 16px; }
.create-head h2 { margin: 0; padding: 0 78px; }
.create-head .create-back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); margin: 0; z-index: 1; }
/* CREATE-UI (владелец 2026-10-22, вариант В): сетка 2×2 крупных плиток, у типа
   свой мягкий фон. Текст плитки — свой, а не цвет темы Telegram: фон плитки
   светлый или тёмный по схеме устройства, и текст обязан идти с ним в паре. */
:root {
    --create-presence: #e8f2fb; --create-academic: #fff4e0; --create-work: #eaf7ef; --create-product: #f6ecfb;
    --create-tile-text: #111418; --create-tile-hint: #5f6b76; --create-tile-border: rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) {
        --create-presence: #1c2d3f; --create-academic: #362a17; --create-work: #1a3326; --create-product: #30223b;
        --create-tile-text: #f2f4f6; --create-tile-hint: #a3afbb; --create-tile-border: rgba(255, 255, 255, 0.06);
    }
}
:root[data-tg-scheme="dark"] {
    --create-presence: #1c2d3f; --create-academic: #362a17; --create-work: #1a3326; --create-product: #30223b;
    --create-tile-text: #f2f4f6; --create-tile-hint: #a3afbb; --create-tile-border: rgba(255, 255, 255, 0.06);
}
.create-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create-type {
    display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 16px;
    width: 100%; min-height: 120px; margin: 0; padding: 14px; cursor: pointer; text-align: left;
    font: inherit; line-height: 1.2;
    border: 1px solid var(--create-tile-border); border-radius: 18px; background: var(--surface); color: var(--create-tile-text);
}
.create-type i { font-size: 30px; font-style: normal; line-height: 1; }
.create-type b { display: block; font-size: 16px; font-weight: 800; }
.create-type small { display: block; margin-top: 3px; font-size: 12px; color: var(--create-tile-hint); }
.create-type--presence { background: var(--create-presence); }
.create-type--academic { background: var(--create-academic); }
.create-type--work { background: var(--create-work); }
.create-type--product { background: var(--create-product); }
/* Без академа (VK) плиток три: последняя ложится во всю ширину строкой. */
.create-type:last-child:nth-child(odd) {
    grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; min-height: 0;
}
.repeat-undo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.repeat-undo .btn { width: auto; margin: 0; flex: 0 0 auto; }
/* UX-TG №19: экран «Опубликовано — что дальше» во вкладке «Создать». */
.published-steps { margin: 4px 0 0; padding-left: 22px; line-height: 1.5; }
.published-steps li { margin-bottom: 6px; }
.home-legal-footer {
    margin-top: 14px; padding: 12px 4px 4px; text-align: center;
    line-height: 1.9; color: var(--tg-theme-hint-color, var(--fallback-hint)); font-size: 12px;
}
.home-legal-footer__sep { color: var(--tg-theme-hint-color, #bbb); }
.home-legal-footer__link {
    border: 0; background: none; padding: 0; cursor: pointer;
    color: var(--tg-theme-hint-color, var(--fallback-hint)); font-size: 12px; text-decoration: underline;
}
.btn-boost { color: var(--color-accent); border-color: var(--color-accent); font-weight: 800; }
.marketplace-product-banner { border-color: rgba(46, 204, 113, 0.28); background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(36, 129, 204, 0.04)); }
.marketplace-product-banner__title { font-weight: 700; color: var(--tg-theme-text-color, #000); margin-bottom: 4px; }
.marketplace-product-banner__text { color: var(--tg-theme-hint-color, #666); }
.marketplace-product-banner__button { margin-top: 10px; }
/* MARKET-UI2 (макет А, владелец 2026-10-23): канал категории — одной строкой, не плашкой. */
.market-channel-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--radius-md); background: var(--surface-dim); font-size: 13px; line-height: 1.3; }
.market-channel-line__text { flex: 1 1 auto; min-width: 0; color: var(--text-muted); }
.market-channel-line__open { border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--tg-theme-link-color, var(--fallback-accent)); cursor: pointer; }
.marketplace-job-banner { border-color: rgba(52, 152, 219, 0.28); background: linear-gradient(135deg, rgba(52, 152, 219, 0.08), rgba(241, 196, 15, 0.06)); }
.marketplace-job-banner__title { font-weight: 700; color: var(--tg-theme-text-color, #000); margin-bottom: 4px; }
.marketplace-job-banner__text { color: var(--tg-theme-hint-color, #666); }
.marketplace-worker-banner { border-color: rgba(241, 196, 15, 0.28); background: linear-gradient(135deg, rgba(241, 196, 15, 0.10), rgba(230, 126, 34, 0.08)); }
.marketplace-worker-banner__title { font-weight: 700; color: var(--tg-theme-text-color, #000); margin-bottom: 4px; }
.marketplace-worker-banner__text { color: var(--tg-theme-hint-color, #666); }
.profile-summary-card { background: linear-gradient(135deg, rgba(36, 129, 204, 0.08), rgba(52, 152, 219, 0.04)); border: 1px solid rgba(36, 129, 204, 0.14); }
.profile-summary-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.profile-summary-card__title { font-size: 16px; font-weight: 700; color: var(--tg-theme-text-color, #000); }
.profile-summary-card__subtitle { font-size: 13px; color: var(--tg-theme-hint-color, #666); margin-top: 2px; }
.profile-summary-card__score { padding: 6px 10px; border-radius: var(--radius-pill); background: var(--surface); color: var(--tg-theme-button-color, var(--fallback-accent)); font-size: 12px; font-weight: 700; white-space: nowrap; }
.profile-summary-card__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.profile-summary-card__item { background: var(--surface); border-radius: var(--radius-md); padding: 10px; }
.profile-summary-card__label { font-size: 12px; color: var(--tg-theme-hint-color, #666); margin-bottom: 2px; }
.profile-summary-card__value { font-size: 14px; font-weight: 700; color: var(--tg-theme-text-color, #000); }
.profile-summary-card__guide { background: var(--surface); border-radius: var(--radius-md); padding: 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.35; color: var(--text-main); }
.profile-summary-card__actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.profile-summary-card__actions .btn { margin: 0; padding: 10px; font-size: 14px; }
@media (max-width: 480px) {
    .home-hero { flex-direction: column; }
    .home-hero__edit { width: 100%; }
    .profile-summary-card__grid { grid-template-columns: 1fr; }
}

/* --- FOMO И ПРОФИЛЬ --- */
.fomo-card { background: linear-gradient(135deg, var(--surface) 0%, var(--color-amber-bg) 100%); border-radius: var(--radius-xl); padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(243,156,18,0.15); border: 1px solid var(--border);}
.fomo-title { font-size: 15px; font-weight: 800; color: var(--color-accent); margin-bottom: 12px; text-align: center; }
.fomo-progress-bg { background: var(--border); height: 12px; border-radius: var(--radius-xs); overflow: hidden; margin-bottom: 12px; }
.fomo-progress-fill { background: linear-gradient(90deg, #f1c40f, #f39c12); height: 100%; width: 0%; transition: width 1s ease; border-radius: var(--radius-xs);}
.fomo-stats { display: flex; justify-content: space-between; font-size: 14px; font-weight: bold; margin-bottom: 6px; color: var(--text-main) !important; }
.fomo-hint { font-size: 12px; color: var(--color-accent) !important; text-align: center; margin-bottom: 15px; font-weight: 600;}
.fomo-personal { background: var(--surface); padding: 15px 10px; border-radius: var(--radius-md); font-size: 13px; font-weight: bold; text-align: center; border: 2px dashed var(--color-success); color: var(--text-main) !important;}

.profile-header { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-xl); padding: 25px 20px; text-align: center; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.profile-status-card { background: linear-gradient(135deg, var(--tg-theme-secondary-bg-color, #fff), rgba(36, 129, 204, 0.06)); }
.profile-section-title { margin: 4px 4px 10px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.profile-rank { font-size: 18px; font-weight: bold; color: var(--tg-theme-text-color, #000); margin-bottom: 5px; }
.profile-date { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; }
.profile-verification-line { display: inline-block; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(36, 129, 204, 0.08); color: var(--tg-theme-button-color, var(--fallback-accent)); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.reputation-badge { display: inline-block; background: var(--color-success-bg); color: var(--color-primary); padding: 6px 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: bold; margin-bottom: 5px;}

.stats-card { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-lg); padding: 15px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.profile-trust-card { padding: 0; overflow: hidden; }
.profile-trust-list .setting-item { padding: 14px 15px; }
.stats-row { display: flex; justify-content: space-between; text-align: center; }
.stats-col { flex: 1; border-right: 1px solid var(--tg-theme-bg-color, #eee); }
.stats-col:last-child { border-right: none; }
.stats-title { font-size: 14px; font-weight: bold; color: var(--tg-theme-text-color, #000); margin-bottom: 10px; }
.stats-info { font-size: 13px; color: var(--tg-theme-hint-color, #666); line-height: 1.6; }

.action-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.form-section { display: none; background-color: var(--tg-theme-secondary-bg-color, #fff); padding: 20px; border-radius: var(--radius-xl); margin-bottom: 20px; }

.settings-list { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-card);}
.setting-item { display: flex; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--tg-theme-bg-color, #eee); font-size: 16px; cursor: pointer; color: var(--tg-theme-text-color, #000);}
.setting-item:last-child { border-bottom: none; }
.setting-val { color: var(--tg-theme-hint-color, var(--fallback-hint)); font-size: 14px; text-align: right;}

/* --- ПРОФИЛЬ «DASHBOARD» (Variant C) --- */
.pc-profile-card {
    background: var(--tg-theme-secondary-bg-color, #fff);
    margin: 12px 16px; border-radius: var(--radius-xl);
    padding: 20px; box-shadow: var(--shadow-card);
    display: flex; align-items: center; gap: 14px;
}
.pc-avatar {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, var(--tg-theme-button-color, var(--fallback-accent)), #1a6aa5);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff; flex-shrink: 0; font-weight: 700;
}
.pc-info { flex: 1; min-width: 0; }
.pc-name {
    font-size: 17px; font-weight: 700; color: var(--tg-theme-text-color, #000);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-city { font-size: 13px; color: var(--tg-theme-hint-color, #666); margin-top: 1px; }
.pc-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.pc-tag {
    padding: 2px 8px; border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 600;
}
.pc-tag-rank { background: rgba(243, 156, 18, 0.12); color: var(--color-amber); }
.pc-tag-verified { background: rgba(46, 204, 113, 0.12); color: var(--color-success-dark); }
.pc-tag-rep { background: rgba(36, 129, 204, 0.1); color: var(--tg-theme-button-color, var(--fallback-accent)); }
.pc-dashboard {
    margin: 0 16px; display: grid;
    grid-template-columns: 1fr 1fr; gap: 10px;
}
.pc-dash {
    background: var(--tg-theme-secondary-bg-color, #fff);
    border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.pc-dash::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.pc-dash-exec::before { background: linear-gradient(90deg, var(--tg-theme-button-color, var(--fallback-accent)), #5ba3e0); }
.pc-dash-cli::before { background: linear-gradient(90deg, var(--color-success), #58d68d); }
.pc-dash-emoji { font-size: 20px; margin-bottom: 8px; }
.pc-dash-label {
    font-size: 12px; color: var(--tg-theme-hint-color, #666); font-weight: 500;
}
.pc-dash-value {
    font-size: 26px; font-weight: 700; margin-top: 2px;
    color: var(--tg-theme-text-color, #000);
}
.pc-dash-stars { font-size: 13px; color: var(--color-warning); margin-top: 2px; }
.pc-dash-stars--empty { font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.pc-dash-row {
    display: flex; justify-content: space-between;
    padding: 5px 0; border-top: 1px solid var(--tg-theme-bg-color, #eee); margin-top: 8px;
}
.pc-dash-row-l { font-size: 13px; color: var(--tg-theme-hint-color, #666); }
.pc-dash-row-v { font-size: 13px; font-weight: 600; color: var(--tg-theme-text-color, #000); }
.pc-trust {
    margin: 12px 16px; background: var(--tg-theme-secondary-bg-color, #fff);
    border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-card);
}
.pc-trust-head {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.pc-trust-title {
    font-size: 15px; font-weight: 600; color: var(--tg-theme-text-color, #000);
}
.pc-trust-badge {
    font-size: 13px; font-weight: 700; padding: 3px 10px;
    border-radius: var(--radius-pill);
}
.pc-trust-badge-high { background: rgba(46, 204, 113, 0.1); color: var(--color-success-dark); }
.pc-trust-badge-medium { background: rgba(243, 156, 18, 0.1); color: var(--color-amber); }
.pc-trust-badge-low { background: rgba(231, 76, 60, 0.1); color: var(--color-danger); }
.pc-trust-bars { display: flex; flex-direction: column; gap: 8px; }
.pc-trust-row { display: flex; align-items: center; gap: 10px; }
.pc-trust-lbl {
    font-size: 13px; color: var(--tg-theme-hint-color, #666);
    width: 90px; flex-shrink: 0;
}
.pc-trust-track {
    flex: 1; height: 8px; background: var(--tg-theme-bg-color, #eee);
    border-radius: 4px; overflow: hidden;
}
.pc-trust-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.pc-trust-fill-green { background: var(--color-success); }
.pc-trust-fill-blue { background: var(--tg-theme-button-color, var(--fallback-accent)); }
.pc-trust-pct {
    font-size: 12px; font-weight: 600; width: 32px; text-align: right;
    color: var(--tg-theme-text-color, #000);
}
/* ST3-23 — «Надёжность»: карточка профиля и шторка «Моя надёжность».
   Уровни по порогам доступа 25/45/65/80 (screens/profile/reliability.ts). */
.pc-trust[role="button"] { cursor: pointer; }
/* Цвета — числом: --color-amber и --color-success-dark в светлой теме
   ссылаются сами на себя и не рисуются (сегменты шкалы пропадали). */
.rel-critical { --rel-color: var(--color-danger); }
.rel-risk { --rel-color: var(--color-warning); }
.rel-stable { --rel-color: #d4ac0d; }
.rel-strong { --rel-color: var(--color-success); }
.rel-elite { --rel-color: #1e9e5a; }
.rel-badge {
    font-size: 13px; font-weight: 700; padding: 3px 10px;
    border-radius: var(--radius-pill); color: var(--rel-color);
    background: color-mix(in srgb, var(--rel-color) 12%, transparent);
}
.rel-fill { background: var(--rel-color); }
.rel-card-score { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.rel-card-num { font-size: 26px; font-weight: 700; color: var(--tg-theme-text-color, #000); }
.rel-card-of { font-size: 13px; color: var(--tg-theme-hint-color, #666); }
.rel-card-hint { font-size: 13px; color: var(--tg-theme-hint-color, #666); margin-top: 8px; }
.rel-card-more { font-size: 13px; color: var(--tg-theme-link-color, var(--fallback-accent)); margin-top: 8px; }
.rel-section-title { font-size: 15px; font-weight: 600; margin: 14px 0 6px; color: var(--tg-theme-text-color, #000); }
.rel-list { margin: 0; padding-left: 0; list-style: none; font-size: 14px; line-height: 1.5; }
.rel-list li { margin-bottom: 6px; color: var(--tg-theme-text-color, #000); }
/* REL-SCR (2026-10-02) — полукруглый датчик, «Сейчас можно» строками, водопад «Как сложилось
   число». Шкала до `reliability.max` (потолок формулы), а не до 100. Фоны — от hint-цвета, не
   `--surface-dim`: тот следует теме системы, а шторка вне Telegram остаётся белой. */
.rel-gauge-card { text-align: center; padding-top: 2px; }
.rel-gauge { display: block; width: 100%; max-width: 280px; margin: 0 auto; }
.rel-gauge-seg { fill: none; stroke: var(--rel-color); stroke-width: 16; stroke-linecap: round; opacity: 0.3; }
.rel-gauge-seg.is-on { opacity: 1; }
.rel-gauge-tick { font-size: 10px; text-anchor: middle; fill: var(--tg-theme-hint-color, var(--fallback-hint)); }
.rel-gauge-mark { fill: var(--tg-theme-secondary-bg-color, #fff); stroke: var(--rel-color); stroke-width: 5; }
.rel-gauge-num {
    font-size: 46px; font-weight: 800; line-height: 1; margin-top: -84px;
    position: relative; color: var(--tg-theme-text-color, #000);
}
.rel-gauge-of { font-size: 13px; color: var(--tg-theme-hint-color, #666); margin: 4px 0 8px; }
.rel-tip {
    margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--tg-theme-hint-color, var(--fallback-hint)) 12%, transparent);
    font-size: 13px; line-height: 1.45; text-align: left; color: var(--tg-theme-text-color, #000);
}
.rel-rows { font-size: 14px; }
.rel-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: var(--tg-theme-text-color, #000); }
.rel-row b { text-align: right; }
.rel-pen-sub { display: block; font-size: 12px; color: var(--tg-theme-hint-color, #666); }
.rel-row b.rel-pen-points { color: var(--color-danger); white-space: nowrap; }
.rel-wf {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
    gap: 6px 8px; align-items: center; font-size: 13px;
}
.rel-wf-row { display: contents; }
.rel-wf-label { color: var(--tg-theme-hint-color, #666); }
.rel-wf-total > .rel-wf-label { color: var(--tg-theme-text-color, #000); font-weight: 700; }
.rel-wf-track { position: relative; height: 18px; }
.rel-wf-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px;
    background: color-mix(in srgb, var(--tg-theme-hint-color, var(--fallback-hint)) 18%, transparent); }
.rel-wf-bar { position: absolute; top: 2px; height: 14px; border-radius: 4px; }
.rel-wf-value { min-width: 30px; text-align: right; font-weight: 700; white-space: nowrap; color: var(--tg-theme-text-color, #000); }
.rel-wf-bar.rel-plus { background: #1e9e5a; }
.rel-wf-value.rel-plus { color: #1e9e5a; }
.rel-wf-bar.rel-minus { background: var(--color-danger); }
.rel-wf-value.rel-minus { color: var(--color-danger); }
.rel-wf-bar.rel-zero { background: var(--tg-theme-hint-color, var(--fallback-hint)); }
.rel-wf-value.rel-zero { color: var(--tg-theme-hint-color, #666); }
.rel-wf-bar.rel-wf-start { background: var(--tg-theme-hint-color, var(--fallback-hint)); opacity: 0.4; }
.rel-wf-bar.rel-wf-level { background: var(--rel-color); }
.rel-link { color: var(--tg-theme-link-color, var(--fallback-accent)); cursor: pointer; }
.pc-shortcuts {
    margin: 12px 16px; display: grid;
    grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.pc-shortcut {
    background: var(--tg-theme-secondary-bg-color, #fff);
    border-radius: var(--radius-md); padding: 14px 8px; text-align: center;
    box-shadow: var(--shadow-card); cursor: pointer;
}
.pc-shortcut:active { background: var(--tg-theme-bg-color, #f0f0f0); }
.pc-shortcut-icon { font-size: 24px; margin-bottom: 4px; }
.pc-shortcut-lbl {
    font-size: 11px; color: var(--tg-theme-hint-color, #666); line-height: 1.3;
}
.pc-section {
    margin: 16px 16px 0;
}
.pc-section-title {
    font-size: 16px; font-weight: 700; color: var(--tg-theme-text-color, #000);
    margin-bottom: 8px;
}
.pc-section-card {
    background: var(--tg-theme-secondary-bg-color, #fff);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
}
.pc-section-card .setting-item { padding: 14px 16px; }
/* UN-2 — закрываемая плашка в профиле: крестик в правом верхнем углу. */
.pc-hint-card { position: relative; }
.pc-hint-close { position: absolute; top: 6px; right: 6px; background: none; border: 0; color: var(--text-muted); font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer; }
.pc-footer {
    text-align: center; padding: 20px 16px 28px;
    font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); line-height: 1.5;
}

/* --- ШТОРКИ (BOTTOM SHEETS) --- */
.sheet-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; animation: fadeIn 0.2s; }
.bottom-sheet { display: none; position: fixed; bottom: -100%; left: 0; right: 0; background: var(--tg-theme-secondary-bg-color, #fff); padding: 20px; border-radius: 20px 20px 0 0; z-index: 2001; transition: bottom 0.3s ease-out; box-shadow: 0 -5px 15px rgba(0,0,0,0.1); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.bottom-sheet.open { bottom: 0; }
/* Любая шторка не выше экрана и листается внутри: без этого длинная (десятки пунктов,
   профиль с отзывами, маленький телефон, открытая клавиатура) уходила за край, и до
   нижних кнопок было не добраться. Шторки со своей прокруткой списка ниже задают своё. */
.bottom-sheet { max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* Колонка: шапка и «Закрыть» на месте, список сжимается под экран. Без flex список держал
   свои 64vh, и на маленьком телефоне «Закрыть» обрезался снизу. Sheet ставит display:block
   в style — перебиваем. В flex поля не схлопываются — у подзаголовка верхнее убрано. */
.bottom-sheet.candidates-sheet { display: flex !important; flex-direction: column; overflow: hidden; }
.bottom-sheet.candidates-sheet > .sheet-subtitle { margin-top: 0; }
/* EXEC-INV: «Подходящие исполнители» прокручиваются внутри шторки. */
.suggested-list { overflow-y: auto; max-height: min(64vh, 560px); min-height: 0; flex: 0 1 auto; padding-right: 4px; overscroll-behavior: contain; }
.candidate-card { margin-bottom: 10px; }
.candidate-card--compact { padding: 12px; margin-bottom: 8px; }
.sheet-close-danger { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ff3b30; color: #fff; font-size: 24px; line-height: 30px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(255,59,48,0.25); }
.sheet-close-danger:active { transform: scale(0.94); }
/* O-83: «Что нового» — пунктов под полсотни. Шторка не выше экрана, шапка и «Понятно»
   на месте, прокручивается только список. Sheet ставит display:block в style — перебиваем. */
.bottom-sheet.whats-new-sheet { display: flex !important; flex-direction: column; overflow: hidden; }
.whats-new-subtitle { margin-top: 0; margin-bottom: 12px; line-height: 1.4; }
.whats-new-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    list-style: none; margin: 0 -4px; padding: 0 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.whats-new-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.4; }
.whats-new-item:last-child { border-bottom: 0; }
.whats-new-item summary { list-style: none; cursor: pointer; position: relative; padding-left: 20px; font-weight: 500; }
.whats-new-item summary::-webkit-details-marker { display: none; }
.whats-new-item summary::before { content: ""; position: absolute; left: 3px; top: 0.45em; width: 6px; height: 6px;
    border-right: 2px solid var(--tg-theme-hint-color, var(--fallback-hint)); border-bottom: 2px solid var(--tg-theme-hint-color, var(--fallback-hint));
    transform: rotate(-45deg); transition: transform 0.15s; }
.whats-new-item details[open] summary::before { transform: rotate(45deg); }
.whats-new-item details p { margin: 6px 0 0 20px; font-size: 14px; color: var(--text-muted); }
.whats-new-head { padding-left: 20px; font-weight: 500; }
.whats-new-ok { flex: none; margin-top: 12px; }

/* --- ЧАТ «ТРЕД СДЕЛКИ» (U7) --- */
.chat-sheet { max-height: 88vh; overflow: hidden; flex-direction: column; }
.chat-thread { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: min(60vh, 520px); padding: 4px; overscroll-behavior: contain; }
/* CHAT-1 (макет владельца 2026-09-19, «вариант 1 + этапы», фон «Графит»).
   Свои цвета чата, а не цвета темы Telegram: входящий пузырь был окрашен в
   --tg-theme-bg-color, то есть в фон экрана, и в тёмной теме исчезал. */
:root {
    --chat-wall: #bcd6e4; --chat-wall-1: #a6cbea; --chat-wall-2: #c6e3bd; --chat-wall-3: #d3c8ee; --chat-wall-4: #a6d9d3;
    --chat-wall-mark: rgba(22, 56, 92, 0.13);
    --chat-compose: #f7f8f9; --chat-field: #fff; --chat-field-line: #d9dde2; --chat-icon: #858e99;
    --chat-bar: #fff; --chat-sep: #e2e5e9; --chat-text: #111418; --chat-muted: #6e7884;
    --chat-accent: #2f80d8; --chat-input: #f1f3f5; --chat-pill: #eef0f3;
    --chat-in: #fff; --chat-in-text: #111418; --chat-out: #dcecff; --chat-out-text: #0e2440;
    --chat-time: #98a2ad; --chat-out-time: #5f88b8;
    --chat-ev: rgba(92, 104, 118, 0.62); --chat-ev-text: #fff; --chat-file: #f1f4f7;
    --chat-ok: #2f9a5a; --chat-warn: #b87516; --chat-word: #2b62b8; --chat-pdf: #d24a3b; --chat-pptx: #c4572a;
    --chat-in-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
    --chat-av1: #e07a5f; --chat-av2: #3d8bd4; --chat-av3: #5aa469; --chat-av4: #9b6dd6;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) {
        --chat-wall: #0f1923; --chat-wall-1: #1b3046; --chat-wall-2: #142c24; --chat-wall-3: #261f3c; --chat-wall-4: #142f33;
        --chat-wall-mark: rgba(255, 255, 255, 0.07);
        --chat-compose: #17212b; --chat-field: #242f3d; --chat-field-line: transparent; --chat-icon: #7f91a4;
        --chat-bar: #17212b; --chat-sep: #0b1118; --chat-text: #f2f4f6; --chat-muted: #8a9aab;
        --chat-accent: #5b95d6; --chat-input: #222c38; --chat-pill: #232e3c;
        --chat-in: #1c2733; --chat-in-text: #f2f4f6; --chat-out: #2b5278; --chat-out-text: #fff;
        --chat-time: #7d8e9e; --chat-out-time: #8fb6dc;
        --chat-ev: rgba(28, 39, 51, 0.92); --chat-ev-text: #dfe6ee; --chat-file: #253343;
        --chat-ok: #3fae6b; --chat-warn: #e3a54f;
        --chat-in-shadow: none;
    }
}
:root[data-tg-scheme="dark"] {
    --chat-wall: #0f1923; --chat-wall-1: #1b3046; --chat-wall-2: #142c24; --chat-wall-3: #261f3c; --chat-wall-4: #142f33;
    --chat-wall-mark: rgba(255, 255, 255, 0.07);
    --chat-compose: #17212b; --chat-field: #242f3d; --chat-field-line: transparent; --chat-icon: #7f91a4;
    --chat-bar: #17212b; --chat-sep: #0b1118; --chat-text: #f2f4f6; --chat-muted: #8a9aab;
    --chat-accent: #5b95d6; --chat-input: #222c38; --chat-pill: #232e3c;
    --chat-in: #1c2733; --chat-in-text: #f2f4f6; --chat-out: #2b5278; --chat-out-text: #fff;
    --chat-time: #7d8e9e; --chat-out-time: #8fb6dc;
    --chat-ev: rgba(28, 39, 51, 0.92); --chat-ev-text: #dfe6ee; --chat-file: #253343;
    --chat-ok: #3fae6b; --chat-warn: #e3a54f;
    --chat-in-shadow: none;
}
/* CHAT-UX: обои как в Telegram (владелец 2026-10-24) — мягкий градиент из четырёх
   углов и узор про учёбу (chat-wall.svg) поверх. Обои стоят на обёртке ленты, а не
   на самой ленте: при прокрутке переписка едет, фон — нет. */
.chat-thread-wrap {
    background:
        radial-gradient(circle at 0% 0%, var(--chat-wall-1), transparent 65%),
        radial-gradient(circle at 100% 0%, var(--chat-wall-2), transparent 65%),
        radial-gradient(circle at 0% 100%, var(--chat-wall-3), transparent 65%),
        radial-gradient(circle at 100% 100%, var(--chat-wall-4), transparent 65%),
        var(--chat-wall);
}
.chat-thread-wrap::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: var(--chat-wall-mark);
    -webkit-mask: url("chat-wall.svg") 0 0 / 300px 300px repeat;
    mask: url("chat-wall.svg") 0 0 / 300px 300px repeat;
}
.chat-thread {
    position: relative; z-index: 1;
    padding: 12px 10px 14px; gap: 6px;
}
.chat-msg { max-width: 82%; padding: 7px 10px 6px; border-radius: 16px; font-size: 15px; line-height: 1.38; word-break: break-word; overflow-wrap: anywhere; position: relative; -webkit-touch-callout: none; }
.chat-msg-text { white-space: pre-wrap; }
/* Время — справа внизу пузыря, в строку с концом текста, как в Telegram. */
.chat-msg-time { float: right; font-size: 11px; margin: 7px 0 -3px 10px; white-space: nowrap; color: var(--chat-time); }
.chat-msg--me .chat-msg-time { color: var(--chat-out-time); }
.chat-msg--me { align-self: flex-end; background: var(--chat-out); color: var(--chat-out-text); }
.chat-msg--peer { align-self: flex-start; background: var(--chat-in); color: var(--chat-in-text); box-shadow: var(--chat-in-shadow); }
.chat-msg.is-pressed { transform: scale(0.97); transition: transform 0.15s; }
/* Событие сделки — плашкой по центру (сдача, возврат, приёмка). */
.chat-event { flex-shrink: 0; align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; font-weight: 600; line-height: 1.35; padding: 4px 12px; border-radius: 12px; background: var(--chat-ev); color: var(--chat-ev-text); white-space: pre-wrap; }
.chat-event small { display: block; font-weight: 400; opacity: 0.9; }

/* Карточка файла: значок типа, имя целиком, размер, «Скачать». */
.chat-file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 12px; background: var(--chat-file); color: var(--chat-in-text); }
.chat-msg .chat-file { margin: 1px -4px 2px; }
.chat-msg--me .chat-file { background: rgba(255, 255, 255, 0.14); color: inherit; }
.chat-file__type { flex: 0 0 auto; width: 40px; height: 44px; border-radius: 7px; background: #5c6b7a; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.chat-file__type--docx { background: var(--chat-word); }
.chat-file__type--pdf { background: var(--chat-pdf); }
.chat-file__type--pptx { background: var(--chat-pptx); }
.chat-file__meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-file__name { font-weight: 600; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.chat-file__size { font-size: 12px; color: var(--chat-muted); }
.chat-msg--me .chat-file__size { color: var(--chat-out-time); }
.chat-file__dl { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--chat-accent); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.chat-file__dl:focus-visible { outline: 2px solid var(--chat-accent); outline-offset: 2px; }

/* Меню по долгому нажатию: вместо ⚠ у каждого входящего (решение 2026-09-19). */
.chat-menu-dim { position: fixed; inset: 0; z-index: 3500; background: rgba(0, 0, 0, 0.35); }
.chat-menu { position: fixed; z-index: 3501; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); width: min(320px, calc(100% - 32px)); border-radius: 14px; overflow: hidden; background: var(--chat-bar); color: var(--chat-text); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.chat-menu__quote { padding: 10px 14px; font-size: 13px; color: var(--chat-muted); border-bottom: 1px solid var(--chat-sep); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-menu button { display: block; width: 100%; border: 0; background: none; color: inherit; font: inherit; font-size: 15px; text-align: left; padding: 12px 14px; cursor: pointer; }
.chat-menu button + button { border-top: 1px solid var(--chat-sep); }
.chat-menu .chat-menu__danger { color: #e5484d; font-weight: 600; }

/* Полоса этапов учебной сделки под шапкой чата. */
.deal-steps { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 10px 10px; background: var(--chat-bar); border-bottom: 1px solid var(--chat-sep); flex-shrink: 0; }
.deal-steps__step { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--chat-muted); text-align: center; }
.deal-steps__step::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--chat-pill); }
.deal-steps__step:first-child::before { display: none; }
.deal-steps__dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--chat-pill); display: grid; place-items: center; font-size: 11px; color: #fff; }
.deal-steps__step--done { color: var(--chat-ok); }
.deal-steps__step--done .deal-steps__dot { background: var(--chat-ok); }
.deal-steps__step--done::before, .deal-steps__step--now::before { background: var(--chat-ok); }
.deal-steps__step--now { color: var(--chat-warn); font-weight: 700; }
.deal-steps__step--now .deal-steps__dot { background: var(--chat-warn); box-shadow: 0 0 0 4px rgba(227, 165, 79, 0.22); }

/* Карточка сдачи: файлы, комментарий, срок и кнопки приёмки. */
.chat-sub { flex-shrink: 0; align-self: stretch; margin: 2px 4px; border-radius: 16px; background: var(--chat-in); color: var(--chat-in-text); border: 1px solid rgba(91, 149, 214, 0.28); box-shadow: var(--chat-in-shadow); overflow: hidden; }
.chat-sub__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px 0; }
.chat-sub__head b { font-size: 14.5px; }
.chat-sub__num { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(91, 149, 214, 0.18); color: var(--chat-accent); margin-right: 6px; vertical-align: 1px; }
.chat-sub__time { font-size: 11.5px; color: var(--chat-time); white-space: nowrap; }
.chat-sub__body { display: grid; gap: 8px; padding: 9px 10px 10px; }
.chat-sub__thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.chat-sub__thumbs .chat-attach-img-link { display: block; }
.chat-sub__thumbs .chat-attach-img { width: 100%; max-width: none; aspect-ratio: 4 / 3; object-fit: cover; }
.chat-sub__note { font-size: 14.5px; line-height: 1.4; padding: 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-sub__note span { display: block; font-size: 11.5px; color: var(--chat-muted); margin-bottom: 1px; }
.chat-sub__dead { font-size: 12.5px; color: var(--chat-muted); padding: 0 12px 8px; }
.chat-sub__acts { display: flex; gap: 8px; padding: 0 10px 10px; }
.chat-sub__acts button { flex: 1; border: 0; border-radius: 11px; padding: 10px 6px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chat-sub__acts button:disabled { opacity: 0.6; cursor: default; }
.chat-sub__ok { background: var(--chat-ok); color: #fff; }
.chat-sub__no { background: var(--chat-pill); color: var(--chat-text); }
.chat-sub__status { margin: 0 10px 10px; padding: 9px 11px; border-radius: 11px; background: var(--chat-file); font-size: 13.5px; font-weight: 600; color: var(--chat-muted); line-height: 1.35; }
.chat-sub__status small { display: block; font-weight: 400; margin-top: 2px; }
.chat-sub__status--ok { color: var(--chat-ok); }
.chat-sub__status--ret { color: var(--chat-warn); }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-input { flex: 1; resize: none; max-height: 120px; border-radius: var(--radius-md); padding: 10px 12px; }
.chat-send { flex: 0 0 auto; width: 48px; font-size: 18px; }
.chat-attach-btn { flex: 0 0 auto; width: 44px; font-size: 18px; padding: 0; }
.chat-attach-img { max-width: 200px; max-height: 200px; border-radius: 10px; display: block; }
.chat-attach-img-link { display: inline-block; padding: 0; border: 0; background: none; cursor: pointer; }
/* U7 — полноэкранный просмотр картинки чата (blob target=_blank в webview не работает). */
.img-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s; }
.img-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.img-lightbox-close { position: absolute; top: max(calc(10px + env(safe-area-inset-top)), calc(10px + var(--tg-safe-top, 0px))); right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.chat-attach-loading { font-size: 13px; opacity: 0.7; }
.chat-attach-expired { font-size: 13px; font-style: italic; opacity: 0.6; }
.chat-unread-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; margin-left: 8px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 700; text-align: center; vertical-align: middle; }
.my-response-card { margin-bottom: 10px; }

.bio-textarea { resize: none; border-radius: var(--radius-md); }
.skills-grid { margin-bottom: 15px; }

/* --- АДМИНКА РЕКЛАМЫ --- */
.ad-list-item { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-md); padding: 15px; margin-bottom: 10px; border-left: 4px solid var(--tg-theme-hint-color, #ccc); cursor:pointer; box-shadow: var(--shadow-soft); transition: 0.2s;}
.ad-list-item:active { transform: scale(0.98); }
.ad-list-item.active { border-left-color: var(--color-success); }
.ad-list-item.default { border-left-color: var(--color-warning); }
.ad-list-item-title { font-weight: bold; font-size: 15px; margin-bottom: 5px; color: var(--tg-theme-text-color, #000); }
.ad-list-item-dates { font-size: 12px; color: var(--tg-theme-hint-color, #666); }
.ad-list-item-stats { font-size: 12px; color: var(--tg-theme-button-color, var(--fallback-accent)); margin-top: 5px; font-weight: bold;}

/* Просмотр внутреннего треда чата по жалобе (U7 этап 5, админка «Модерация») */
.admin-chat-thread { margin-top: 8px; }
.admin-chat-msg { font-size: 13px; line-height: 1.4; padding: 5px 8px; margin-top: 4px; border-radius: 8px; background: var(--tg-theme-secondary-bg-color, #f0f2f5); word-break: break-word; }
.admin-chat-msg--flagged { background: #ffe0e0; border: 1px solid #d63031; }
.admin-chat-msg-meta { color: var(--tg-theme-hint-color, var(--fallback-hint)); font-size: 11px; }
.admin-chat-msg-attach { color: var(--tg-theme-button-color, var(--fallback-accent)); }
.admin-chat-msg-flag { color: #d63031; font-weight: 700; }

/* =========================================================
   1.1 МАРКЕТПЛЕЙС — КОМПОНЕНТНЫЕ КЛАССЫ (E4.2: вынос инлайнов из биржевых .js)
   Значения перенесены 1:1 из inline style= — вид не меняется.
   ========================================================= */
/* Рекламная карточка в ленте биржи */
.ad-card { padding: 0; border: 2px solid var(--tg-theme-button-color, var(--fallback-accent)); cursor: pointer; position: relative; overflow: hidden; margin-bottom: 15px; }
.ad-card__image { width: 100%; height: 160px; object-fit: contain; background-color: var(--tg-theme-bg-color, #f4f4f5); border-bottom: 1px solid var(--tg-theme-bg-color, #eee); display: block; }
.ad-card__label { position: absolute; top: 0; right: 0; z-index: 2; background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff; font-size: 10px; padding: 0 0 0 8px; border-bottom-left-radius: 8px; font-weight: bold; max-width: 75%; display: flex; align-items: center; }
.ad-card__label > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 0; }
/* «ⓘ» — шторка «О рекламе» (ADS-CAB, шаг 2). Значок мелкий, поле нажатия — невидимое
   продолжение вниз и влево (вверх и вправо обрезает край карточки), около 40×32. */
.ad-card__info { position: relative; flex: none; appearance: none; background: none; border: 0; margin: 0; color: inherit; font: inherit; font-size: 13px; line-height: 1; padding: 3px 8px 4px 6px; cursor: pointer; }
.ad-card__info::after { content: ""; position: absolute; inset: -10px -8px -12px -12px; }
/* В профиле — поля как у разделов `pc-section`. */
.pc-ad { margin: 16px 16px 0; }
.pc-ad .ad-card { margin-bottom: 0; }
.pc-ad:empty { display: none; }
.ad-card__body { padding: 15px; display: flex; align-items: center; justify-content: space-between; }
.ad-card__title { font-size: 16px; font-weight: 700; color: var(--tg-theme-text-color, #000); margin-bottom: 4px; }
.ad-card__desc { font-size: 13px; color: var(--tg-theme-hint-color, #666); }
.ad-card__promo { margin-top: 8px; font-size: 14px; font-weight: bold; color: var(--tg-theme-button-color, var(--fallback-accent)); }
.ad-card__arrow { font-size: 24px; opacity: 0.5; padding-left: 10px; }

/* Карточка заказа в ленте */
.order-card--boosted { border: 2px solid #ff758c; box-shadow: 0 4px 15px rgba(255, 117, 140, 0.2); }
.card-actions { display: flex; flex-direction: column; gap: 10px; }
.status-badge--hot { background: linear-gradient(90deg, #ff758c 0%, #ff7eb3 100%); color: #fff; border: none; margin-bottom: 8px; }
/* Пометка «вы заняты в это время» на карточке отклика (responseConflicts.ts).
   Стоит рядом со статусом и такого же роста: это второй факт о карточке, а не
   баннер — полноширинная плашка съедала бы экран на каждом втором отклике. */
.status-badge--conflict { background: var(--color-warning-bg); color: var(--color-warning); margin-left: 6px; }

/* Карточка исполнителя */
.card-details--tight { margin-bottom: 8px; }
.exec-card__bio { font-size: 13px; color: #666; font-style: italic; margin-top: 5px; }
.exec-card__skills { font-size: 12px; color: var(--fallback-accent); margin-top: 5px; margin-bottom: 10px; font-weight: bold; }
.exec-card__actions { display: flex; gap: 10px; margin: 12px 0 10px; }
.exec-card__actions .btn { flex: 1; }
.exec-card__more { margin-top: 10px; }

/* Шторка «Предложить заказ» */
.offer-order-btn { margin-bottom: 10px; text-align: left; }
.offer-order-time { font-size: 12px; font-weight: 500; opacity: 0.75; }

/* Мои заказы (orders.js) */
.mo-tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.mo-tabs .btn { flex: 1; padding: 10px; }
.my-order-card--history { opacity: 0.7; }

/* Мини-segmented pill (под-вкладки внутри панелей «Дела») */
.mini-seg {
    display: flex; background: var(--tg-theme-secondary-bg-color, #e8e8ea);
    border-radius: var(--radius-pill); padding: 2px; margin-bottom: 14px;
}
.mini-seg-item {
    flex: 1; text-align: center; padding: 6px 10px;
    border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600;
    color: var(--tg-theme-hint-color, #666);
    transition: 0.2s; cursor: pointer; user-select: none;
}
.mini-seg-item.active {
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.mini-seg-badge {
    display: inline-block; min-width: 16px; height: 16px;
    line-height: 16px; padding: 0 4px; margin-left: 4px;
    border-radius: 9px; font-size: 11px; font-weight: 700;
    background: var(--tg-theme-hint-color, #ccc);
    color: var(--tg-theme-bg-color, #fff); text-align: center;
    vertical-align: middle;
}
.mini-seg-item.active .mini-seg-badge {
    background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff;
}

/* Список чатов (ChatListPanel). CHAT-UX Б6: строки в одной панели, как в мессенджере.
   Цвета — темы Telegram, как у карточек «Дел» (.card), не --chat-*: те следуют и
   схеме системы, и в браузере с тёмной системой список был бы тёмной карточкой
   на светлой странице. */
.chat-list-panel {
    --chat-list-bg: var(--tg-theme-secondary-bg-color, #fff);
    --chat-list-text: var(--tg-theme-text-color, #111);
    --chat-list-muted: var(--tg-theme-hint-color, var(--fallback-hint));
    --chat-list-accent: var(--tg-theme-link-color, var(--fallback-accent));
    --chat-list-sep: var(--tg-theme-section-separator-color, rgba(127, 127, 127, 0.18));
    --chat-list-press: var(--tg-theme-bg-color, #f0f0f2);
}
.chat-list-rows {
    margin: 8px 12px 0; overflow: hidden;
    background: var(--chat-list-bg); color: var(--chat-list-text);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.chat-list-item { display: flex; align-items: center; gap: 4px; padding-right: 6px; background: var(--chat-list-bg); color: var(--chat-list-text); }
.chat-list-item:active { background: var(--chat-list-press); }
.chat-list-body-btn {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px;
    padding: 9px 4px 9px 12px; border: 0; background: none; color: inherit;
    font: inherit; text-align: left; cursor: pointer;
}
.chat-list-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chat-list-top, .chat-list-bottom { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.chat-list-bottom { align-items: center; }
.chat-list-item + .chat-list-item { border-top: 1px solid var(--chat-list-sep); }
.chat-list-title {
    flex: 1; min-width: 0; font-size: 15px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-list-time { flex-shrink: 0; font-size: 12px; color: var(--chat-list-muted); }
.chat-list-order, .chat-list-last { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-order { font-size: 12.5px; color: var(--chat-list-accent); }
.chat-list-last { flex: 1; font-size: 14px; color: var(--chat-list-muted); }
.chat-list-last b { color: var(--chat-list-text); font-weight: 500; }
.chat-list-last.is-unread { color: var(--chat-list-text); }
.chat-list-role { font-size: 12px; color: var(--chat-list-muted); }
.chat-list-unread {
    flex-shrink: 0; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 11px; background: var(--chat-list-accent); color: #fff;
    font-size: 12px; font-weight: 600; line-height: 21px; text-align: center;
}
/* FB24 C3: строка «Истории сделок» — что за заказ, с кем, когда; нажатие — чат. */
.deal-history-row { display: grid; gap: 3px; width: 100%; margin: 0 0 10px; text-align: left; font: inherit; color: inherit; border: 0; cursor: default; }
button.deal-history-row { cursor: pointer; }
.deal-history-row__top { display: flex; align-items: baseline; gap: 8px; }
.deal-history-row__top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-history-row__price { flex-shrink: 0; font-weight: 700; color: var(--color-success, #1a7f37); }
.deal-history-row__sub { font-size: 13px; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.deal-history-row__go { margin-top: 4px; font-size: 13px; color: var(--tg-theme-link-color, var(--color-primary)); }
/* FB24 C2: архив — заказы, по нажатию чаты заказа. */
.chat-archive-chevron { flex-shrink: 0; padding: 0 8px; font-size: 22px; color: var(--chat-list-muted); }
.chat-archive-order-sub { margin-top: -4px; padding: 0 16px 6px; text-align: center; font-size: 12.5px; color: var(--chat-list-muted); }
/* CHAT-UX Г: архив — такими же строками, как чаты; в круге значок заказа, справа статус. */
.chat-avatar.chat-avatar--icon { background: rgba(127, 127, 127, 0.16); font-size: 21px; }
.chat-list-item--folder .chat-list-title { font-weight: 500; }
.chat-archive-status { flex-shrink: 0; font-size: 12px; font-weight: 600; }
.chat-archive-status--ok { color: var(--color-success, #1e9e5a); }
.chat-archive-status--bad { color: var(--color-danger, #d63031); }
.chat-archive-status--info { color: var(--chat-list-accent); }
.chat-archive-status--muted { color: var(--chat-list-muted); }
.chat-list-empty {
    padding: 24px; text-align: center;
    color: var(--tg-theme-hint-color, var(--fallback-hint));
    font-size: 14px;
}
.chat-list-archive-btn {
    width: 34px; height: 34px; padding: 0; flex-shrink: 0;
    border: 0; border-radius: var(--radius-circle); background: none;
    font-size: 16px; opacity: 0.55; cursor: pointer;
}
.chat-list-archive-btn:active { background: var(--chat-list-press); opacity: 1; }
.chat-list-restore-btn {
    height: 30px; padding: 0 8px; flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--tg-theme-button-color, var(--fallback-accent));
    color: #fff; border: none; cursor: pointer;
    font-size: 12px;
}
.chat-list-confirm {
    display: block; width: 100%; padding: 4px 8px; margin: 0;
    font-size: 11px; border-radius: 8px;
    background: var(--tg-theme-button-color, var(--fallback-accent)); color: #fff;
    border: none; cursor: pointer;
}
.chat-list-confirm-no {
    background: var(--tg-theme-secondary-bg-color, #f0f0f2);
    color: var(--tg-theme-text-color, #333);
}
.chat-list-confirm-wrap { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
/* «Прочитать всё» над списком чатов — только когда есть что читать (UNREAD-STUCK). */
.chat-list-read-all-row { display: flex; justify-content: flex-end; padding: 0 16px; margin-top: -6px; }
.chat-list-read-all {
    background: none; border: none; cursor: pointer; padding: 4px 0;
    font-size: 13px; font-weight: 600; color: var(--tg-theme-link-color, var(--fallback-accent));
}
.chat-list-read-all:disabled { opacity: 0.5; cursor: default; }

/* Сетка действий заказа 2×2 */
.order-actions-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.order-actions-grid .btn { padding: 10px 8px; font-size: 13px; margin: 0; }

/* Сворачиваемый раздел неактивных откликов */
.inactive-section { margin-top: 12px; }
.inactive-toggle {
    width: 100%; background: none; border: 1px solid var(--tg-theme-hint-color, #ccc);
    border-radius: var(--radius-md); padding: 10px; font-size: 13px; font-weight: 600;
    color: var(--tg-theme-hint-color, #666); cursor: pointer; text-align: left;
    transition: 0.2s;
}
.inactive-toggle:hover { border-color: var(--tg-theme-button-color, var(--fallback-accent)); color: var(--tg-theme-button-color, var(--fallback-accent)); }
.inactive-section .card { opacity: 0.65; }

/* Полноэкранный чат */
.chat-fullscreen {
    position: fixed; inset: 0; z-index: 3000;
    background: var(--tg-theme-bg-color, #f4f4f5);
    display: flex; flex-direction: column;
}
.chat-fullscreen-header {
    display: flex; align-items: center; gap: 10px;
    /* Чат — position: fixed поверх страницы, padding у body его не двигает.
       Свой отступ, иначе «✕ Закрыть» ложится на кнопку «Назад» и заголовок. */
    padding: 12px 16px;
    padding-top: max(12px, calc(12px + var(--tg-safe-top, 0px)), calc(12px + env(safe-area-inset-top)));
    background: var(--tg-theme-secondary-bg-color, #fff);
    border-bottom: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    flex-shrink: 0;
}
.chat-fullscreen-back {
    background: none; border: none; font-size: 22px; font-weight: 700;
    color: var(--tg-theme-button-color, var(--fallback-accent)); cursor: pointer;
    padding: 0 4px; line-height: 1;
}
.chat-fullscreen-title {
    font-size: 16px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-fullscreen .chat-thread { flex: 1; max-height: none; padding-bottom: 10px; }
/* CHAT-UX Б3: круглый аватар-буква, имя собеседника, под ним заказ. */
.chat-fullscreen-heading { flex: 1; min-width: 0; }
.chat-fullscreen-heading .chat-fullscreen-title { font-size: 15.5px; }
.chat-fullscreen-sub { font-size: 12.5px; color: var(--chat-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-fullscreen .chat-input-row {
    flex-shrink: 0; padding: 10px 16px;
    background: var(--tg-theme-secondary-bg-color, #fff);
    border-top: 1px solid var(--tg-theme-hint-color, #e0e0e0);
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
/* CHAT-1: шапка и строка ввода — цветами чата, поле ввода — «таблеткой». */
.chat-fullscreen { background: var(--chat-bar); color: var(--chat-text); }
.chat-fullscreen-header { background: var(--chat-bar); border-bottom-color: var(--chat-sep); }
.chat-fullscreen-back { color: var(--chat-accent); }
/* CHAT-UX Г (владелец 2026-10-29): собеседник по центру шапки, «←» слева, справа
   пусто ради симметрии. В полноэкранном Telegram шапка — сама полоса его кнопок
   «‹ Назад» и «⋯» (data-tg-band, как заголовки экранов FB24 B1): строка под
   полосой больше не нужна. Ширину кнопок TG не сообщает — запас 95px, как там. */
.chat-fullscreen-header {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 4px;
    padding-left: 8px; padding-right: 8px; padding-bottom: 8px;
}
.chat-fullscreen-header > .chat-fullscreen-back { grid-column: 1; justify-self: start; }
.chat-fullscreen-header > .chat-fullscreen-peer,
.chat-fullscreen-header > .chat-fullscreen-title { grid-column: 2; justify-self: center; max-width: 100%; }
.chat-fullscreen-peer { display: flex; align-items: center; gap: 9px; min-width: 0; }
.chat-fullscreen-peer .chat-avatar { width: 34px; height: 34px; font-size: 15px; }
html[data-tg-band] .chat-fullscreen-header {
    grid-template-columns: minmax(0, 1fr);
    height: var(--tg-safe-top, 0px); min-height: 0; box-sizing: border-box;
    padding: calc(var(--tg-safe-top, 0px) - var(--tg-band-h, 0px)) 95px 0;
}
html[data-tg-band] .chat-fullscreen-header > .chat-fullscreen-peer,
html[data-tg-band] .chat-fullscreen-header > .chat-fullscreen-title { grid-column: 1; }
html[data-tg-band] .chat-fullscreen-peer .chat-avatar { width: 30px; height: 30px; font-size: 13px; }
html[data-tg-band] .chat-fullscreen-heading .chat-fullscreen-title { font-size: 15px; line-height: 1.2; }
html[data-tg-band] .chat-fullscreen-sub { font-size: 12px; line-height: 1.2; }
/* CHAT-UX: строка ввода как в Telegram на iPhone (владелец 2026-10-24) — скрепка,
   белое поле со значком эмодзи внутри справа, синяя кнопка ↑ только при тексте. */
.chat-fullscreen .chat-input-row {
    background: var(--chat-compose); border-top: 0.5px solid var(--chat-sep);
    align-items: flex-end; gap: 4px; margin-top: 0; padding: 6px 8px; padding-bottom: calc(6px + env(safe-area-inset-bottom));
}
.chat-fullscreen .chat-input-row.has-text { padding-right: 6px; }
.chat-field {
    flex: 1; min-width: 0; display: flex; align-items: flex-end;
    background: var(--chat-field); border: 1px solid var(--chat-field-line); border-radius: 19px;
}
.chat-fullscreen .chat-input {
    flex: 1; min-width: 0; width: auto; border: 0; margin: 0; min-height: 36px; padding: 8px 2px 8px 14px;
    border-radius: 0; background: none; box-shadow: none; outline: none;
    color: var(--chat-text); font-size: 16px; line-height: 1.3;
}
.chat-fullscreen .chat-input::placeholder { color: var(--chat-icon); }
.chat-attach-btn, .chat-emoji-btn {
    flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 0; background: none;
    color: var(--chat-icon); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chat-attach-btn { width: 38px; height: 38px; }
.chat-emoji-btn { width: 36px; height: 36px; border-radius: 50%; }
.chat-emoji-btn.is-active { color: var(--chat-accent); }
.chat-send {
    flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; margin: 1px 0 1px 2px; padding: 0;
    border: 0; border-radius: 50%; background: var(--chat-accent); color: #fff; cursor: pointer;
    animation: chat-send-in 0.16s ease-out;
}
.chat-send:disabled { opacity: 0.6; }
@keyframes chat-send-in { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-spinner { width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: chat-spin 0.8s linear infinite; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chat-send { animation: none; } }
/* Панель эмодзи — над строкой ввода, тем же фоном; на узком экране прокручивается. */
.chat-emoji-panel {
    flex-shrink: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
    max-height: 168px; overflow-y: auto; padding: 6px 8px;
    background: var(--chat-bar); border-top: 1px solid var(--chat-sep);
}
.chat-emoji {
    border: 0; background: none; padding: 0; height: 40px; border-radius: 10px;
    font-size: 24px; line-height: 1; cursor: pointer;
}
.chat-emoji:active { background: var(--chat-pill); }

/* CHAT-UX А5: высота и верх — по видимой части экрана (ChatSheet, visualViewport). */
.chat-fullscreen { inset: var(--chat-vv-top, 0px) 0 auto 0; height: var(--chat-vv-h, 100%); }
.chat-fullscreen .chat-input { overflow-y: auto; }
/* А1: лента и кнопка «↓» над ней. */
.chat-thread-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* TABBAR-GLASS (владелец 2026-10-30, вариант В): в чате островка нет, низ — плавающая
   стеклянная капсула поля ввода над обоями, лента уходит под неё. Высоту низа (фразы,
   эмодзи, поле) ChatSheet кладёт в --chat-dock-h — на неё лента оставляет отступ. */
.chat-dock {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    display: flex; flex-direction: column; gap: 6px;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom));
    pointer-events: none;
}
.chat-dock > * { pointer-events: auto; }
.chat-fullscreen--typing .chat-dock { padding-bottom: 8px; }
.chat-fullscreen .chat-thread { padding-bottom: calc(var(--chat-dock-h, 64px) + 8px); }
.chat-fullscreen .chat-scroll-down { bottom: calc(var(--chat-dock-h, 64px) + 10px); }
.chat-dock .chat-input-row, .chat-dock .chat-emoji-panel {
    background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 0.5px solid var(--glass-edge); box-shadow: var(--glass-shadow);
}
.chat-dock .chat-input-row { border-radius: 23px; padding: 4px; }
.chat-dock .chat-input-row.has-text { padding-right: 4px; }
.chat-dock .chat-field { background: none; border-color: transparent; }
.chat-dock .chat-emoji-panel { border-radius: 18px; }
.chat-dock .chat-quick-replies { background: none; padding: 0 2px; }
.chat-dock .chat-quick-reply { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
/* Старые WebView без размытия: полупрозрачный фон без него нечитаем — сплошной. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .bottom-nav, .chat-dock .chat-input-row, .chat-dock .chat-emoji-panel, .chat-dock .chat-quick-reply { background: var(--glass-solid); }
}
.chat-scroll-down {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    width: 42px; height: 42px; border: 0; border-radius: 50%;
    background: var(--chat-bar); color: var(--chat-muted); font-size: 20px; line-height: 1;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18); cursor: pointer;
}
.chat-scroll-down__count {
    position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: var(--chat-accent); color: #fff;
    font-size: 12px; font-weight: 600; line-height: 20px;
}
/* А2: статус своего сообщения — ✓ принято, 🕓 отправляется, ! не отправлено. */
.chat-msg-status { margin-left: 3px; }
.chat-msg--pending .chat-msg-status { opacity: 0.8; }
.chat-msg--pending.is-failed { opacity: 0.85; }
.chat-msg--pending.is-failed .chat-msg-status { color: var(--color-danger, #d63031); font-weight: 700; }
.chat-msg-retry { clear: both; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--chat-out-time); }
.chat-msg-retry button { border: 0; background: none; padding: 2px 0; color: var(--chat-accent); font: inherit; font-weight: 600; cursor: pointer; }

/* CHAT-UX блок Б, вариант 1 «как в Telegram» (решение владельца 2026-10-24). */
.chat-avatar {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 16px; line-height: 1;
    background: var(--chat-av2);
}
.chat-avatar--lg { width: 46px; height: 46px; font-size: 18px; }
.chat-avatar--1 { background: var(--chat-av1); }
.chat-avatar--2 { background: var(--chat-av2); }
.chat-avatar--3 { background: var(--chat-av3); }
.chat-avatar--4 { background: var(--chat-av4); }
/* Б2: серия одного отправителя — плотной стопкой, «хвостик» только у последнего. */
.chat-thread { gap: 2px; }
.chat-thread > .chat-msg:not(.is-stacked), .chat-thread > .chat-event, .chat-thread > .chat-sub { margin-top: 6px; }
/* CHAT-UX Г, пузыри как в Telegram (просьба владельца 2026-10-24): углы со стороны
   отправителя внутри серии сжаты до 6px, у последнего — изогнутый хвостик снаружи
   (::after, маска того же цвета, что пузырь); тень — drop-shadow, чтобы её
   получил и хвостик. Рисунок хвоста свой, не из Telegram Web (там GPL). */
.chat-msg { border-radius: 17px; padding: 6px 9px 7px 11px; font-size: 16px; line-height: 1.33; }
.chat-msg--peer { box-shadow: none; filter: drop-shadow(var(--chat-in-drop)); }
.chat-msg--me { filter: drop-shadow(var(--chat-out-drop)); }
.chat-msg--me.is-stacked { border-top-right-radius: 6px; }
.chat-msg--me:not(.is-tail) { border-bottom-right-radius: 6px; }
.chat-msg--peer.is-stacked { border-top-left-radius: 6px; }
.chat-msg--peer:not(.is-tail) { border-bottom-left-radius: 6px; }
.chat-msg.is-tail::after {
    content: ""; position: absolute; bottom: 0; width: 11px; height: 17px;
    background: inherit; pointer-events: none;
    --tail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 17'%3E%3Cpath d='M0 0H5V8Q5 15 11 17H0Z'/%3E%3C/svg%3E");
    -webkit-mask: var(--tail) 0 0 / 100% 100% no-repeat;
    mask: var(--tail) 0 0 / 100% 100% no-repeat;
}
/* Отступ под хвостик — у всей серии, чтобы край стопки был ровным. */
.chat-msg--me { margin-right: 6px; }
.chat-msg--peer { margin-left: 6px; }
.chat-msg--me.is-tail { border-bottom-right-radius: 0; }
.chat-msg--me.is-tail::after { right: -6px; }
.chat-msg--peer.is-tail { border-bottom-left-radius: 0; }
.chat-msg--peer.is-tail::after { left: -6px; transform: scaleX(-1); }
.chat-msg.is-pressed { transform: scale(0.97); }
.chat-msg-time { font-size: 11.5px; margin: 8px -2px -4px 10px; }
:root { --chat-in-drop: 0 1px 0.5px rgba(16, 35, 47, 0.16); --chat-out-drop: 0 1px 0.5px rgba(16, 35, 47, 0.12); }
@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) { --chat-in-drop: 0 1px 0.5px rgba(0, 0, 0, 0.3); --chat-out-drop: 0 1px 0.5px rgba(0, 0, 0, 0.3); }
}
:root[data-tg-scheme="dark"] { --chat-in-drop: 0 1px 0.5px rgba(0, 0, 0, 0.3); --chat-out-drop: 0 1px 0.5px rgba(0, 0, 0, 0.3); }
/* Б1: дата плашкой по центру; при прокрутке держится сверху, как в Telegram. */
.chat-day {
    flex-shrink: 0; align-self: center; margin: 10px 0 4px; padding: 3px 10px; border-radius: 12px;
    background: var(--chat-ev); color: var(--chat-ev-text); font-size: 12.5px; font-weight: 500;
    position: sticky; top: 6px; z-index: 2;
}
/* Б4: черта «Новые сообщения» — во всю ширину ленты. */
.chat-unread-line {
    flex-shrink: 0; align-self: stretch; margin: 8px -10px 2px; padding: 3px 0; text-align: center;
    background: var(--chat-bar); color: var(--chat-muted); font-size: 12.5px; opacity: 0.92;
}
/* Б5: пустой чат — плашка и готовые фразы посередине. */
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; text-align: center; }
.chat-empty__card { max-width: 300px; padding: 14px 16px; border-radius: 16px; background: var(--chat-ev); color: var(--chat-ev-text); font-size: 14px; line-height: 1.4; }
.chat-empty__card b { display: block; font-size: 15px; margin-bottom: 4px; }
.chat-empty__replies { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chat-empty__replies .chat-quick-reply { background: var(--chat-bar); border: 1px solid var(--chat-sep); box-shadow: var(--chat-in-shadow); padding: 6px 12px; font-size: 13.5px; }


/* Состояния заказов и сделок (order_state_ui.js) */
.status-done { background: #e8f8f5; color: var(--color-success); }
.status-cancelled { background: #ffeaa7; color: #d63031; }
.btn-price { border-color: var(--color-success); color: var(--color-success); }
.order-history-note { font-size: 13px; color: #666; text-align: center; padding: 5px; }
.order-materials-note { font-size: 13px; color: var(--color-success); font-weight: bold; margin-bottom: 10px; text-align: center; }
.order-event-line { font-size: 12px; color: var(--tg-theme-hint-color, #666); margin-top: 6px; }
.deal-exec-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; display: flex; align-items: flex-end; justify-content: center; }
.deal-exec-sheet { background: var(--tg-theme-bg-color, #fff); width: 100%; max-width: 480px; border-radius: 16px 16px 0 0; padding: 16px; max-height: 70vh; overflow: auto; }
.deal-exec-title { font-weight: 600; margin-bottom: 12px; }

/* Кандидаты: подробности в карточке над перепиской (CandidateBar) и «Подходящие исполнители». */
.candidate-actions { display: flex; gap: 8px; margin-top: 10px; }
.candidate-actions .btn { flex: 1; }
.candidate-risk--danger { color: #d63031; font-weight: 700; }
.candidate-risk--watch { color: #b7791f; font-weight: 700; }
.candidate-risk--normal { color: var(--tg-theme-hint-color, #666); }
/* ACAD-4, п.5: навыки кандидата учебного заказа; вид заказа подсвечен. */
.candidate-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.candidate-skill { padding: 3px 10px; border: 1px solid var(--tg-theme-hint-color, #ccc); border-radius: var(--radius-lg); font-size: 12px; color: var(--tg-theme-hint-color, #666); }
.candidate-skill--match { background: var(--tg-theme-button-color, var(--fallback-accent)); border-color: var(--tg-theme-button-color, var(--fallback-accent)); color: var(--tg-theme-button-text-color, #fff); font-weight: 700; }
.candidate-review { font-style: italic; overflow-wrap: anywhere; }
.candidate-line { font-size: 13px; line-height: 1.4; color: var(--text-muted); margin-top: 3px; overflow-wrap: anywhere; }
.candidate-line-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.candidate-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.candidate-badge--good { color: var(--color-success); background: rgba(46, 204, 113, 0.14); }
.candidate-badge--watch { color: #b7791f; background: rgba(243, 156, 18, 0.14); }
.candidate-badge--danger { color: #d63031; background: rgba(231, 76, 60, 0.14); }
.candidate-quote { position: relative; font-size: 13px; line-height: 1.4; font-style: italic; margin-top: 6px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.candidate-review-wrap .candidate-quote { margin-top: 1px; }
.candidate-quote--open { display: block; -webkit-line-clamp: unset; }
/* «ещё» поверх конца второй строки: внутри обрезки его бы срезало вместе с текстом. */
.candidate-quote-more { position: absolute; right: 0; bottom: 0; padding-left: 8px; font-style: normal; background: var(--tg-theme-secondary-bg-color, #fff); color: var(--tg-theme-link-color, var(--tg-theme-button-color, var(--fallback-accent))); }

/* Спор и жалоба (dispute_ui.js) */
.dispute-actions { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dispute-actions .btn { flex: 1; }

/* Шторки настроек (index.html) */
.sheet-heading { margin-top: 0; text-align: center; }
.sheet-subtitle { font-size: 14px; color: var(--tg-theme-hint-color, #666); text-align: center; margin-bottom: 16px; }
.sheet-subtitle--wide { margin-bottom: 20px; }
/* ST3-1: звёзды оценки после сделки (RateSheet) */
.rate-stars { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.rate-star { background: none; border: 0; padding: 2px 4px; font-size: 34px; line-height: 1; cursor: pointer; color: var(--text-faint); opacity: 0.45; }
.rate-star--on { color: var(--color-amber, #f5a623); opacity: 1; }

/* Топбар главной (index.html) */
.home-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.home-topbar__brand { font-weight: 700; font-size: 17px; }
.nav-inbox { position: relative; cursor: pointer; font-size: 24px; line-height: 1; padding: 4px; }

/* Бейдж-счётчик уведомлений (оформление; display и позиция — отдельно) */
.notify-badge { position: absolute; background: #ff4444; color: #fff; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 10px; min-width: 16px; text-align: center; }
#new-orders-badge { top: 4px; right: 8px; }
/* HOME-2: у колокольчика точка «есть непрочитанное», не число. */
.inbox-unread-dot {
    position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%;
    background: #ff4444; box-shadow: 0 0 0 2px var(--surface-alt);
}
/* Бейджи вкладок — красная таблетка в правом верхнем углу иконки, как в Telegram. */
.nav-tab-badge {
    top: -4px; left: 15px; right: auto; padding: 0 4px; min-width: 15px; box-sizing: border-box;
    border-radius: 8px; background: #ff3b30; font-size: 11px; line-height: 15px; font-weight: 600;
}

/* Реферальный блок и прочие шторки (index.html) */
.ref-actions { display: flex; gap: 10px; margin-top: 15px; }
.ref-actions .btn { flex: 1; font-size: 14px; }
.fomo-personal-hint { font-size: 12px; font-weight: normal; margin-top: 6px; color: #333333 !important; }
.fomo-invite-title { color: var(--color-success); font-size: 16px; }
.fomo-divider { border: none; border-top: 1px dashed #f39c12; margin: 15px 0; opacity: 0.5; }
.create-error { color: var(--color-danger); font-size: 14px; text-align: center; font-weight: bold; margin-bottom: 10px; }
.field-hint { color: var(--tg-theme-hint-color, var(--fallback-hint)); font-size: 12px; margin-bottom: 10px; }
.logout-label { color: #dc2626; }
.product-multi-label { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
/* Как у .acad-check: без этого общий `input { width: 100% }` растягивает флажок, подпись уезжает за экран. */
.product-multi-label input { width: auto; margin: 0; flex: 0 0 auto; }
.inbox-scroll { max-height: 60vh; overflow-y: auto; }
.inbox-actions { display: flex; gap: 8px; margin-top: 10px; }
.inbox-actions .btn { flex: 1; }
.inbox-actions .btn--sm { font-size: 13px; }
/* NOTIFY-UI — шестерёнка в шапке 🔔: ведёт на экран «Уведомления». */
.inbox-head { position: relative; }
.inbox-settings { position: absolute; right: 0; top: -4px; background: none; border: 0; font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; }

/* NOTIFY-UI — экран «Уведомления» (screens/profile/NotificationsSheet.tsx). */
.notify-sheet .ns-title { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--tg-theme-hint-color, #8b8e96); margin: 18px 4px 6px; }
.notify-sheet .sheet-heading + .ns-title { margin-top: 6px; }
.ns-group { background: var(--tg-theme-bg-color, #f4f4f5); border-radius: var(--radius-lg); overflow: hidden; }
.ns-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; min-height: 48px; border-bottom: 1px solid var(--tg-theme-secondary-bg-color, #fff); }
.ns-row:last-child { border-bottom: 0; }
.ns-row-link { cursor: pointer; }
.ns-ico { width: 24px; flex: none; text-align: center; font-size: 18px; }
.ns-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ns-label { font-size: 15px; color: var(--tg-theme-text-color, #000); }
.ns-sub { font-size: 12.5px; line-height: 1.35; color: var(--tg-theme-hint-color, #8b8e96); }
.ns-sub-bad { color: var(--color-danger); }
.ns-val { flex: none; font-size: 14px; white-space: nowrap; color: var(--tg-theme-hint-color, #8b8e96); }
.ns-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--color-success); }
.ns-act { flex: none; border: 0; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
    background: var(--tg-theme-button-color, var(--fallback-accent)); color: var(--tg-theme-button-text-color, #fff); }
.ns-act-quiet { background: transparent; color: var(--tg-theme-button-color, var(--fallback-accent)); box-shadow: inset 0 0 0 1px currentColor; }
.ns-act:disabled { opacity: .5; cursor: default; }
.ns-switch { position: relative; flex: none; width: 46px; height: 28px; padding: 0; border: 0; border-radius: 14px; cursor: pointer;
    background: rgba(120, 120, 128, .32); transition: background .15s; }
.ns-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.ns-switch[aria-checked="true"] { background: var(--tg-theme-button-color, var(--fallback-accent)); }
.ns-switch[aria-checked="true"]::after { transform: translateX(18px); }
.ns-switch:disabled { opacity: .45; cursor: default; }
.ns-switch:focus-visible, .ns-act:focus-visible { outline: 2px solid var(--tg-theme-button-color, var(--fallback-accent)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ns-switch, .ns-switch::after { transition: none; } }
.ns-note { margin: 6px 4px 0; font-size: 12.5px; line-height: 1.35; color: var(--tg-theme-hint-color, #8b8e96); }
.notify-sheet .ns-test { margin-top: 10px; }
.notify-sheet .ns-done { margin-top: 20px; }
.visually-hidden { position: absolute; left: -9999px; }
.u-text-center { text-align: center; }
.u-mt-12 { margin-top: 12px; }
.u-ml-8 { margin-left: 8px; }
.u-mt-15 { margin-top: 15px; }

/* Утилиты spacing (E4.2). ВАЖНО: .u-m-0 определён ПЕРВЫМ, longhand margin-*
   утилиты — ниже, чтобы при наложении (напр. .u-m-0.u-mb-12 = margin:0 0 12px)
   выигрывал longhand по порядку в каскаде. */
.u-m-0 { margin: 0; }
.u-w-auto { width: auto; }
.u-cursor-default { cursor: default; }
.u-mt-6 { margin-top: 6px; }
.u-mt-7 { margin-top: 7px; }
.u-mt-8 { margin-top: 8px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-16 { margin-top: 16px; }
.u-mb-4 { margin-bottom: 4px; }
.u-mb-6 { margin-bottom: 6px; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-12 { margin-bottom: 12px; }
.u-mb-14 { margin-bottom: 14px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-18 { margin-bottom: 18px; }
.u-mb-20 { margin-bottom: 20px; }

/* =========================================================
   1.2 АДМИНКА — КОМПОНЕНТНЫЕ КЛАССЫ (E4.2: вынос инлайнов из admin/)
   Значения 1:1. Висячие токены (--danger/--primary/--border/--text-muted)
   НЕ объявлены в проекте → правила с ними сейчас инертны; переношу as-is,
   НЕ «оживляя» (иначе изменится вид) — отдельное решение E4.3.
   ========================================================= */
.admin-login-card { max-width: 420px; margin: 48px auto; }
.admin-login-error { margin-bottom: 14px; color: #c0392b; }

/* Доступы / суперадмин (access.js) */
.access-log-expires { font-size: 12px; color: #b35a00; margin-top: 4px; }
.access-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.access-grant-detail { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.access-muted { color: var(--text-muted); }
.access-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,113,227,0.1); color: var(--primary); margin: 4px 6px 0 0; }
.access-badge-remove { cursor: pointer; font-weight: 800; }

/* Каркас админ-портала (admin.html / admin-standalone.html) */
.admin-shell-pad { padding-bottom: 32px; }
.admin-hero-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.admin-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-hero-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.admin-badges-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.admin-switcher-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-workspace-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-section-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.admin-card--primary { margin-bottom: 16px; border: 2px solid var(--primary); }

/* Реклама (ads.js) */
.admin-card--error { margin-bottom: 16px; border-color: rgba(255,59,48,0.35); }
.admin-card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-inline-field { display: flex; align-items: end; }
.admin-inline-label { display: flex; align-items: center; gap: 10px; margin: 0; }
.admin-stats-wrap { margin-top: 10px; }
.admin-form-title { font-size: 22px; }
.admin-textarea-120 { height: 120px; resize: none; }
.admin-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-save { margin: 0; flex: 1; }
.btn-delete { margin: 0; width: auto; color: var(--danger); border-color: var(--danger); }
.btn-delete-inline { color: var(--danger); border-color: var(--danger); }

/* ВУЗы и города (institutions.js) */
.admin-search-input { margin-top: 14px; margin-bottom: 0; }
.admin-card--bordered { margin: 0 0 16px; border: 1px solid var(--border); }
.admin-card--bordered-flush { margin: 0; border: 1px solid var(--border); }
.admin-feature-row { display: flex; gap: 16px; flex-wrap: wrap; }
.admin-check-label { display: flex; align-items: center; gap: 8px; }
.admin-check-label--mv { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; }
.admin-check-label--mv16 { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; }
.admin-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.admin-channel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.btn-w-auto { width: auto; margin: 0; }

/* Инструменты (tools.js) */
.admin-card--warn { margin-bottom: 16px; border-color: rgba(255,149,0,0.35); background: rgba(255,149,0,0.06); }
.admin-card--hero { margin-bottom: 14px; background: linear-gradient(135deg, rgba(0,122,255,0.08), rgba(52,199,89,0.06)); }
.admin-hero-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.admin-kpi-tile { margin: 0; padding: 14px 16px; }
.admin-kpi-value { font-size: 24px; font-weight: 800; line-height: 1; }
.admin-metric-card { margin: 0; text-align: center; }
.admin-metric-card--accent { border-color: rgba(36,129,204,0.45); }
.admin-metric-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.admin-actions-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.admin-actions-row--mb { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; margin-bottom: 8px; }
.admin-cmd-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-textarea-80 { height: 80px; resize: none; }
.admin-textarea-100 { height: 100px; resize: none; }
.admin-textarea-158 { height: 158px; resize: none; }
.tool-section { margin-bottom: 14px; padding: 0; overflow: hidden; }
.tool-section__summary { cursor: pointer; list-style: none; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.tool-section__title { display: block; margin-bottom: 3px; }
.tool-section__body { padding: 16px 20px 18px; }
.admin-subhead { margin: 14px 0 8px; }
.admin-btn-pair { display: flex; gap: 8px; margin-top: 8px; }

/* =========================================================
   2. СТИЛИ БАЗЫ ЗНАНИЙ (EDTECH.HTML) - ИЗОЛИРОВАНЫ
   ========================================================= */
:root {
    --ed-bg-color: #f4f6fa; 
    --ed-card-bg: #ffffff; 
    --ed-text-main: #1d1d1f; 
    --ed-text-muted: #86868b; 
    --ed-primary: #0071e3; 
    --ed-primary-hover: #0077ed; 
    --ed-danger: #ff3b30; 
    --ed-success: #34c759; 
    --ed-border: #e5e5ea;
    --ed-shadow: 0 8px 24px rgba(0,0,0,0.06);
    --ed-radius: 20px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-tg-scheme="light"]) {
        --ed-bg-color: #1c1c1e;
        --ed-card-bg: #2c2c2e;
        --ed-text-main: #e5e5e7;
        --ed-text-muted: #8e8e93;
        --ed-primary: #0a84ff;
        --ed-primary-hover: #409cff;
        --ed-border: rgba(255, 255, 255, 0.12);
        --ed-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
}
:root[data-tg-scheme="dark"] {
    --ed-bg-color: #1c1c1e;
    --ed-card-bg: #2c2c2e;
    --ed-text-main: #e5e5e7;
    --ed-text-muted: #8e8e93;
    --ed-primary: #0a84ff;
    --ed-primary-hover: #409cff;
    --ed-border: rgba(255, 255, 255, 0.12);
    --ed-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Изолируем стили базы знаний, чтобы они не ломали биржу */
.edtech-page { background-color: var(--ed-bg-color); color: var(--ed-text-main); margin: 0; padding: 0; padding-bottom: 90px; }

.edtech-page #app { padding: 14px 12px; max-width: 600px; margin: 0 auto; }

.edtech-page .header { display: flex; justify-content: center; align-items: center; margin-bottom: 24px; position: relative; }
.edtech-page .header h1 { font-size: 22px; font-weight: 800; color: var(--ed-text-main); letter-spacing: -0.5px; text-align: center; margin: 0; }

.edtech-page .search-container { margin-bottom: 20px; position: relative; }
.edtech-page .search-input { width: 100%; padding: 14px 14px 14px 40px; border: 1px solid var(--ed-border); border-radius: var(--ed-radius); font-size: 15px; background: var(--ed-card-bg); color: var(--ed-text-main); outline: none; box-shadow: 0 4px 12px rgba(0,0,0,0.03); transition: 0.3s ease; margin-bottom: 0;}
.edtech-page .search-input:focus { border-color: var(--ed-primary); box-shadow: 0 4px 16px rgba(0, 113, 227, 0.15); }
.edtech-page .search-icon { position: absolute; left: 16px; top: 14px; font-size: 18px; color: var(--ed-text-muted); }

.edtech-page .card { 
    background: var(--ed-card-bg); 
    border-radius: var(--ed-radius); 
    padding: 14px; 
    margin-bottom: 10px; 
    box-shadow: var(--ed-shadow); 
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease; 
}
.edtech-page .card:active { transform: scale(0.97); box-shadow: 0 4px 10px rgba(0,0,0,0.04); }
.edtech-page .card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--ed-text-main); letter-spacing: -0.3px; }
.edtech-page .card-subtitle { font-size: 14px; color: var(--ed-text-muted); }

.edtech-page .card-lobby {
    background: linear-gradient(145deg, var(--ed-card-bg) 0%, rgba(0, 113, 227, 0.06) 100%);
    border: 1px solid rgba(0, 113, 227, 0.15);
    box-shadow: 0 12px 32px rgba(0, 113, 227, 0.1);
}

.edtech-page .btn { display: block; width: 100%; padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; text-align: center; margin-bottom: 10px; transition: 0.2s ease;}
.edtech-page .btn:active:not(:disabled) { opacity: 0.7; transform: scale(0.98); }
.edtech-page .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.edtech-page .btn-primary { background: var(--ed-primary); color: white; box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3); }
.edtech-page .btn-danger { background: var(--ed-danger); color: white; border-color: var(--ed-danger); }
.edtech-page .btn-success { background: var(--ed-success); color: white; }
.edtech-page .btn-outline { background: var(--ed-card-bg); border: 2px solid var(--ed-border); color: var(--ed-text-main); }
.edtech-page .btn-sm { padding: 12px; font-size: 14px; border-radius: 14px; }

.edtech-page .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

.edtech-page .grid-btn {
    display: flex; align-items: center; justify-content: center; text-align: center;
    height: 90px; font-size: 18px; border-radius: 18px; border: none;
    background: var(--ed-card-bg); box-shadow: var(--ed-shadow); color: var(--ed-text-main); font-weight: 700;
}

.edtech-page .badge { display: inline-block; padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--ed-border); color: var(--ed-text-main); margin-right: 6px; margin-bottom: 6px; }

.edtech-page .breadcrumb-bar {
    display: flex; align-items: center; gap: 8px; overflow-x: auto; 
    white-space: nowrap; padding: 4px 0 20px 0; scrollbar-width: none;
}
.edtech-page .breadcrumb-bar::-webkit-scrollbar { display: none; }
.edtech-page .breadcrumb-item {
    background: var(--ed-card-bg); padding: 10px 16px; border-radius: 14px; 
    font-size: 14px; font-weight: 600; color: var(--ed-text-main); cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.03);
    transition: background 0.2s;
}
.edtech-page .breadcrumb-item:active { background: var(--ed-border); }
.edtech-page .breadcrumb-sep { color: var(--ed-text-muted); font-size: 16px; opacity: 0.5; }

.edtech-page .input-group { margin-bottom: 16px; }
.edtech-page .input-group label { display: block; font-size: 14px; font-weight: 600; color: var(--ed-text-muted); margin-bottom: 8px; margin-left: 4px; }
.edtech-page .input-text, .edtech-page .select-box { width: 100%; padding: 14px; border: 2px solid var(--ed-border); border-radius: 14px; font-size: 16px; background: var(--ed-card-bg); color: var(--ed-text-main); outline: none; transition: 0.2s; margin-bottom: 0; }
.edtech-page .input-text:focus, .edtech-page .select-box:focus { border-color: var(--ed-primary); background: var(--ed-card-bg); }

.edtech-page .chk-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.edtech-page .chk-item { border: 1px solid var(--ed-border); padding: 10px 14px; border-radius: 12px; font-size: 14px; background: var(--ed-card-bg); cursor: pointer; user-select: none; font-weight: 600; transition: 0.2s; }
.edtech-page .chk-item.selected { background: var(--ed-primary); color: white; border-color: var(--ed-primary); box-shadow: 0 4px 10px rgba(0, 113, 227, 0.2); }

.edtech-page .loader { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: rgba(29, 29, 31, 0.9); backdrop-filter: blur(10px); color: white; padding: 10px 20px; border-radius: 20px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 9999; display: none; transition: 0.2s; }

.edtech-page .tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;}
.edtech-page .tabs::-webkit-scrollbar { display: none; }
.edtech-page .tab { padding: 10px 16px; background: var(--ed-card-bg); border: 1px solid var(--ed-border); border-radius: 24px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: 0.2s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.edtech-page .tab.active { background: var(--ed-text-main); color: white; border-color: var(--ed-text-main); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.edtech-page .empty-state { text-align: center; padding: 50px 20px; }
.edtech-page .empty-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.9; }
.edtech-page .empty-title { font-size: 20px; font-weight: 800; color: var(--ed-text-main); margin-bottom: 8px;}
.edtech-page .empty-subtitle { font-size: 15px; color: var(--ed-text-muted); line-height: 1.5; }

.edtech-page .cat-card { display: flex; justify-content: space-between; align-items: center; border-left: 6px solid var(--ed-primary); }
.edtech-page .cat-count { font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 12px; }

.edtech-page .bottom-nav { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background-color: var(--ed-card-bg); opacity: 0.92;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; justify-content: space-around; padding: 12px 0; 
    padding-bottom: calc(12px + env(safe-area-inset-bottom)); 
    border-top: 1px solid var(--ed-border); z-index: 1000; 
}
.edtech-page .nav-item { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: var(--ed-text-muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: 0.2s;}
.edtech-page .nav-item.active { color: var(--ed-primary); transform: scale(1.05); }
.edtech-page .nav-icon { font-size: 24px; transition: 0.2s; }

.edtech-page .tab-content { display: none; animation: edFadeIn 0.3s ease; }
.edtech-page .tab-content.active { display: block; }
@keyframes edFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.edtech-page .opt-label { display:flex; align-items:center; margin-bottom:8px; padding:10px 12px; border:2px solid var(--ed-border); border-radius:12px; cursor:pointer; transition: 0.2s; background: var(--ed-card-bg); }
.edtech-page .opt-label:active { transform: scale(0.98); background: var(--ed-border); }
.edtech-page .opt-label input { margin-right:10px; width:18px; height:18px; accent-color: var(--ed-primary); }

.edtech-page .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
.edtech-page .modal-content { background: var(--ed-bg-color); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 24px; box-shadow: 0 -10px 40px rgba(0,0,0,0.2); animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.edtech-page .admin-opt-btn { display:block; width:100%; text-align:left; padding:14px; border:2px solid var(--ed-border); border-radius:12px; margin-bottom:10px; background:var(--ed-card-bg); font-size:15px; cursor:pointer; transition:0.2s; }
.edtech-page .admin-opt-btn.correct { background: rgba(52, 199, 89, 0.1); border-color: var(--ed-success); color: var(--ed-success); font-weight:700; }
.edtech-page .admin-opt-btn:active { transform: scale(0.98); }

.edtech-page .accordion { background: var(--ed-card-bg); border: 1px solid var(--ed-border); border-radius: var(--ed-radius); margin-bottom: 14px; overflow: hidden; box-shadow: var(--ed-shadow); }
.edtech-page .accordion-header { padding: 18px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--ed-card-bg); transition: background 0.2s; }
.edtech-page .accordion-header:active { background: var(--ed-border); }
.edtech-page .accordion-body { display: none; padding: 16px; border-top: 1px solid var(--ed-border); background: var(--ed-card-bg); }
.edtech-page .accordion-body.open { display: block; animation: fadeIn 0.2s ease; }
.edtech-page .chevron { transition: transform 0.3s ease; color: var(--ed-text-muted); font-size: 14px; }
.edtech-page .chevron.open { transform: rotate(180deg); }

.edtech-page .test-result-banner { background: var(--ed-card-bg); border-radius: 24px; padding: 30px 20px; text-align: center; box-shadow: 0 16px 40px rgba(0, 113, 227, 0.15); margin-bottom: 24px; border: 2px solid var(--ed-primary); animation: slideDown 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

.edtech-page .section-title { font-size: 13px; font-weight: 700; color: var(--ed-text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 4px; }

/* =========================================================
   LOADING INDICATORS & SKELETON SCREENS
   ========================================================= */

/* --- Inline Loading Indicator --- */
.inline-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--tg-theme-hint-color, var(--fallback-hint));
    font-size: 14px;
}

.inline-loading.active {
    display: block;
}

.inline-loading::before {
    content: '⏳';
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- Skeleton Screens --- */
.skeleton-container {
    display: none;
    padding: 15px;
}

.skeleton-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.skeleton-card {
    background: var(--tg-theme-secondary-bg-color, #ffffff);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: shimmer 1.5s infinite;
}

.skeleton-line.title {
    height: 20px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 60%;
}

.skeleton-line.long {
    width: 90%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 12px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Skeleton для разных секций --- */
.skeleton-market {
    display: none;
}

.skeleton-market.active {
    display: block;
}

.skeleton-profile {
    display: none;
}

.skeleton-profile.active {
    display: block;
}

.skeleton-orders {
    display: none;
}

.skeleton-orders.active {
    display: block;
}

/* ---------- INBOX (A5) ---------- */
.inbox-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
    cursor: pointer;
    transition: background 0.15s;
}
.inbox-item:active {
    background: var(--tg-theme-secondary-bg-color, #f5f5f5);
}
.inbox-item-unread {
    background: rgba(0, 122, 255, 0.04);
}
.inbox-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007aff;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}
.inbox-item-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--tg-theme-text-color, #222);
    display: flex;
    align-items: baseline;
    gap: 0;
}
/* Заказ уведомления уже закрыт: вместо стрелки «›» — слово. Стрелка обещает
   переход к работе, а работы там больше нет (O-16). */
.inbox-item-closed { float: right; font-size: 11px; padding: 1px 6px;
    border-radius: 6px; background: var(--color-urgent-bg, #f3f4f6);
    color: var(--tg-theme-hint-color, var(--fallback-hint)); }

.inbox-item-time {
    font-size: 12px;
    color: var(--tg-theme-hint-color, var(--fallback-hint));
    margin-top: 4px;
    margin-left: 16px;
}
/* FB24 C4: «Ждут вашего ответа» — карточки с кнопкой; «Остальное» — мельче, по дням. */
.inbox-section-title { margin: 6px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.inbox-section-title--rest { margin-top: 18px; }
.inbox-action { display: grid; gap: 6px; padding: 12px 14px; margin-bottom: 10px; border-radius: var(--radius-lg); background: var(--tg-theme-secondary-bg-color, #fff); border: 1.5px solid var(--tg-theme-button-color, var(--fallback-accent)); }
.inbox-action__text { font-size: 15px; font-weight: 600; line-height: 1.35; }
.inbox-action__meta { font-size: 12px; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.inbox-action__btn { justify-self: start; margin: 2px 0 0; }
.inbox-day { padding: 10px 16px 2px; font-size: 12px; font-weight: 600; color: var(--tg-theme-hint-color, var(--fallback-hint)); }
.inbox-section-title--rest ~ div .inbox-item { padding-top: 10px; padding-bottom: 10px; }
.inbox-section-title--rest ~ div .inbox-item-text { font-size: 13px; }

/* ── Консоль владельца (ADMIN_V2_SPEC) ───────────────────────────────────────
   Отдельный блок, а не переиспользование карточек биржи: консоль читают в
   другом состоянии — быстро и по делу, — и её плотность выше пользовательской.
   Цвета приглушённые намеренно: два срыва у человека — повод посмотреть, а не
   авария, и алый здесь врал бы. */
.console { padding: 0 0 24px; }
.console-bar { display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.console-title { font-size: 16px; font-weight: 500; }
.console-date { font-size: 12px; opacity: .6; }
.console-section { padding: 16px 16px 4px; }
.console-section-title { margin: 0 0 10px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; opacity: .55; font-weight: 500; }
.console-empty { margin: 0; padding: 14px 16px; font-size: 14px; opacity: .6; }

.console-tasks { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 9px; }
.console-task { display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  border: 1px solid var(--border); border-radius: 13px; }
/* Горящее подсвечивается рамкой и фоном, а не только цветом текста: на солнце
   и в тёмной теме цвет текста читается хуже границы. */
.console-task--urgent { border-color: var(--color-urgent); background: var(--color-urgent-bg); }
.console-task-count { min-width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px; font-weight: 500;
  background: var(--color-amber-bg); color: var(--color-amber); }
.console-task--urgent .console-task-count { background: var(--color-urgent); color: #fff; }
.console-task-body { display: flex; flex-direction: column; gap: 3px; }
.console-task-title { font-size: 14.5px; font-weight: 500; }
.console-task-hint { font-size: 12.5px; opacity: .65; }
.console-task--urgent .console-task-hint { color: var(--color-urgent); opacity: 1; }

.console-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 13px; overflow: hidden; }
.console-metric { background: var(--surface); padding: 11px 13px; display: flex;
  flex-direction: column; gap: 3px; }
.console-metric-label { font-size: 11.5px; opacity: .6; }
.console-metric-value { font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; }
.console-metric-change { font-size: 11.5px; font-weight: 400; margin-left: 5px;
  color: var(--color-success-dark); }
.console-metric-change--down { color: var(--color-urgent); }

/* Строка очереди кликабельна целиком: попасть пальцем в шеврон на телефоне
   нельзя, а в строку — можно. Кнопка, а не div: клавиатура и скринридер. */
.console-task { width: 100%; text-align: left; background: none; font: inherit;
  color: inherit; cursor: pointer; }
.console-task-chev { width: 7px; height: 7px; margin-left: auto; flex-shrink: 0;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); opacity: .45; }
.console-back { background: none; border: 0; font: inherit; color: inherit;
  padding: 12px 16px 0; cursor: pointer; opacity: .7; }

.console-deals { list-style: none; margin: 0; padding: 12px 16px 0; display: flex;
  flex-direction: column; }
.console-deal { display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-top: 1px solid var(--border); }
.console-deal:first-child { border-top: 0; }
.console-deal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.console-deal-title { font-size: 14px; font-weight: 500; }
.console-deal-hint { font-size: 12px; opacity: .6; }
.console-deal--urgent .console-deal-hint { color: var(--color-urgent); opacity: 1; }
/* Кнопка подтверждения — цвета выполненного заказа, а не акцента: владелец
   подтверждает факт, а не совершает действие над человеком. */
.console-deal-yes { border: 1px solid var(--color-success-dark); color: var(--color-success-dark); background: none;
  border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 500;
  white-space: nowrap; cursor: pointer; }
.console-deal-yes:disabled { opacity: .5; cursor: default; }

/* Карточка сделки, переписка и листы последствий ─────────────────────────── */
.console-subbar { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 0; }
.console-subbar .console-back { padding: 0; }
.console-position { font-size: 12px; opacity: .55; font-variant-numeric: tabular-nums; }

.console-queue-head { margin: 10px 16px 0; font-size: 13px; opacity: .75; }
.console-queue-urgent { color: var(--color-urgent); opacity: 1; }

/* Тело строки очереди — кнопка: тап по строке открывает карточку. Сброс
   собственных стилей кнопки нужен здесь целиком, иначе браузер добавит рамку и
   центрирование, и строка разъедется. */
.console-deal-body { flex: 1; min-width: 0; display: flex; flex-direction: column;
  gap: 3px; align-items: flex-start; text-align: left; background: none; border: 0;
  font: inherit; color: inherit; padding: 0; cursor: pointer; }
.console-chev { width: 7px; height: 7px; flex-shrink: 0; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .4; }

.console-card { margin: 12px 16px 0; padding: 14px; border: 1px solid var(--border);
  border-radius: 14px; }
.console-card-title { margin: 0 0 12px; font-size: 15px; font-weight: 500; line-height: 1.35; }
/* Пары «поле — значение» сеткой: значения выравниваются по левому краю столбца,
   и глаз читает их колонкой, а не выискивает после точки. */
.console-pairs { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px;
  margin: 0 0 14px; font-size: 13.5px; }
.console-pairs dt { opacity: .55; white-space: nowrap; }
.console-pairs dd { margin: 0; }
.console-pairs b { font-weight: 500; font-variant-numeric: tabular-nums; }

.console-link { display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 10px; padding: 11px 12px; margin: 0 0 12px; background: none;
  border: 1px solid var(--border); border-radius: 11px; font: inherit;
  color: inherit; font-size: 13px; cursor: pointer; }

.console-actions { display: flex; gap: 8px; }
.console-btn { flex: 1; padding: 11px 10px; border-radius: 11px; font: inherit;
  font-size: 13.5px; font-weight: 500; background: none; cursor: pointer;
  border: 1px solid var(--border); color: inherit; }
.console-btn:disabled { opacity: .5; cursor: default; }
.console-btn--ok { border-color: var(--color-success-dark); color: var(--color-success-dark); }
.console-btn--bad { border-color: var(--color-urgent); color: var(--color-urgent); }

.console-skip { display: block; width: 100%; margin: 10px 0 0; padding: 6px;
  background: none; border: 0; font: inherit; font-size: 12.5px; opacity: .5;
  color: inherit; cursor: pointer; }
/* «Переспросить» — единственное действие карточки, которое ничего не решает за
   человека. Поэтому не в ряду исходов, а отдельной строкой над ними, и цветом
   спокойным: это напоминание, а не приговор. */
.console-reask { display: block; width: 100%; margin: 12px 0 0; padding: 9px;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.console-reask:disabled { opacity: .5; }

/* «Снять с биржи» — не третий ответ на вопрос об исходе встречи, а решение про
   сам заказ. Поэтому не кнопка в ряду с «состоялась/не состоялась», а отдельная
   строка внизу: тревожного цвета, но без веса, который зовёт нажать. */
.console-remove { display: block; width: 100%; margin: 12px 0 0; padding: 8px;
  background: none; border: 0; border-top: 1px solid var(--border); font: inherit;
  font-size: 12.5px; color: var(--color-urgent); cursor: pointer; }

/* Имя человека, ведущее в досье: подчёркнуто пунктиром, а не покрашено в синий —
   в списке фактов синяя строка выглядит ссылкой наружу. */
.console-person-link { padding: 0; background: none; border: 0; font: inherit;
  color: inherit; text-decoration: underline dotted; text-underline-offset: 3px;
  cursor: pointer; }

.console-error { margin: 10px 0 0; font-size: 12.5px; color: var(--color-urgent); }
.console-rest { margin: 10px 16px 0; font-size: 12px; opacity: .5;
  font-variant-numeric: tabular-nums; }

/* Лист последствий. Перекрывает экран целиком: решение стоит человеку баллов
   надёжности, и оно не должно приниматься краем глаза. */
.console-sheet { position: fixed; inset: 0; display: flex; align-items: flex-end;
  background: rgba(20, 22, 26, .45); z-index: 40; }
.console-sheet-body { width: 100%; padding: 18px 16px 22px; border-radius: 18px 18px 0 0;
  background: var(--surface);
  /* Как у .bottom-sheet: не выше экрана, длинный лист листается внутри. */
  max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; }
.console-sheet-title { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.console-sheet-list { margin: 0 0 16px; padding-left: 18px; font-size: 13.5px;
  line-height: 1.6; opacity: .8; }

.console-thread { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.console-day { margin: 8px auto 2px; font-size: 11.5px; opacity: .45; }
.console-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.console-msg--own { margin-left: auto; flex-direction: row-reverse; }
.console-msg-who { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 500;
  background: var(--surface-dim); opacity: .85; }
.console-msg-bubble { padding: 9px 12px; border-radius: 13px; font-size: 13.5px;
  line-height: 1.45; background: var(--surface-dim); }
.console-msg--own .console-msg-bubble { background: var(--surface-own); }
.console-msg-time { margin-left: 8px; font-size: 10.5px; opacity: .45;
  white-space: nowrap; }

/* Вместо поля ввода — объяснение и переход в личку. Отключённое поле обещало бы,
   что когда-нибудь заработает, и владелец тапал бы по нему. */
.console-readonly { margin: 16px 16px 0; padding-top: 12px;
  border-top: 1px solid var(--border); font-size: 12.5px; }
.console-readonly p { margin: 0 0 8px; opacity: .5; }
.console-write { display: inline-block; padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--border); }

/* Жалобы ────────────────────────────────────────────────────────────────── */
/* Тип — буквой, а не эмодзи: в списке из десяти строк эмодзи сливаются в рябь,
   а «С» и «З» различаются с первого взгляда. */
.console-kind { display: inline-grid; place-items: center; width: 18px; height: 18px;
  margin-right: 7px; border-radius: 5px; font-size: 10px; font-weight: 600;
  background: var(--surface-dim); vertical-align: 1px; }
.console-deal-age { font-size: 11.5px; opacity: .45; white-space: nowrap; }

/* Текст жалобы. Не обрезается: жалоба на грубость — это и есть текст, и решать
   по первым тридцати символам нельзя. */
.console-quote { margin: 0 0 14px; padding: 11px 13px; border-radius: 11px;
  background: var(--surface-dim); font-size: 13.5px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.console-quote--empty { opacity: .55; font-style: italic; }

.console-sub { margin: 4px 0 9px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; opacity: .55; font-weight: 500; }
.console-sides { display: flex; flex-direction: column; gap: 11px; margin-bottom: 15px; }
.console-side { display: flex; flex-direction: column; gap: 2px; }
.console-side-title { font-size: 11px; opacity: .5; }
.console-side-name { font-size: 14px; font-weight: 500; }

/* Обжалованное сообщение в контексте переписки. Рамка, а не только фон: фон
   один в один совпал бы с обычным пузырём в тёмной теме. */
.console-msg--marked .console-msg-bubble { outline: 1.5px solid var(--color-urgent);
  outline-offset: 1px; background: var(--color-urgent-bg); }

/* Спор ──────────────────────────────────────────────────────────────────── */
/* Тип заказа — словом над темой: спор один на все типы, и тип надо увидеть
   ДО чтения фактов, потому что факты у встречи и академической разные. */
.console-type { display: inline-block; margin-bottom: 6px; padding: 2px 8px;
  border-radius: 7px; font-size: 10.5px; font-weight: 500;
  background: var(--surface-dim); opacity: .8; }
/* Тема стоит сразу под типом без отступа сверху — они читаются одной шапкой. */
.console-card-title--inline { display: block; }

/* Владелец согласовал держать это на экране спора: платформа деньги не
   держит, и обещать «выплатить пострадавшему» она не должна. */
.console-cash { margin: 0 0 14px; padding: 9px 12px; border-radius: 10px;
  background: var(--color-amber-bg); color: var(--color-amber-text); font-size: 12px; line-height: 1.45; }

/* Факты системы. Точка цветом — «хорошо/плохо» читается до чтения слов. */
.console-facts { list-style: none; margin: 0 0 14px; padding: 0;
  display: flex; flex-direction: column; gap: 8px; }
.console-facts p { margin: 0; font-size: 13.5px; }
.console-facts i { display: block; font-style: normal; font-size: 12px;
  opacity: .55; margin-top: 1px; }
.console-facts time { float: right; margin-left: 10px; font-size: 11.5px;
  opacity: .45; white-space: nowrap; }
.console-fact--bad p { color: var(--color-urgent); }
.console-fact--bad time { color: var(--color-urgent); opacity: .7; }

/* Стороны спора. Вся строка — кнопка: карточка человека открывается тапом
   по стороне, и наказание живёт там, а не здесь. */
.console-person-side { display: flex; align-items: flex-start; gap: 10px;
  width: 100%; padding: 11px 12px; background: none; border: 1px solid var(--border);
  border-radius: 11px; font: inherit; color: inherit; text-align: left;
  cursor: pointer; }
.console-person-side-body { flex: 1; min-width: 0; display: flex;
  flex-direction: column; gap: 2px; }
.console-side-quote { margin-top: 5px; font-size: 12.5px; line-height: 1.45;
  opacity: .7; quotes: none; }

/* Ссылка-пояснение без перехода: файл консоль не показывает, но факт его
   существования важен для решения. */
.console-link--static { opacity: .6; cursor: default; }

/* Карточка человека ─────────────────────────────────────────────────────── */
.console-who { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.console-ava { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 500;
  background: var(--color-amber-bg); color: var(--color-amber); }
.console-who-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Мета-строка под именем: логин, площадка, когда пришёл. */
.console-who-meta { font-size: 12px; opacity: .55; overflow-wrap: anywhere; }

/* Плашка предупреждений/бана. Приглушённый фон, а не алый: человек с одним
   предупреждением — повод посмотреть, а не авария. */
.console-chip { align-self: flex-start; margin-top: 3px; padding: 2px 8px;
  border-radius: 7px; background: var(--color-amber-bg); color: var(--color-amber);
  font-size: 11px; font-weight: 500; }
.console-chip--bad { background: var(--color-urgent-bg); color: var(--color-urgent); }

/* Четыре плитки: выполнено · сорвано · рейтинг · надёжность. */
.console-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 13px; overflow: hidden; margin-bottom: 15px; }
.console-cell { background: var(--surface); padding: 10px 8px;
  display: flex; flex-direction: column; gap: 2px; text-align: center; }
.console-cell small { font-size: 10.5px; opacity: .55; }
.console-cell b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.console-cell--bad b { color: var(--color-urgent); }

/* Строки «что известно» и список веток переписки. */
.console-rows { display: flex; flex-direction: column; margin-bottom: 15px;
  border-top: 1px solid var(--border); }
.console-row { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border); font-size: 13.5px; }
.console-row i { font-style: normal; opacity: .55; white-space: nowrap; }
.console-row b { font-weight: 400; text-align: right; flex: 1;
  overflow-wrap: anywhere; }
/* Длинное значение (причина предупреждения) — под подписью во всю ширину:
   справа узкой колонкой оно рвалось на восемь строк. */
.console-row--stack { flex-direction: column; align-items: stretch; gap: 3px; }
.console-row--stack b { text-align: left; }
/* Действующий штраф (REL-SYS шаг 4): что и когда сгорит слева, «Простить» справа. */
.console-penalty { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border); font-size: 13.5px; }
.console-penalty-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.console-penalty-body small { opacity: .55; overflow-wrap: anywhere; }
.console-penalty .console-btn { flex: 0 0 auto; padding: 8px 12px; }
/* Ветка переписки — кнопка целиком: тап открывает чтение, промаха нет. */
.console-row--tap { width: 100%; background: none; border-left: 0; border-right: 0;
  border-top: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }

/* Хронология с направляющей. Три события должны читаться как одна история,
   иначе непонятно, срыв — случайность или привычка. */
.console-rail { list-style: none; margin: 0 0 15px; padding: 0;
  display: flex; flex-direction: column; }
.console-ev { position: relative; display: flex; align-items: flex-start;
  gap: 10px; padding-bottom: 12px; }
/* Направляющая — линия через точки событий. */
.console-ev::before { content: ""; position: absolute; left: 34px; top: 14px;
  bottom: -2px; width: 1.5px; background: var(--border); }
.console-ev:last-child { padding-bottom: 0; }
.console-ev:last-child::before { display: none; }
.console-ev time { width: 30px; flex-shrink: 0; padding-top: 1px;
  font-size: 11px; opacity: .45; font-variant-numeric: tabular-nums; }
.console-ev-dot { position: relative; z-index: 1; width: 9px; height: 9px;
  flex-shrink: 0; margin-top: 3px; margin-left: 4px; border-radius: 50%; }
.console-ev--bad .console-ev-dot { background: var(--color-urgent); }
.console-ev--ok .console-ev-dot { background: var(--color-success-dark); }
.console-ev--mute .console-ev-dot { background: var(--border); }
.console-ev-body { min-width: 0; }
.console-ev-body h3 { margin: 0; font-size: 13.5px; font-weight: 500; }
.console-ev-body p { margin: 1px 0 0; font-size: 12px; opacity: .55;
  overflow-wrap: anywhere; }
/* «За что» у наказания — главное в строке, поэтому ярче счётчика. */
.console-ev-body p.console-ev-why { margin-top: 3px; opacity: .85; }

/* Кнопки наказания прибиты к низу и не уезжают при прокрутке: решение должно
   быть доступно после того, как владелец дочитал историю. */
.console-pin { position: sticky; bottom: 0; padding: 10px 16px 14px;
  background: linear-gradient(to top, var(--surface) 70%, transparent); }
.console-pin .console-actions { max-width: 420px; margin: 0 auto; }

/* Итог действия над человеком: «предупреждение вынесено» — новость, а не ошибка,
   поэтому зелёно-серая строка вместо алой. */
.console-done { margin: 10px 0 0; font-size: 12.5px; color: var(--color-success-dark); }

/* O-64. Летняя тишина: строка текущего состояния и три режима.
   Состояние окрашено, потому что это ответ на главный вопрос — «молчит сервис
   сейчас или нет»; по слову «auto» его не прочитать. */
.console-attention { margin: 10px 0 0; font-size: 12.5px; color: var(--color-urgent); }
.console-quiet-modes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.console-quiet-mode {
    padding: 11px 13px; text-align: left; cursor: pointer; font: inherit;
    background: var(--surface); color: var(--tg-theme-text-color, #000);
    border: 1px solid var(--border); border-radius: var(--radius-md);
}
.console-quiet-mode:disabled { opacity: .6; cursor: default; }
/* Выбранный режим — рамкой, а не галочкой: она читается и в тёмной теме, и на
   узком экране, где текст режима переносится. */
.console-quiet-mode--active { border-color: var(--tg-theme-button-color, var(--fallback-accent)); font-weight: 600; }

/* Связь с человеком (O-67): личка и письмо от площадки. Кнопки обычного веса —
   это не наказание, а вопрос, и звать нажать они не должны. */
.console-contact { margin: 12px 0 15px; }
.console-contact .console-btn { padding: 9px 10px; font-size: 12.5px; font-weight: 400; }
.console-contact-hint { margin: 6px 0 0; font-size: 11.5px; opacity: .5; }
/* В жалобе связь стоит внутри блока стороны: там свой отступ между сторонами,
   и полный внешний margin склеил бы двух людей в одну кашу. */
.console-side .console-contact { margin: 8px 0 2px; }
/* В переписке связь заменила мёртвую плашку «Написать: имя» и стоит под
   разделителем «только чтение» — верхний отступ там уже есть. */
.console-readonly .console-contact { margin: 8px 0 0; }

/* Лента писем (O-67): что владелец писал и кому. Текст целиком — это
   единственное место, где письмо можно перечитать. */
.console-letters { list-style: none; margin: 0; padding: 12px 16px 20px;
  display: flex; flex-direction: column; gap: 8px; }
.console-letter { width: 100%; display: flex; flex-direction: column; gap: 4px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.console-letter-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 13.5px; }
.console-letter-head b { font-weight: 500; overflow-wrap: anywhere; }
.console-letter-head time { flex-shrink: 0; font-size: 11.5px; opacity: .45;
  font-variant-numeric: tabular-nums; }
.console-letter-text { font-size: 13px; line-height: 1.45; opacity: .75;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.console-letter-undelivered { font-size: 11.5px; color: var(--color-urgent); }
/* Поле письма: та же рамка, что у справочников, но с высотой под несколько
   строк — письмо в одну строку пишут в личке, а не отсюда. */
.console-textarea { display: block; width: 100%; margin-bottom: 4px; resize: vertical;
  line-height: 1.45; }

/* Переключатель срока бана и фильтра людей: переносится, а не вылезает за
   экран телефона — «С предупреждениями · 12» в одну строку не влезает. */
.console-segmented { flex-wrap: wrap; }
.console-sheet-body .console-segmented { margin-bottom: 12px; }

/* Панель инструментов: поиск + кнопка «Добавить». */
.console-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; }
.console-search { flex: 1; padding: 10px 12px 10px 32px; border: 1px solid var(--border);
  border-radius: 12px; font: inherit; font-size: 14px; background: var(--surface);
  min-height: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; }
.console-search:focus { outline: none; border-color: var(--focus-ring); }
.console-search::placeholder { opacity: .45; }
.console-add-btn { white-space: nowrap; padding: 9px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; }

/* Формы редактирования: лейблы, инпуты, чекбоксы. */
.console-label { display: flex; flex-direction: column; gap: 4px;
  margin: 0 16px 12px; font-size: 12px; opacity: .65; }
.console-input { padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; font-size: 14px; background: var(--surface); }
.console-input:focus { outline: none; border-color: var(--focus-ring); }

/* --- Справочник мест встреч в консоли (O-65) --- */

/* Выбор вуза первым: места принадлежат заведению, и общий список был бы кашей,
   в которой «ауд. 205» встречается у пяти разных вузов. */
.console-select {
    display: block; width: 100%; margin: 12px 0; padding: 9px 10px; font: inherit;
    background: var(--surface); color: var(--tg-theme-text-color, #000);
    border: 1px solid var(--border); border-radius: 11px;
}
.console-place-add { display: flex; gap: 8px; margin-bottom: 12px; }
.console-place-add .console-input { flex: 1; min-width: 0; }
.console-place-add .console-btn { flex: 0 0 auto; }
.console-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.console-place {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px;
    font-size: 13.5px;
}
.console-place .console-btn { flex: 0 0 auto; }
/* Выключенное место остаётся в списке и возвращается одной кнопкой; для ошибки
   и дубля есть «Удалить» (владелец 2026-10-10) — заказы с местом не страдают. */
.console-place--off { opacity: .5; text-decoration: line-through; }
.console-place-add { flex-wrap: wrap; }
.console-place-add .console-input:first-child { flex: 1 1 100%; }
.console-place-add .console-place-short { flex: 1 1 120px; }
.console-place { flex-wrap: wrap; }
.console-place-names { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.console-place-names small { font-size: 12px; opacity: .65; }
.console-place-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.console-place-actions .console-btn { padding: 7px 10px; font-size: 12.5px; }
.console-place-edit { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.console-checkbox-row { flex-direction: row; align-items: center; gap: 8px; }
.console-checkbox-row input { width: 16px; height: 16px; }

/* Тег-статус рядом с названием в списке. */
.console-tag { display: inline-block; margin-left: 6px; padding: 1px 6px;
  border-radius: 6px; font-size: 10.5px; font-weight: 500; vertical-align: middle; }
.console-tag--off { background: var(--color-urgent-bg); color: var(--color-urgent); }

/* Инлайн-ряд для справочников (вариант D). */
/* Перенос, а не сжатие: третья плашка («Встречи») на телефоне уходит на новую
   строку, а не давит подписи соседей. */
.console-inline-row { display: flex; flex-wrap: wrap; gap: 8px; }
.console-people-row { margin-top: 8px; }
.console-inline-pill { flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 11px; background: var(--surface-alt);
  border: 1px solid var(--border-soft); cursor: pointer; font: inherit; color: inherit;
  text-align: left; }
.console-inline-pill:active { background: var(--border); }
.console-inline-emoji { font-size: 18px; }
.console-inline-text { font-size: 13.5px; font-weight: 500; }
.console-inline-arrow { margin-left: auto; opacity: .3; font-size: 12px; }
.console-inline-pill { min-width: 140px; }

/* Доска «Встречи» (MEET-BOARD). Строка — кнопка целиком, как строки очереди:
   тап открывает карточку сделки с историей. Горящая — рамкой и фоном, как
   горящие дела на главной. */
.console-refresh { background: none; border: 0; font: inherit; font-size: 13px; color: inherit;
  opacity: .7; cursor: pointer; padding: 0; }
.console-meet-tools { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 0; }
.console-meet-hot-toggle { display: flex; align-items: center; justify-content: flex-start;
  gap: 8px; font-size: 13px; }
/* Общие стили полей растягивают input на всю ширину — чекбоксу это не нужно. */
.console-meet-hot-toggle input { flex: none; width: auto; margin: 0; }
.console-meets { list-style: none; margin: 0; padding: 12px 16px 0; display: flex;
  flex-direction: column; gap: 9px; }
.console-meet { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 13px;
  border: 1px solid var(--border); border-radius: 13px; background: none; font: inherit;
  color: inherit; text-align: left; cursor: pointer; }
.console-meet--hot { border-color: var(--color-urgent); background: var(--color-urgent-bg); }
.console-meet-head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.console-meet-title { font-size: 14px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.console-meet-hot { flex-shrink: 0; font-size: 11.5px; font-weight: 500; color: var(--color-urgent); }
.console-meet-sub { font-size: 12px; opacity: .6; overflow-wrap: anywhere; }
.console-meet-steps { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.console-meet-step--wait, .console-meet-step--skip { opacity: .55; }
.console-meet-step--miss { color: var(--color-urgent); }
.console-meet-next { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px;
  padding-top: 6px; border-top: 1px solid var(--border-soft); }
.console-meet-next b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* История сделки (MEET-BOARD): лента по времени, сообщения — со значком. */
.console-history-title { margin: 0 0 10px; font-size: 13px; font-weight: 500; }
.console-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 7px; font-size: 12.5px; }
.console-history-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.console-history-at { opacity: .5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.console-history-text { min-width: 0; overflow-wrap: anywhere; }
.console-history-note { opacity: .6; }

/* --- КАРТОЧКА ЗАКАЗА НА БИРЖЕ (вариант 1, решение владельца 2026-09-10) ---
   Своя раскладка вместо общих .card-details / .card-actions: те делят ещё девять
   компонентов («Дела», кандидаты, шторка профиля, карточка исполнителя), и менять
   их ради биржи нельзя — поедет половина приложения.
   Правила по зонам: docs/project/ENGINEERING_NOTES.md, раздел 3.7a. */
.card.order-card { position: relative; padding: 14px 16px; }

/* Жалоба «не та категория» — флажок в уголке карточки, а не кнопка во всю ширину:
   это сигнал о проблеме, он не должен спорить по весу с «Откликнуться».
   MARKET-UI (владелец 2026-10-22): уголок цвета карточки, без рамки, внешний угол
   повторяет скругление карточки, значок серый и спокойный — прежний ⚠️ в жёлтом
   кружке кричал громче самого заказа. */
.order-card__flag {
    position: absolute; top: 0; right: 0; width: 40px; height: 38px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: inherit; color: var(--tg-theme-hint-color, #8a8a8e);
    border-radius: 0 var(--radius-lg) 0 var(--radius-md);
    line-height: 1; cursor: pointer; transition: 0.2s;
}
.order-card__flag svg { width: 15px; height: 15px; display: block; }
.order-card__flag:disabled { opacity: 0.6; cursor: not-allowed; }
.order-card__flag:active:not(:disabled) { transform: scale(0.94); }
.order-card__flag:focus-visible { outline: 2px solid var(--tg-theme-button-color, var(--fallback-accent)); outline-offset: -2px; }

/* Шапка: иконка типа + название, под ними тип серой строкой (у Встречи — без неё).
   Отступ справа держит название подальше от уголка с флажком. */
.order-card__head { display: flex; gap: 10px; align-items: flex-start; padding-right: 30px; }
.order-card__icon { font-size: 20px; line-height: 1.2; }
.order-card__title { font-size: 17px; font-weight: bold; line-height: 1.25; }
.order-card__subtitle { margin-top: 2px; font-size: 13px; color: var(--tg-theme-hint-color, #666); }

/* O-84: фото товара — миниатюра справа от фактов, крупно в шторке. */
.order-card__photo {
    float: right; width: 76px; height: 76px; margin: 10px 0 6px 10px; padding: 0;
    border: none; border-radius: 10px; overflow: hidden; background: rgba(127, 127, 127, 0.15); cursor: pointer;
}
.order-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-photo-full { display: block; max-width: 100%; max-height: 55vh; margin: 0 auto; border-radius: 12px; }
.product-photo-picker__buttons { display: flex; gap: 8px; }
.product-photo-picker__buttons .btn { flex: 1; text-align: center; }
.product-photo-picker__preview img { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 8px; border-radius: 12px; }

/* ACAD-1, шаг 2в: методичка — строка-кнопка под фактами карточки и поле анкеты. */
.order-card__guide {
    display: flex; align-items: baseline; gap: 6px; width: 100%; margin: -4px 0 12px; padding: 8px 10px;
    border: 1px solid rgba(127, 127, 127, 0.25); border-radius: 10px; background: transparent;
    color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.order-card__guide-meta { margin-left: auto; font-size: 12.5px; color: var(--tg-theme-hint-color, #666); }
.acad-guide__pick { display: block; text-align: center; }
.acad-guide__file { display: flex; align-items: center; gap: 10px; }
.acad-guide__icon { font-size: 22px; }
.acad-guide__name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acad-guide__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acad-guide__file .btn { width: auto; flex: none; margin: 0; }
/* ACAD-4: шторка сдачи работы — список файлов и подтверждение приёмки. */
.work-submit__file { margin-top: 8px; }
.work-submit-sheet .acad-guide__pick.is-disabled { opacity: .5; pointer-events: none; }
.work-submit-sheet textarea, .work-return-sheet textarea { width: 100%; box-sizing: border-box; }
.work-accept-confirm .order-actions-grid .btn { margin: 0; }

/* Факты: подпись серая, значение белое — именно за это голосовали в разборе. */
.order-card__facts {
    display: grid; gap: 3px; margin: 10px 0 12px;
    font-size: 13.5px; line-height: 1.45; color: var(--tg-theme-hint-color, #666);
}
.order-card__facts b { color: var(--tg-theme-text-color, #111); font-weight: 500; }

/* Цена и счётчики в одну строку: раньше это были две строки во всю ширину. */
.order-card__bar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.order-card__price { font-size: 20px; font-weight: 800; color: var(--color-success); font-variant-numeric: tabular-nums; }
.order-card__stats { font-size: 12px; font-weight: 500; color: var(--tg-theme-hint-color, #666); font-variant-numeric: tabular-nums; }

/* Действия в ряд: «Откликнуться» тянется, остальное — иконками. */
.order-card__actions { display: flex; gap: 8px; }
.order-card__actions .btn { width: auto; padding: 12px; font-size: 15px; }
.order-card__actions .btn-primary { flex: 1; }
.order-card__icon-btn { flex: none; padding: 11px 13px; }
/* Профиль — третий по важности, поэтому заливкой, а не рамкой: две одинаковые
   обводки рядом читались бы как две равные кнопки (макет, вариант 1). */
.order-card__icon-btn--muted {
    background: rgba(127, 127, 127, 0.12);
    border: none;
    color: var(--tg-theme-text-color, #111);
}

/* --- ПЛИТКИ ВСТРЕЧ (MARKET-UI, п.11; макет владельца 2026-10-22) ---
   На «Встречах» лента — сетка в две колонки. Реклама, баннеры и «Показать ещё»
   занимают строку целиком. Плитка — только то, по чему выбирают; остальное в
   шторке с полной карточкой (MeetTile.tsx). */
.feed.feed--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.feed--tiles > :not(.meet-tile) { grid-column: 1 / -1; }
.meet-tile {
    position: relative; min-width: 0; display: flex; flex-direction: column; padding: 12px;
    border: 1px solid transparent; border-radius: var(--radius-lg);
    background: var(--tg-theme-secondary-bg-color, #fff); box-shadow: var(--shadow-card);
}
/* Горячая — тёплым фоном. Оттенок поверх своей подложки: в тёмной теме токен
   полупрозрачный, а уголок с флажком наследует фон и не должен темнеть отдельно. */
.meet-tile--hot {
    border-color: rgba(243, 156, 18, 0.45);
    background: linear-gradient(var(--color-warning-bg), var(--color-warning-bg)), var(--surface);
}
/* Название — кнопка, растянутая на всю плитку: нажатие в любом месте открывает шторку.
   Остальные кнопки лежат выше растяжки и нажимаются сами по себе. */
.meet-tile__open {
    position: static; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    margin: 0 26px 0 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; min-height: 2.5em;
}
.meet-tile__open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.meet-tile__open:focus-visible { outline: none; }
.meet-tile:has(.meet-tile__open:focus-visible) { outline: 2px solid var(--tg-theme-button-color, var(--fallback-accent)); outline-offset: 2px; }
.meet-tile__flag, .meet-tile__actions { z-index: 1; }
.meet-tile__flag { width: 36px; height: 34px; }
.meet-tile__clock { margin-top: 8px; font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.meet-tile__day { margin-top: 3px; font-size: 13px; color: var(--tg-theme-hint-color, #666); }
.meet-tile__bar { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.meet-tile__price { font-size: 17px; font-weight: 800; color: var(--color-success); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meet-tile__gender { font-size: 12px; color: var(--tg-theme-hint-color, #666); white-space: nowrap; }
/* Кнопки прижаты к низу: у соседних плиток разной высоты они стоят на одной линии. */
.meet-tile__actions { position: relative; display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.meet-tile__actions .btn { width: auto; margin: 0; padding: 0; height: 42px; }
.meet-tile__apply { flex: 1; font-size: 21px; line-height: 1; }
.meet-tile__apply--text { font-size: 13px; }
.meet-tile__chat { flex: none; width: 46px; font-size: 18px; }
/* Шторка плитки: полная карточка как в ленте, место под красным «×». */
.meet-tile-sheet { padding-top: 54px; }
.meet-tile-sheet .card.order-card { box-shadow: none; border: 1px solid var(--border-soft); }

/* Обмен контактами в разговоре. Полоса под шапкой, а не кнопка в композере:
   это разовое решение, а не действие переписки, и жить рядом с «отправить»
   оно не должно. */
/* Цвета — чатовые (CHAT-1), как у шапки и этапов над ней: с цветами темы
   Telegram полоса оставалась белой в тёмном чате. */
.chat-share-contact {
    padding: 10px 14px;
    border-bottom: 1px solid var(--chat-sep);
    background: var(--chat-bar);
    color: var(--chat-text);
}
.chat-share-contact .btn { width: auto; padding: 8px 14px; font-size: 14px; display: inline-block; }
.chat-share-contact__hint {
    margin-top: 6px; font-size: 12px; line-height: 1.35;
    color: var(--chat-muted);
}

/* ── O-74: аналитика консоли ────────────────────────────────────────────────
   Одна разметка на телефон и ПК: на узком экране всё столбиком, на широком
   плитки встают в ряд, а разбивки — рядом. */
.console-an-open { margin-top: 10px; width: 100%; }
.console-an-controls { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 0; }
.console-an-switch { display: flex; gap: 4px; padding: 3px; border-radius: 11px;
  background: var(--surface-alt); border: 1px solid var(--border-soft); overflow-x: auto; }
.console-an-switch-item { flex: 1; min-width: max-content; padding: 7px 10px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 13px; color: inherit; cursor: pointer; white-space: nowrap; }
.console-an-switch-item--on { background: var(--surface); font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.console-an-filter { align-self: flex-start; padding: 6px 10px; border-radius: 999px; font: inherit;
  font-size: 12.5px; color: inherit; background: var(--color-amber-bg); border: 1px solid var(--border-soft);
  cursor: pointer; }
.console-an--loading { opacity: .55; transition: opacity .15s; }
.console-an-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.console-an-kpi { border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.console-an-kpi--on { box-shadow: inset 0 -3px 0 var(--tg-theme-button-color, var(--fallback-accent)); }
/* Пять плиток в две колонки: последняя на всю ширину, без пустой клетки. */
.console-an-kpi:last-child { grid-column: 1 / -1; }
.console-an-note { margin: 8px 0 0; font-size: 11.5px; opacity: .55; line-height: 1.35; }
.console-an-chart { border: 1px solid var(--border); border-radius: 13px; padding: 10px; background: var(--surface); }
.console-an-chart svg { display: block; width: 100%; height: 160px; }
.console-an-bar { fill: var(--tg-theme-button-color, var(--fallback-accent)); opacity: .75; cursor: pointer; }
.console-an-bar--picked { opacity: 1; fill: var(--color-amber, #c77700); }
.console-an-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px;
  font-size: 11.5px; opacity: .7; }
.console-an-picked { text-align: center; font-variant-numeric: tabular-nums; }
.console-an-table { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.console-an-row { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 6px; align-items: center;
  width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid var(--border-soft);
  background: var(--surface); font: inherit; font-size: 13px; color: inherit; text-align: left; }
.console-an-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.console-an-row--3 { grid-template-columns: 2.4fr 1fr 1fr; }
.console-an-row--4 { grid-template-columns: 2.4fr repeat(3, 1fr); }
.console-an-row--funnel { grid-template-columns: 1.2fr repeat(7, 1fr); font-size: 12px; }
.console-an-row--funnel span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.console-an-row--head { border-top: 0; font-size: 11px; opacity: .6; background: var(--surface-alt); }
.console-an-row--head span:not(:first-child) { text-align: right; }
.console-an-row--tap { cursor: pointer; }
.console-an-row--tap[aria-pressed="true"] { background: var(--color-amber-bg); }
.console-an-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Исходы сделок (аналитика): кем подтверждены, где и почему сорвались.
   Цвет точки — кто закрыл: заказчик, исполнитель, вы, система, неизвестно. */
/* Переключатель типа заказа над плитками исходов (MEET-BOARD). */
.console-oc .console-segmented { margin-bottom: 10px; }
.console-oc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
/* Пять плиток: на телефоне последняя — во всю ширину, без пустой клетки. */
.console-oc-kpis--five > :last-child { grid-column: 1 / -1; }
.console-oc-tile-hint { display: block; margin-left: 0; opacity: .6; }
.console-oc-list { margin-top: 6px; }
.console-oc-row { position: relative; display: grid; grid-template-columns: 1fr auto 38px; gap: 8px;
  align-items: center; padding: 9px 12px 11px; border-top: 1px solid var(--border-soft);
  background: var(--surface); font-size: 13px; }
.console-oc-row:first-child { border-top: 0; }
.console-oc-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.console-oc-label { display: flex; align-items: center; gap: 7px; min-width: 0; }
.console-oc-share { font-size: 11.5px; opacity: .55; text-align: right; font-variant-numeric: tabular-nums; }
.console-oc-bar { position: absolute; left: 0; bottom: 0; height: 3px; opacity: .45;
  background: var(--tg-theme-button-color, var(--fallback-accent)); }
.console-oc-dot { flex: 0 0 auto; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; background: var(--border); }
.console-oc-label .console-oc-dot { margin-right: 0; }
.console-oc-dot--client, .console-oc-dot--answered { background: var(--tg-theme-button-color, var(--fallback-accent)); }
.console-oc-dot--executor { background: var(--color-success, #2e9d5b); }
.console-oc-dot--admin { background: var(--color-amber, #c77700); }
.console-oc-dot--system, .console-oc-dot--silent { background: var(--color-urgent, #d64545); }
.console-oc-dot--unknown, .console-oc-dot--waiting { background: var(--border); }
.console-oc-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--border); }
.console-oc-stack-part--answered { background: var(--tg-theme-button-color, var(--fallback-accent)); }
.console-oc-stack-part--silent { background: var(--color-urgent, #d64545); }
.console-oc-legend, .console-oc-who { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; }
.console-oc-legend b, .console-oc-who b { font-weight: 500; font-variant-numeric: tabular-nums; }
.console-oc-who { margin: 0 0 10px; }
.console-oc-chip { display: inline-flex; align-items: center; gap: 4px; }
.console-oc-chip .console-oc-dot { margin-right: 0; }
.console-oc-stage { margin-bottom: 12px; }
.console-oc-stage-head { display: grid; grid-template-columns: 1fr auto 38px; gap: 8px; align-items: baseline;
  padding: 0 12px; font-size: 13px; font-weight: 500; }
.console-oc-stage-head b { font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  .console-an-controls { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .console-an-switch { flex: 0 0 auto; }
  .console-an-kpi-grid { grid-template-columns: repeat(5, 1fr); }
  .console-an-kpi:last-child { grid-column: auto; }
  .console-an-chart svg { height: 240px; }
  .console-an-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; align-items: start; }
  .console-oc-kpis { grid-template-columns: repeat(4, 1fr); }
  .console-oc-kpis--five { grid-template-columns: repeat(5, 1fr); }
  .console-oc-kpis--five > :last-child { grid-column: auto; }
}

/* PW-3 — плашка «Вышла новая версия»: поверх шторок и чата, у верхнего края. */
.app-update-banner { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; z-index: 10001; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--surface); color: var(--text-main); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); font-size: 14px; line-height: 1.3; }
.app-update-banner__text { flex: 1; font-weight: 600; }
.app-update-banner__close { background: none; border: 0; color: var(--text-muted); font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer; }

/* DEALS-UI (2026-10-02) — «Мои дела»: шапка со значком чатов, чипы, компактная карточка. */
.deals-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.deals-head h2 { flex: 1; text-align: left; margin: 0; font-size: 24px; }
.deals-back { background: none; border: 0; padding: 4px 0; color: var(--tg-theme-link-color, var(--color-primary)); font-size: 15px; cursor: pointer; white-space: nowrap; }
.deals-chats-btn { position: relative; background: var(--tg-theme-secondary-bg-color, #fff); color: inherit; border: 1px solid rgba(127, 127, 127, 0.22); border-radius: var(--radius-pill); width: 44px; height: 44px; font-size: 21px; cursor: pointer; display: grid; place-items: center; }
/* FB24 B1: заголовок экрана — в полосе кнопок полноэкранного Telegram, по центру,
   в одну линию с «✕ Закрыть» и «⋯» (владелец 2026-10-24). Полосу и её высоту
   отдаёт boot/telegram.js (data-tg-band, --tg-band-h); нет полосы (VK, веб,
   Telegram Desktop) — правил нет, шапка прежняя. body уже отступил на
   15px + вырез + полосу — поднимаемся обратно в полосу. Кнопки Telegram своей
   ширины не сообщают: ~95px слева и справа взяты с запасом по iOS. */
html[data-tg-band] .screen-head {
    position: relative; display: block; box-sizing: border-box;
    height: var(--tg-band-h); min-height: 0;
    margin: calc(-15px - var(--tg-band-h)) 0 12px; padding: 0;
}
html[data-tg-band] .screen-head__title {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    max-width: calc(100% - 180px); margin: 0; padding: 0;
    font-size: 17px; font-weight: 600; line-height: 1.2; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 🔔 и 💬 — в той же строке, слева от «⋯» Telegram; заголовку места меньше. */
html[data-tg-band] .screen-head--action .screen-head__title { max-width: calc(100% - 240px); }
html[data-tg-band] .screen-head .nav-inbox,
html[data-tg-band] .screen-head .deals-chats-btn { position: absolute; right: 80px; top: 50%; transform: translateY(-50%); }
html[data-tg-band] .screen-head .nav-inbox { font-size: 22px; }
html[data-tg-band] .screen-head .deals-chats-btn { width: 34px; height: 34px; font-size: 17px; }
/* CHAT-UX Г: шапка вложенного экрана («Чаты», архив) — заголовок по центру, «‹ назад»
   слева, как в iOS. Вне полосы Telegram; в полосе работают правила выше. */
html:not([data-tg-band]) .screen-head--nav { position: relative; min-height: 36px; }
html:not([data-tg-band]) .screen-head--nav .screen-head__title {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    max-width: calc(100% - 170px); font-size: 17px; font-weight: 700; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.deals-chats-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
/* DEALS-RE (макет TG · B / VK · B, 2026-10-29): роли переключателем, группы, Архив строкой внизу. */
.deals-roles { margin-bottom: 4px; }
.deals-roles .segment { border: 0; background: none; font-family: inherit; font-weight: 600; color: var(--tg-theme-text-color, #000); }
.deals-roles .segment.active { background: var(--tg-theme-bg-color, #fff); }
.deals-roles__count { color: var(--text-muted); font-weight: 500; margin-left: 5px; }
.deals-group { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; padding: 8px 4px 0; }
.deals-group--hot { color: #c26a00; font-weight: 600; }
.deals-archive-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 12px 14px; border: 0; border-radius: var(--radius-md); background: var(--tg-theme-secondary-bg-color, #fff); box-shadow: var(--shadow-card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.deals-archive-row__icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(127, 127, 127, 0.14); font-size: 18px; }
.deals-archive-row__label { flex: 1; font-size: 16px; font-weight: 500; }
.deals-archive-row__count { color: var(--text-muted); font-size: 15px; }
.deals-archive-row__chev { color: var(--text-muted); font-size: 22px; line-height: 1; }
.deals-feed { gap: 10px; }
/* DEALS-RE (макет TG · B): дела строками в белом блоке группы, разделитель — от текста. */
.deal-rows { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.deal-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px 11px 12px; cursor: pointer; position: relative; }
.deal-row + .deal-row::before { content: ""; position: absolute; left: 62px; right: 0; top: 0; height: 1px; background: rgba(127, 127, 127, 0.18); }
.deal-card--archived { opacity: 0.85; }
.deal-row__icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; }
.deal-row__icon--a { background: rgba(243, 156, 18, 0.18); }
.deal-row__icon--b { background: rgba(36, 129, 204, 0.14); }
.deal-row__icon--g { background: rgba(46, 204, 113, 0.16); }
.deal-row__icon--n { background: rgba(127, 127, 127, 0.14); }
.deal-row__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.deal-card__title { font-weight: 600; font-size: 15.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card__sub { color: var(--text-muted); font-size: 13.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card__sub--act { color: #c26a00; font-weight: 600; }
.deal-card__warn { color: var(--color-warning); font-size: 12px; font-weight: 700; margin-top: 2px; }
.deal-row__right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.deal-card__price { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.deal-card__unread { min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; background: var(--color-primary, #2481cc); color: #fff; font-size: 12px; font-weight: 600; text-align: center; padding: 0 6px; box-sizing: border-box; }
.deal-card__menu { flex: none; width: 30px; height: 36px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted); font-size: 16px; font-weight: 700; letter-spacing: 1px; cursor: pointer; padding: 0; }
.deal-details-sheet .card { box-shadow: none; padding: 4px 0 0; }

/* DEALS-UI, шаги 2–3 (2026-10-02) — экран «Кандидаты»: один человек — одна строка;
   над перепиской с кандидатом — его карточка, «Нанять» / «Отклонить», листание. */
.cands-screen .deals-head { margin-bottom: 4px; }
.cands-screen__title { margin: 0; font-size: 20px; text-align: left; line-height: 1.25; }
.cands-screen__sub { color: var(--text-muted); font-size: 13px; margin: 2px 0 10px; }
.cand-list { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.cand-list__empty { padding: 16px; color: var(--text-muted); font-size: 14px; text-align: center; }
.cand-list--dropped { opacity: 0.8; }
.cand-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(127, 127, 127, 0.16); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cand-row:last-child { border-bottom: 0; }
.cand-row:disabled { cursor: default; }
.cand-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.cand-av--big { width: 42px; height: 42px; font-size: 17px; }
/* Цвет — как у заголовка карточки (от body), не --text-main: тот в тёмной схеме светлый, а карточка ленты нет. */
.cand-row__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cand-row__name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-row__stats { margin-left: 6px; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.cand-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; background: rgba(127, 127, 127, 0.14); color: var(--text-muted); vertical-align: 1px; }
.cand-tag--novice { background: rgba(124, 92, 214, 0.14); color: #7c5cd6; }
.cand-row__preview { margin-top: 2px; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-row__preview--strong { color: inherit; font-weight: 600; }
.cand-row__right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.cand-row__unread { min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 10px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.cand-row__price { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cand-price--own { color: var(--color-warning); font-weight: 700; }
.cands-screen__dropped { display: block; margin: 12px auto 6px; background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; }
.cands-screen__hint { color: var(--text-muted); font-size: 12px; text-align: center; margin-bottom: 6px; }

.cand-bar { padding: 10px 14px; background: var(--chat-bar); border-bottom: 1px solid var(--chat-sep); color: var(--chat-text); max-height: 50vh; overflow-y: auto; }
.cand-bar__nav { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: -4px 0 6px; font-size: 13px; color: var(--chat-muted); }
.cand-bar__nav button { width: 32px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--chat-accent); font-size: 20px; line-height: 1; cursor: pointer; }
.cand-bar__nav button:disabled { opacity: 0.3; cursor: default; }
.cand-bar__head { display: flex; align-items: center; gap: 10px; }
.cand-bar__who { flex: 1; min-width: 0; }
.cand-bar__name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.cand-bar__stats { font-size: 12px; color: var(--chat-muted); margin-top: 1px; }
.cand-bar__who .candidate-badge { margin-top: 3px; }
.cand-bar__price { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cand-bar__price small { font-size: 11px; color: var(--chat-muted); }
.cand-bar__actions { display: flex; gap: 8px; margin-top: 10px; }
.cand-bar__actions .btn { flex: 1; padding: 10px 8px; font-size: 15px; margin: 0; }
.cand-bar__reject { color: var(--color-danger); border-color: rgba(231, 76, 60, 0.45); }
.cand-bar__hint { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: rgba(127, 127, 127, 0.12); font-size: 13px; line-height: 1.4; }
.cand-bar__more { display: block; margin: 6px 0 0; padding: 4px 0; background: none; border: 0; color: var(--chat-accent); font: inherit; font-size: 13px; cursor: pointer; }
.cand-bar__details { padding-bottom: 4px; }
.cand-bar__details .candidate-line { color: var(--chat-muted); }
.cand-bar__details .candidate-quote-more { background: var(--chat-bar); }
.cand-hire-sheet { text-align: center; }
.cand-hire-sheet__icon { font-size: 34px; }
.cand-hire-sheet .sheet-heading { margin: 4px 0 0; }
.cand-hire-sheet__q { font-size: 17px; font-weight: 700; margin: 6px 0 0; }
.cand-hire-sheet__note { color: var(--text-muted); font-size: 13px; line-height: 1.45; margin: 8px 0 14px; }
.chat-quick-replies { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 10px 0; background: var(--chat-bar); }
.chat-quick-reply { border: 1.5px solid var(--chat-accent); background: none; color: var(--chat-accent); border-radius: 16px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
/* «Вернуть» висит поверх и экрана, и переписки (чат — z-index 3000). */
.cand-undo { position: fixed; left: 12px; right: 12px; top: calc(10px + var(--tg-safe-top, 0px) + env(safe-area-inset-top)); z-index: 3600; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: #1d1f23; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.cand-undo span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-undo button { flex: none; background: none; border: 0; color: #8cc4ff; font: inherit; font-weight: 700; cursor: pointer; padding: 4px 2px; }

/* Жалобы консоли (COMPL-UI, макет 2026-10-03) ─────────────────────────────
   Цвет закреплён за РОЛЬЮ: синий — жалобщик, красный — на кого жалуются,
   серая плашка — объявление. Больше цветом в жалобах ничего не красится:
   владелец не различал «заказ, жалобщик, нарушитель», пока всё было одним цветом. */
.console-rep { color: var(--role-rep); font-weight: 600; }
.console-tgt { color: var(--role-tgt); font-weight: 600; }
.console-cfilters { display: flex; gap: 6px; padding: 10px 16px 2px; overflow-x: auto; scrollbar-width: none; }
.console-cfilter { flex: 0 0 auto; font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: none; color: inherit; opacity: .75; cursor: pointer; }
.console-cfilter i { font-style: normal; margin-left: 2px; font-variant-numeric: tabular-nums; }
.console-cfilter[aria-pressed="true"] { background: var(--text-main); color: var(--surface); border-color: var(--text-main); opacity: 1; }
.console-complaint { border-top: 1px solid var(--border); }
.console-complaint:first-child { border-top: 0; }
.console-complaint-body { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 13px 0; text-align: left;
  background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.console-complaint-head { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.console-complaint-head b { font-size: 15px; font-weight: 600; }
.console-complaint-head .console-deal-age { margin-left: auto; }
.console-complaint-count { font-size: 12px; opacity: .6; white-space: nowrap; }
.console-obj-line { justify-self: start; max-width: 100%; font-size: 12.5px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-dim); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-ppl { font-size: 13.5px; }
.console-ppl small, .console-p-line small { font-size: 12px; opacity: .5; font-weight: 400; }
.console-arrow { opacity: .4; margin: 0 5px; }
.console-said { font-size: 13px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.console-cbody { padding: 12px 16px 20px; display: grid; gap: 20px; }
.console-chead { display: grid; gap: 6px; }
.console-chead h3 { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.2; }
.console-chead p { margin: 0; font-size: 15px; line-height: 1.45; }
.console-chead small { font-size: 12.5px; opacity: .6; }
.console-clabel { margin: 0 0 8px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; opacity: .5; }
.console-clabel--rep { color: var(--role-rep); opacity: 1; }
.console-clabel--tgt { color: var(--role-tgt); opacity: 1; }
.console-obj { background: var(--surface-dim); border-radius: 14px; padding: 13px 14px; display: grid; gap: 7px; }
.console-obj-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; opacity: .7; }
.console-obj-top b { font-weight: 600; }
.console-obj-top span { font-variant-numeric: tabular-nums; font-weight: 600; }
.console-obj-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.console-obj-details { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-obj-details small { display: block; font-size: 11.5px; opacity: .55; margin-bottom: 2px; }
.console-obj-meta { font-size: 12.5px; opacity: .65; }
.console-obj-foot { font-size: 12.5px; opacity: .65; padding-top: 8px; border-top: 1px solid var(--border); }
.console-people { display: grid; }
.console-person { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 3px 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.console-person:first-child { border-top: 0; padding-top: 0; }
.console-person > :not(.console-ava) { grid-column: 2; }
.console-ava { grid-column: 1; grid-row: 1 / span 4; width: 32px; height: 32px; border-radius: 50%; display: grid;
  place-items: center; font-size: 12.5px; font-weight: 700; }
.console-ava--rep { background: var(--role-rep-bg); color: var(--role-rep); }
.console-ava--tgt { background: var(--role-tgt-bg); color: var(--role-tgt); }
.console-p-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.console-p-when { margin-left: auto; font-size: 12px; opacity: .45; white-space: nowrap; }
.console-p-offer { font-size: 13px; font-weight: 500; }
.console-p-text { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-p-text--none { opacity: .45; font-style: italic; }
.console-p-meta { font-size: 12.5px; opacity: .7; }
.console-p-meta em { font-style: normal; color: var(--role-tgt); }
.console-p-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.console-textlink { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 500;
  color: inherit; cursor: pointer; text-align: left; }
.console-contact--compact { margin: 0; }
.console-contact-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.console-cchat { display: grid; gap: 6px; margin-bottom: 8px; }
.console-cmsg { max-width: 86%; padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  background: var(--surface-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.console-cmsg small { display: block; font-size: 11px; font-weight: 600; margin-bottom: 2px; opacity: .7; }
.console-cmsg--tgt { background: var(--role-tgt-bg); }
.console-cmsg--tgt small { color: var(--role-tgt); opacity: 1; }
.console-cmsg--rep { background: var(--role-rep-bg); justify-self: end; }
.console-cmsg--rep small { color: var(--role-rep); opacity: 1; }
.console-cmsg--marked { outline: 1.5px solid var(--role-tgt); outline-offset: 1px; }
.console-decide { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.console-decide .console-clabel { margin: 0; }
.console-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.console-pick button { font: inherit; font-size: 13px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--border);
  background: none; color: inherit; cursor: pointer; }
.console-pick button small { opacity: .6; }
.console-pick button[aria-pressed="true"] { border-color: var(--text-main); box-shadow: inset 0 0 0 1px var(--text-main); font-weight: 600; }
/* Главное действие — цветом текста, а не синим: синий занят жалобщиком. */
.console-btn--main { background: var(--text-main); border-color: var(--text-main); color: var(--surface); }

/* Жалоба «не та категория» на Бирже — выбор категории вместо пустого поля (COMPL-UI). */
.category-report-opts { display: grid; gap: 7px; }
.category-report-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 1px 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; text-align: left; }
.category-report-opt input { grid-row: span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); }
.category-report-opt b { font-size: 14px; font-weight: 600; }
.category-report-opt span { grid-column: 2; font-size: 12.5px; color: var(--text-muted); }
.category-report-opt:has(input:checked) { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.category-report-why { width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-alt); color: inherit; font: inherit; font-size: 14px; resize: vertical; box-sizing: border-box; }
.category-report-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }
/* «О рекламе»: полная маркировка объявления по 38-ФЗ (ADS-CAB, шаг 2). */
.ad-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0 0 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; }
.ad-info dt { color: var(--text-muted); }
.ad-info dd { margin: 0; overflow-wrap: anywhere; }

/* Спор на карточке сделки: что сказал открывший и ответ второй стороны (DISP-UI). */
.dispute-panel { margin-bottom: 12px; padding: 12px; border: 1px solid rgba(241,196,15,0.45); border-radius: var(--radius-md); background: var(--surface); }
.dispute-panel__title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.dispute-quote { margin-bottom: 8px; padding: 8px 10px; border-left: 3px solid var(--color-amber-text); background: var(--color-amber-bg); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 14px; line-height: 1.4; }
.dispute-quote small { display: block; font-size: 12.5px; font-weight: 600; color: var(--color-amber-text); }

/* Споры консоли (DISP-UI, макет v1 2026-10-03) ─────────────────────────────
   Язык жалоб: синий — кто открыл спор, красный — вторая сторона, серое —
   объявление. Жёлтое — чего система не увидела: молчание второй стороны,
   неотвеченные сообщения, отметки, которых нет. */
.console-warn { color: var(--role-warn); font-weight: 600; opacity: 1; }
.console-say-row { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; opacity: .75; }
.console-say-row .console-warn { opacity: 1; }
.console-chead .console-role, .console-chead p small { font-size: 12.5px; opacity: .55; font-weight: 400; }
.console-decide-title { margin: 0; font-size: 17px; font-weight: 650; }
.console-ways { display: grid; gap: 8px; }
.console-way { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); }
.console-way ul { margin: 0; padding-left: 17px; display: grid; gap: 3px; font-size: 13px; opacity: .8; }
.console-way .console-btn { flex: none; width: 100%; }
.console-tl { list-style: none; margin: 0; padding: 0; display: grid; }
.console-tl li { display: grid; grid-template-columns: 84px 14px minmax(0, 1fr); gap: 0 8px; align-items: start; font-size: 13.5px; }
.console-tl time { font-size: 12px; opacity: .45; text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.console-tl-dot { position: relative; height: 100%; min-height: 26px; }
.console-tl-dot::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.console-tl li:first-child .console-tl-dot::before { top: 7px; }
.console-tl li:last-child .console-tl-dot::before { bottom: calc(100% - 7px); }
.console-tl-dot::after { content: ""; position: absolute; left: 2px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--text-faint); box-sizing: border-box; }
.console-tl-text { padding-bottom: 10px; min-width: 0; overflow-wrap: anywhere; }
.console-tl-text small { display: block; font-size: 12px; opacity: .6; }
.console-tl--msg .console-tl-text { opacity: .75; }
.console-tl--miss .console-tl-dot::after { border-color: var(--role-warn); background: var(--role-warn); }
.console-tl--miss .console-tl-text { color: var(--role-warn); font-weight: 500; opacity: 1; }
.console-tl--miss .console-tl-text small { opacity: .85; }
.console-tl--key .console-tl-dot::after { border-color: var(--text-main); background: var(--text-main); }
.console-tl--key .console-tl-text { font-weight: 600; }
.console-files { display: flex; flex-wrap: wrap; gap: 8px; }
.console-file { display: grid; gap: 3px; width: 104px; padding: 0; border: 0; background: none; font: inherit; font-size: 11.5px;
  color: inherit; text-align: left; cursor: pointer; }
.console-file-thumb { height: 64px; border-radius: 10px; background: var(--surface-dim); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; opacity: .8; border: 1px solid var(--border); }
.console-file-name { opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-notices { display: grid; gap: 6px; margin-bottom: 10px; }
.console-notice { font-size: 12.5px; line-height: 1.45; padding: 9px 11px; border-radius: 12px; background: var(--surface-dim);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.console-notice b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.console-note-input { width: 100%; min-height: 56px; margin-bottom: 12px; resize: vertical; font: inherit; font-size: 13.5px;
  color: inherit; background: var(--surface-dim); border: 0; border-radius: 12px; padding: 10px 12px; box-sizing: border-box; }

/* EXEC-FREE, этап 3: разговор-черновик — сделка в чате без заказа. */
.pick-chip--free { border-color: var(--color-success, #2e9e5b); }
.pick-chip--free:not(.pick-chip--on) { background: rgba(46, 158, 91, 0.10); }
/* FREE-CUT: взятая Встреча в «Свободных часах» — зачёркнута серым «занята: место». */
.free-busy { color: var(--text-muted); }
.chat-draft { padding: 8px 12px; border-bottom: 1px solid var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.08)); }
.chat-draft__lock { font-size: 13px; color: var(--tg-theme-hint-color, var(--fallback-hint)); margin-bottom: 6px; }
.chat-draft__terms { border: 1px solid var(--color-success, #2e9e5b); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.chat-draft__terms--stale { opacity: 0.6; border-style: dashed; }
.chat-draft__title { font-weight: 700; font-size: 14px; }
.chat-draft__label { font-size: 14px; margin-top: 2px; }
.chat-draft__caption { font-size: 13px; color: var(--tg-theme-hint-color, var(--fallback-hint)); margin-bottom: 6px; }
.chat-draft__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-draft__actions .btn { width: auto; flex: 1 1 auto; padding: 8px 12px; font-size: 14px; margin: 0; }
.chat-draft__close { flex: 0 0 auto !important; }
.chat-draft__counter { margin-top: 8px; }
.chat-attach-btn:disabled { opacity: 0.4; }

/* ADS-CAB, шаг 1: кабинет рекламы в консоли владельца (`src/console/ads/`).
   Цвет — только статус, как в макете `design_preview/ads-cabinet.html`: зелёный
   идёт, жёлтый требует внимания, красный стоп/нельзя, серый черновик/конец.
   Всё под `.ads-cabinet`, где правило задевает общие классы консоли. */
.ads-banner { margin: 10px 16px 0; }
.ads-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; opacity: .65; }
.ads-note-pad { margin: 14px 16px 0; }
.ads-muted { opacity: .55; font-weight: 400; }
.ads-ok { font-size: 12.5px; color: var(--color-success-dark); white-space: nowrap; }
.ads-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.ads-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ссылку на отчёт клиента выделяют целиком одним касанием (старый WebView без буфера). */
.ads-report-url { margin: 0; -webkit-user-select: all; user-select: all; }
/* Отчётность (шаг 3): месяц со стрелками, клиент со ссылкой и отметкой. */
.ads-title-row .ads-month { flex: 1; margin: 6px 0 0; text-align: center; }
.ads-title-row .ads-btn-small[aria-label] { min-width: 40px; }
.ads-todo-text .ads-link-inline { text-align: left; }
.ads-client-line { display: block; margin-top: 2px; font-size: 12px; opacity: .65; }
.ads-client-actions { display: flex; flex-direction: column; gap: 6px; }
.ads-warn { color: var(--color-amber); }
/* Медиакит (шаг 3): текст для клиента виден целиком — его же копирует кнопка. */
.ads-kit-text { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  -webkit-user-select: text; user-select: text; }
.ads-sub { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.45; opacity: .65;
  overflow-wrap: anywhere; }
.ads-link-inline { padding: 0; background: none; border: 0; font: inherit; color: inherit;
  text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.ads-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ads-title-row .console-card-title { margin-bottom: 8px; }
.ads-title-row .ads-card-subtitle { margin: 0 0 10px; }
.ads-card-subtitle { margin: 16px 0 8px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 500; opacity: .55; }
.console-card > .ads-card-subtitle:first-child { margin-top: 0; }
/* Плитки по три: показы · люди · клики. Сетка `console-grid4` — четыре. */
.ads-grid3 { grid-template-columns: repeat(3, 1fr); }
/* Маленькая кнопка в строке не растягивается, как `console-btn` в ряду действий. */
.ads-btn-small { flex: 0 0 auto; padding: 7px 11px; font-size: 12.5px; white-space: nowrap; }
.ads-cabinet .console-segmented { margin-bottom: 12px; }
/* Заголовок карточки — слева во всех экранах кабинета: общее правило `h2`
   ставит его по центру, и мастер выглядел не так, как карточка кампании. */
.ads-cabinet .console-card-title { text-align: left; }
.ads-cabinet .console-place-add { margin: 10px 0 0; }
.ads-cabinet .console-subbar .console-add-btn { flex: 0 0 auto; }
/* Одиночная кнопка карточки («Добавить вариант», «Сохранить erid») — во всю
   ширину, как ряд действий: узкая у левого края терялась под текстом. */
.ads-cabinet .console-card > .console-btn:not(.ads-btn-small) { display: block; width: 100%; margin-top: 12px; }

/* Метка состояния кампании. */
.ads-chip { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 500; white-space: nowrap; }
.ads-chip--ok { background: var(--color-success-bg); color: var(--color-success-dark); }
.ads-chip--warn { background: var(--color-amber-bg); color: var(--color-amber-text); }
.ads-chip--bad { background: var(--color-urgent-bg); color: var(--color-urgent); }
.ads-chip--mute { background: var(--surface-alt); color: var(--text-muted); }

/* Сводка: дела, площадки, стоп. Горящее дело — красной точкой, а не красной
   рамкой: рамкой выделено каждое дело, и красная на всех превратила бы список
   в забор. Фон — не `--surface-alt`: в Telegram он совпадает с фоном экрана. */
.ads-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ads-todo-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.ads-todo-item::before { content: ""; width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%; background: var(--color-amber); }
.ads-todo-item--urgent::before { background: var(--color-urgent); }
.ads-todo-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ads-inline-form { margin-top: 10px; }
.ads-inline-form > .ads-note:first-child { margin-top: 0; }

/* Календарь занятости (экран 8): строка — площадка, клетка — неделя, цифра — сколько
   платных её делят. Цвет — та же шкала статуса: 1 зелёный, 2 жёлтый, 3+ красный.
   Свободная клетка — рамкой: `--surface-alt` в Telegram совпадает с фоном. */
.ads-occ { display: grid; gap: 3px; font-size: 11px; }
.ads-occ-row { display: grid; grid-template-columns: minmax(70px, 96px) repeat(6, minmax(0, 1fr)); gap: 3px; }
.ads-occ-row--off { opacity: .45; }
.ads-occ-head { text-align: center; font-weight: 600; opacity: .55; padding-bottom: 2px; }
.ads-occ-name { align-self: center; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 11.5px; opacity: .75; }
.ads-occ-cell { display: grid; place-items: center; height: 28px; padding: 0; border: 0; border-radius: 6px;
  background: none; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-muted); font: inherit; font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: pointer; }
.ads-occ-cell--1 { box-shadow: none; background: var(--color-success-bg); color: var(--color-success-dark); }
.ads-occ-cell--2 { box-shadow: none; background: var(--color-amber-bg); color: var(--color-amber-text); }
.ads-occ-cell--3 { box-shadow: none; background: var(--color-urgent-bg); color: var(--color-urgent); }
.ads-occ-cell--on { outline: 2px solid var(--text-main); outline-offset: -2px; }
.ads-occ-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 11.5px; opacity: .75; }
.ads-occ-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ads-occ-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; cursor: default;
}
.ads-places { list-style: none; margin: 0; padding: 0; }
.ads-place { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ads-place:first-child { border-top: 0; padding-top: 0; }
.ads-place--off { opacity: .5; }
.ads-place-name { font-weight: 500; }
.ads-place-line { min-width: 0; text-align: right; font-size: 12.5px; opacity: .65; overflow-wrap: anywhere; }
/* «Свободно — продать» — не беда, а возможность: жёлтым, не красным. */
.ads-place-line--free { color: var(--color-amber-text); opacity: 1; }

.ads-stop { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-color: var(--color-urgent); }
.ads-stop-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ads-stop-body b { font-size: 13.5px; font-weight: 500; }
.ads-stop-body small { font-size: 12px; opacity: .6; }

/* Подтверждение на экране и причины «не запустится». */
.ads-confirm { margin-top: 12px; padding: 12px; border: 1px solid var(--color-urgent);
  border-radius: 12px; background: var(--color-urgent-bg); }
.ads-confirm p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; }
.ads-problems { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px;
  background: var(--color-amber-bg); font-size: 12.5px; }
.ads-problems b { color: var(--color-amber-text); font-weight: 600; }
.ads-problems ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }

/* Вкладки списка кампаний листаются вбок: шесть в ширину телефона не влезут. */
.ads-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px 2px; }
.ads-tabs::-webkit-scrollbar { display: none; }
.ads-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: none;
  font: inherit; font-size: 12.5px; color: inherit; cursor: pointer; }
.ads-tab--on { background: var(--text-main); border-color: var(--text-main); color: var(--surface); }
.ads-tab-count { font-variant-numeric: tabular-nums; opacity: .6; }
.ads-tab-count--bad { color: var(--color-urgent); font-weight: 600; opacity: 1; }
.ads-tab--on .ads-tab-count--bad { color: inherit; }

/* Строка кампании (площадки, рекламодателя) — кнопка целиком, как строки очереди. */
.ads-campaigns { list-style: none; margin: 0; padding: 12px 16px 0; display: flex;
  flex-direction: column; gap: 8px; }
.ads-campaigns--flush { padding: 0; }
.ads-campaign { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ads-campaign-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ads-campaign-name { min-width: 0; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.ads-campaign-sub { font-size: 12.5px; opacity: .6; overflow-wrap: anywhere; }
.ads-campaign-hint { font-size: 12.5px; opacity: .8; overflow-wrap: anywhere; }
.ads-campaign-hint--bad { color: var(--color-urgent); opacity: 1; }
.ads-bar { display: block; height: 4px; margin-top: 3px; border-radius: 2px;
  background: var(--border); overflow: hidden; }
.ads-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--color-success-dark); }
.ads-card-flush { margin: 0; }

/* Карточка кампании: действия, график, таблица, варианты, оплаты. */
.ads-actions { flex-wrap: wrap; margin-top: 12px; }
.ads-actions .console-btn { flex: 1 1 calc(33% - 8px); min-width: 90px; }
.ads-chart { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.ads-chart-bar { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--text-main); opacity: .75; }
.ads-chart-axis { display: flex; justify-content: space-between; margin-top: 4px;
  font-size: 11px; opacity: .5; font-variant-numeric: tabular-nums; }
.ads-table { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ads-table-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 50px 50px; gap: 6px;
  padding: 6px 0; border-top: 1px solid var(--border); }
.ads-table-row > span:first-child { overflow-wrap: anywhere; }
.ads-table-row > span:not(:first-child) { text-align: right; }
.ads-table-head { padding-top: 0; border-top: 0; font-size: 11px; opacity: .55; }
.ads-table-total { font-weight: 600; }

.ads-creatives { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ads-creative { display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 11px; }
.ads-creative--off { opacity: .55; }
.ads-complaint--done { opacity: .55; }
.ads-creative-img { width: 56px; height: 36px; flex-shrink: 0; border-radius: 7px;
  object-fit: cover; background: var(--surface-alt); }
.ads-creative-img--big { width: 120px; height: 72px; border-radius: 9px; }
.ads-creative-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ads-creative-body b { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.ads-creative-body small { font-size: 12px; opacity: .6; overflow-wrap: anywhere; }

.ads-payments { list-style: none; margin: 0 0 12px; padding: 0; }
.ads-payments li { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }

/* Мастер: шаги, формы, выбор из списка. */
.ads-steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px 0; }
.ads-steps::-webkit-scrollbar { display: none; }
.ads-step { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: none; font: inherit; font-size: 12px; color: inherit; opacity: .6; cursor: pointer; }
.ads-step--done { opacity: 1; border-color: var(--color-success-dark); color: var(--color-success-dark); }
.ads-step--on { opacity: 1; background: var(--text-main); border-color: var(--text-main); color: var(--surface); }
.ads-step:disabled { opacity: .35; cursor: default; }
.ads-wizard-nav { margin-top: 16px; }

.ads-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.ads-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.ads-field > span { display: flex; justify-content: space-between; gap: 8px; opacity: .65; }
.ads-field > span i { font-style: normal; font-variant-numeric: tabular-nums; }
.ads-field .console-input { width: 100%; min-width: 0; box-sizing: border-box; margin: 0; }
.ads-field--wide { grid-column: 1 / -1; }
.console-card > .ads-field { margin-top: 12px; }
.ads-erid { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.ads-erid small { font-size: 12px; }
/* Узкий телефон: две даты рядом не влезают — в столбик. */
@media (max-width: 340px) {
  .ads-form-grid { grid-template-columns: 1fr; }
}

.ads-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
/* Общее правило `input` (рамка, отступы, `appearance: none`) превращает
   радиокнопку в пустой квадрат: выбранное не отличить от невыбранного. */
.ads-check input, .ads-pick-item input { -webkit-appearance: auto; appearance: auto; width: 16px; height: 16px;
  margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--tg-theme-button-color, var(--fallback-accent)); }

.ads-pick { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ads-pick-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 11px; font-size: 13.5px; cursor: pointer; }
.ads-pick-item > span:not(.ads-pick-num) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ads-pick-item b { font-weight: 500; overflow-wrap: anywhere; }
.ads-pick-item small { font-size: 12px; opacity: .6; overflow-wrap: anywhere; }
/* Выбранное — рамкой, как режим тишины: читается и в тёмной теме. */
.ads-pick-item--on { border-color: var(--tg-theme-button-color, var(--fallback-accent)); }
.ads-pick-item--off { opacity: .5; cursor: default; }
.ads-pick-num { flex-shrink: 0; font-size: 12.5px; opacity: .7; white-space: nowrap;
  font-variant-numeric: tabular-nums; }

/* Картинка объявления: выбор файла спрятан под кнопкой. */
.ads-image-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 12px; }
.ads-image-empty { width: 120px; height: 72px; display: grid; place-items: center;
  border: 1.5px dashed var(--border); border-radius: 9px; font-size: 12px; opacity: .55; }
.ads-file { position: relative; overflow: hidden; text-align: center; }
.ads-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* Превью — живая карточка ленты (`.ad-card`) без отступа под следующей и без клика. */
.ads-preview { margin-bottom: 0; cursor: default; }

/* FB24 D, вариант Б — свой профиль (screens/profile/ProfileScreen.tsx): вкладки ролей,
   плитки цифр, карточки строками; чужой профиль, титулы, избранное, верификация. */
.pb-seg { display: flex; margin: 12px 16px; padding: 2px; border-radius: 10px; background: rgba(120, 120, 128, .16); }
.pb-seg button { flex: 1; padding: 8px 0; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px;
    color: var(--text-main); cursor: pointer; }
.pb-seg button.on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pb-card { margin: 0 16px 12px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface);
    box-shadow: var(--shadow-card); color: var(--text-main); }
.bottom-sheet .pb-card, .bottom-sheet .pb-seg { margin-left: 0; margin-right: 0; }
.pb-card-head { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.pb-hint { font-size: 13px; line-height: 1.35; color: var(--text-muted); }
.pb-verified { color: var(--color-success); font-weight: 600; }
.pb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 16px 12px; }
.pb-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-card); min-width: 0; }
.pb-tile b { font-size: 22px; color: var(--text-main); overflow-wrap: anywhere; }
.pb-tile span { font-size: 13px; color: var(--text-muted); }
.pb-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 46px;
    padding: 0; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; font-size: 15px;
    color: var(--text-main); text-align: left; cursor: pointer; }
.pb-card > .pb-row:first-child { border-top: 0; }
.pb-row--accent { color: var(--tg-theme-link-color, var(--fallback-accent)); }
.pb-row-val { flex: none; color: var(--text-muted); white-space: nowrap; }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pb-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px;
    background: rgba(120, 120, 128, .12); color: var(--text-main); }
.pb-chip--dim { background: transparent; border: 1px dashed var(--border); color: var(--text-muted); }
.pb-switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; }
.pb-switch-title { font-size: 16px; font-weight: 600; }
.pb-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 16px 0; }
.pb-actions .btn { margin: 0; }

/* Чужой профиль (screens/market/ProfileSheet.tsx). */
.ps-head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-bottom: 4px; }
.ps-avatar { width: 64px; height: 64px; border-radius: 50%; font-size: 28px; }
.ps-name { font-size: 20px; font-weight: 700; color: var(--text-main); overflow-wrap: anywhere; }
.ps-self { margin-top: 4px; padding: 4px 10px; border-radius: 10px; font-size: 13px; background: var(--color-success-bg); color: var(--text-main); }
.ps-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ps-actions .btn { margin: 0; }
.ps-pro { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); }
.ps-pros .pb-card-head + .ps-pro { border-top: 0; }
.ps-pro-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; background: var(--color-success-bg); color: var(--color-success); }
.ps-quote { padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.pb-card-head + .ps-quote { border-top: 0; }
.ps-bio { font-size: 14px; line-height: 1.4; margin-bottom: 6px; overflow-wrap: anywhere; }

/* Титулы — как получить (screens/profile/TitlesSheet.tsx). */
.tt-current { margin: 0 0 6px; font-size: 14px; color: var(--text-main); text-align: center; }
.tt-list { margin-bottom: 4px; }
.tt-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 14px;
    border: 0; border-top: 1px solid var(--border); background: none; font: inherit; color: var(--text-main); text-align: left; }
.tt-row:first-child { border-top: 0; }
.tt-row:disabled { cursor: default; color: var(--text-main); }
.tt-row--dim .tt-main b, .tt-row--dim .tt-ico { opacity: .6; }
.tt-ico { font-size: 22px; text-align: center; }
.tt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-how { font-size: 13px; color: var(--text-muted); }
.tt-bar { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: rgba(120, 120, 128, .2); overflow: hidden; }
.tt-bar span { display: block; height: 100%; border-radius: 3px; background: var(--tg-theme-button-color, var(--fallback-accent)); }
.tt-state { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.tt-state--got { color: var(--color-success); font-weight: 700; }

/* Избранные исполнители (FavoritesSheet, экран после публикации). */
.fav-list { margin-bottom: 8px; }
.fav-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.fav-row:first-child { border-top: 0; }
.fav-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none;
    font: inherit; color: var(--text-main); text-align: left; cursor: pointer; }
div.fav-main { cursor: default; }
.fav-facts { font-size: 13px; color: var(--text-muted); }
.fav-remove { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 20px;
    color: var(--text-muted); cursor: pointer; }
.fav-sent { flex: none; font-size: 13px; color: var(--color-success); font-weight: 600; }

/* Карточка «Свободны» (screens/market/ExecCard.tsx, FB24 D3). */
.exec-card { padding-top: 0; overflow: hidden; }
.exec-card__band { display: flex; justify-content: space-between; gap: 8px; margin: 0 -20px 10px; padding: 8px 20px;
    font-size: 14px; font-weight: 600; background: var(--color-success-bg); color: var(--color-success); }
.exec-card__band--off { background: rgba(120, 120, 128, .1); color: var(--text-muted); font-weight: 500; }
.exec-card__who { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.exec-card__avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 19px; }
.exec-card__id { flex: 1; min-width: 0; }
.exec-card__id .card-header { margin-bottom: 2px; }
.exec-card__ver { color: var(--color-success); }
.exec-card__pros { display: flex; flex-direction: column; gap: 3px; font-size: 14px; margin-bottom: 4px; color: var(--text-main); }
.exec-card__pro-ico { color: var(--color-success); }

/* «Моя надёжность» (FB24 D6): уровни таблицей и шаги «как вырасти». */
.rel-levels { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--radius-lg); background: var(--surface); }
.rel-level { display: grid; grid-template-columns: 104px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px;
    color: var(--text-main); }
.rel-level b { font-size: 14px; }
.rel-level-range { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.rel-level--on { background: var(--color-success-bg); box-shadow: inset 0 0 0 2px var(--color-success); }
.rel-steps { margin: 0; padding-left: 22px; color: var(--text-main); }
.rel-steps li { margin-bottom: 8px; }
.rel-steps b { display: block; font-size: 15px; }
.rel-steps span { font-size: 13px; color: var(--text-muted); }
.rel-more { margin: 12px 0 0; padding-top: 0; padding-bottom: 0; }

/* Верификация (FB24 D8): что даёт и код на листке. */
.vf-list { margin-bottom: 8px; }
.vf-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--text-main); }
.vf-row:first-child { border-top: 0; }
.vf-grow { flex: 1; }
.vf-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; background: rgba(36, 129, 204, .14); color: var(--tg-theme-link-color, var(--fallback-accent)); }
.vf-ico--ok { border-radius: 8px; background: var(--color-success-bg); color: var(--color-success); }
.vf-code { margin: 8px 0 4px; padding: 12px 0; border-radius: 12px; text-align: center; font-size: 28px; font-weight: 700;
    letter-spacing: .18em; background: rgba(120, 120, 128, .1); font-variant-numeric: tabular-nums; }
