@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/vendor/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/vendor/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/vendor/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/vendor/inter-700.woff2') format('woff2'); }

/* Нейтральная тема - переменные цветов */
:root {
  --bg: #f5f6f4; --surface: #ffffff; --surface-2: #f0f2ef; --border: #e2e5e0; --text: #1c2420; --muted: #66706a; --faint: #98a19b;
  --accent: #0f7a6c; --accent-soft: #e2f2ef; --accent-text: #ffffff;
  --risk: #c2410c; --risk-soft: #fdece4; --watch: #b7791f; --watch-soft: #fbf3e2; --ok: #2f7d4f; --ok-soft: #e7f4ec; --nodata: #8a938d; --nodata-soft: #eef0ee;
  --neg: #c2410c; --pos: #2f7d4f; --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 2px 10px rgba(20, 30, 25, .04); --radius: 12px;
}
:root[data-theme="dark"] {
  --bg: #111614; --surface: #19201d; --surface-2: #202825; --border: #2b3531; --text: #e6ece8; --muted: #9aa69f; --faint: #6e7a74;
  --accent: #3cc2ae; --accent-soft: #163a35; --accent-text: #0d1513;
  --risk: #f08a5d; --risk-soft: #3a2219; --watch: #e3b45a; --watch-soft: #33291a; --ok: #6cc690; --ok-soft: #1a3324; --nodata: #87918b; --nodata-soft: #242c29;
  --neg: #f08a5d; --pos: #6cc690; --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
[x-cloak] { display: none !important; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 22px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #e0a43b); display: grid; place-items: center; color: #fff; font-weight: 800; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.spacer { flex: 1; }
.meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.btn { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); } .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.small { padding: 3px 9px; font-size: 12px; } .btn[disabled] { opacity: .55; cursor: default; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 5px 10px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.seg button.on { background: var(--accent); color: var(--accent-text); }
svg.lucide { width: 16px; height: 16px; stroke-width: 2; }

main { padding: 18px 22px 60px; max-width: 2400px; margin: 0 auto; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }

/* карточки */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; text-align: left; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); } .card.on { border-color: var(--accent); background: var(--accent-soft); }
.card .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.card .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.card .s { font-size: 12px; color: var(--muted); }
.card.wide { grid-column: span 2; }
.others { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 6px; font-size: 12.5px; }
.other { display: flex; gap: 6px; align-items: baseline; cursor: pointer; padding: 1px 4px; border-radius: 6px; }
.other:hover, .other.on { background: var(--accent-soft); } .other span:first-child { color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocks .list, .blocks .fresh { max-height: 560px; overflow: auto; }
.card.risk .v { color: var(--risk); } .card.neg .v { color: var(--neg); }
.profiles { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.profiles b { color: var(--text); font-weight: 600; }

/* три блока */
.blocks { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 1200px) { .blocks { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--faint); margin: -6px 0 10px; }
.fresh { display: flex; flex-direction: column; gap: 8px; }
.fresh-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.fresh-item:hover { outline: 1px solid var(--accent); }
.fresh-item .txt { color: var(--muted); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fresh-item .when { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.list { display: flex; flex-direction: column; } .list-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); cursor: pointer; }
.list-row:last-child { border-bottom: 0; } .list-row:hover .nm { color: var(--accent); }
.nm { font-weight: 600; } .sub { font-size: 12px; color: var(--muted); }
.flag { padding: 9px 10px; border-radius: 10px; background: var(--risk-soft); border: 1px solid color-mix(in srgb, var(--risk) 30%, transparent); margin-bottom: 8px; cursor: pointer; }
.flag .t { color: var(--risk); font-weight: 600; font-size: 12.5px; }
.empty { color: var(--faint); font-size: 13px; padding: 6px 0; }

/* значки */
.score { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 700; padding: 2px 8px; border-radius: 7px; font-size: 13px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.score.neg { background: var(--risk-soft); color: var(--neg); } .score.mid { background: var(--watch-soft); color: var(--watch); }
.score small { font-weight: 500; opacity: .8; font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.risk { background: var(--risk-soft); color: var(--risk); } .pill.watch { background: var(--watch-soft); color: var(--watch); }
.pill.healthy { background: var(--ok-soft); color: var(--ok); } .pill.nodata { background: var(--nodata-soft); color: var(--nodata); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.ch { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.ch.airbnb { background: #fde8ea; color: #c13a4a; } .ch.booking { background: #e3ecfb; color: #1f4fa3; }
:root[data-theme="dark"] .ch.airbnb { background: #3a1e23; color: #f39aa6; } :root[data-theme="dark"] .ch.booking { background: #1b2840; color: #93b4f0; }

/* панель фильтров и таблица */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.input, .select { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.input.search { width: 260px; } .input.num { width: 70px; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; white-space: nowrap; z-index: 1; }
td { padding: 8px 10px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-score { font-weight: 600; } .cell-sub { font-size: 11.5px; color: var(--muted); } .shared { font-size: 10.5px; color: var(--accent); font-weight: 600; }
.neg-n { color: var(--neg); font-weight: 600; } .zero { color: var(--faint); }
/* 22.10-65: нет отзывов = большая зелёная 0, без прочерков */
.zero0 { color: var(--ok); font-weight: 700; font-size: 18px; }
.card .v.zero0, .pcard .v.zero0 { font-size: 26px; }

/* лента отзывов */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 12.5px; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); } .chip span { opacity: .65; margin-left: 3px; }
.summary { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 10px 14px; margin-bottom: 12px; }
.summary b { font-size: 18px; } .summary .lbl { color: var(--muted); font-size: 12px; margin-left: 4px; }
.rv { display: grid; grid-template-columns: 1fr 280px; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.rv.neg { border-left: 3px solid var(--neg); } .rv.flash { outline: 2px solid var(--accent); }
.rv-main { padding: 12px 16px; min-width: 0; }
.rv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.rv-head .nm { font-size: 14px; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rv-text { word-break: break-word; } .rv-text p span:last-child, .rv-text p[x-text] { white-space: pre-line; } .rv-text .lbl { font-weight: 600; color: var(--muted); font-size: 12px; }
.rv-text p { margin: 0 0 6px; } .rv-reply { margin-top: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }
.rv-side { background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid var(--border); }
.rv-side label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.rv-side .input, .rv-side .select, .rv-side textarea { width: 100%; }
textarea.input { resize: vertical; min-height: 54px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.links { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.log { font-size: 12px; color: var(--muted); max-height: 160px; overflow: auto; border-top: 1px dashed var(--border); padding-top: 6px; }
.more { display: flex; justify-content: center; padding: 10px; }
@media (max-width: 900px) { .rv { grid-template-columns: 1fr; } .rv-side { border-left: 0; border-top: 1px solid var(--border); } }

/* доска удалений */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .board { grid-template-columns: 1fr 1fr; } }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col h3 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 12.5px; }
.kcard .row { margin-top: 6px; } .kcard .input { padding: 4px 8px; font-size: 12px; }
.kfields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.kfields .full { grid-column: span 2; }

/* качество данных */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.qlist { max-height: 260px; overflow: auto; font-size: 12.5px; } .qlist div { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.ok { color: var(--ok); } .bad { color: var(--risk); }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 50; }

/* ===== 22.10-20: уровни здоровья, карточки площадок, плотная таблица ===== */
:root { --lv-healthy: #1f8a4c; --lv-healthy-bg: #dff3e6; --lv-good: #5d9c2f; --lv-good-bg: #eef6df; --lv-watch: #a87b0a; --lv-watch-bg: #fbf1cf;
  --lv-sick: #c0392b; --lv-sick-bg: #fbe1dc; --lv-few: #8a938d; --lv-few-bg: #eef0ee; }
:root[data-theme="dark"] { --lv-healthy: #62d08f; --lv-healthy-bg: #173523; --lv-good: #a9d46b; --lv-good-bg: #263319; --lv-watch: #ecc35b; --lv-watch-bg: #3a2f14;
  --lv-sick: #f2846f; --lv-sick-bg: #3d1d18; --lv-few: #8a938d; --lv-few-bg: #242c29; }
.lv-healthy { --c: var(--lv-healthy); --b: var(--lv-healthy-bg); } .lv-good { --c: var(--lv-good); --b: var(--lv-good-bg); }
.lv-watch { --c: var(--lv-watch); --b: var(--lv-watch-bg); } .lv-sick { --c: var(--lv-sick); --b: var(--lv-sick-bg); }
.lv-few, .lv-nodata { --c: var(--lv-few); --b: var(--lv-few-bg); }
.hpill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--c); background: var(--b); white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: middle; }
.flagmark { color: var(--lv-sick); font-weight: 700; font-size: 12px; margin-left: 6px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); margin: 0 0 8px 2px; }
.faint { color: var(--faint); }
.sick-v { color: var(--lv-sick); }

.cards.platforms { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pcard { display: flex; flex-direction: column; gap: 4px; }
.pcard .phead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.pcard .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.pcard.wide { grid-column: span 3; }
@media (max-width: 1100px) { .pcard.wide { grid-column: span 2; } }
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 3px 12px; margin-top: 4px; }
.acc { display: flex; align-items: baseline; gap: 6px; padding: 3px 6px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.acc:hover, .acc.on { background: var(--accent-soft); }
.acc .an { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch.expedia { background: #fff4d6; color: #8a6200; } .ch.tripcom { background: #e4eefc; color: #2457b5; } .ch.google { background: #e9f3ec; color: #2f7d4f; }
.ch.vrbo { background: #e6f0fb; color: #1d5fa8; } .ch.marriott { background: #f6e9ec; color: #8c2235; } .ch.agoda { background: #f2e9fb; color: #6b37a8; }
:root[data-theme="dark"] .ch.expedia { background: #3a3014; color: #f0cd6b; } :root[data-theme="dark"] .ch.tripcom { background: #1b2a45; color: #8fb3f2; }
:root[data-theme="dark"] .ch.google { background: #1a3324; color: #7fd09c; } :root[data-theme="dark"] .ch.vrbo { background: #182a40; color: #8dbcf0; }
:root[data-theme="dark"] .ch.marriott { background: #3a1c24; color: #f0a0b2; } :root[data-theme="dark"] .ch.agoda { background: #2c1d3d; color: #c9a3f0; }

table.grid { table-layout: fixed; width: 100%; }
table.grid col.c-health { width: 150px; } table.grid col.c-ch { width: 104px; }
table.grid td, table.grid th { padding: 5px 8px; }
table.grid th.ctr, table.grid td.ctr { text-align: center; }
table.grid td.obj .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.cellbox { display: inline-flex; flex-direction: column; align-items: center; min-width: 74px; padding: 3px 6px; border-radius: 8px;
  background: var(--b); color: var(--c); line-height: 1.15; border-left: 3px solid var(--c); }
.cellbox b { font-size: 13.5px; } .cellbox span { font-size: 10.5px; opacity: .8; } .cellbox em { font-size: 9.5px; font-style: normal; opacity: .85; }

.col.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcard[draggable="true"] { cursor: grab; }

/* ===== 22.10-22: окно выгрузки Excel, пусто в кластерах ===== */
.empty-big { padding: 40px; text-align: center; color: var(--muted); font-size: 15px; border: 1px dashed var(--border); border-radius: var(--radius); margin-top: 8px; }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 18, .45); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 14px; width: min(920px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.mgrid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; padding: 14px 18px; overflow: auto; }
@media (max-width: 760px) { .mgrid { grid-template-columns: 1fr; } }
.mblock h4 { margin: 12px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mblock h4:first-child { margin-top: 0; }
.chk { display: flex; align-items: center; gap: 7px; padding: 3px 0; cursor: pointer; font-size: 13px; }
.chk.off { opacity: .5; cursor: default; } .chk.ind { padding-left: 22px; } .chk.grp { margin-top: 4px; }
.pick { max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* ===== 22.10-1: вход, карточка отзыва, кабинет, срочные ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(360px, 100%); display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.login .brand { margin-bottom: 8px; } .login label { font-size: 12px; color: var(--muted); font-weight: 600; }
.userbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 99px; background: var(--lv-sick); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.pill.urgent { background: var(--lv-sick); color: #fff; } .chip-urgent { border-color: var(--lv-sick); color: var(--lv-sick); font-weight: 600; } .chip-urgent.on { background: var(--lv-sick); border-color: var(--lv-sick); color: #fff; }
.pill.status { background: var(--surface-2); color: var(--text); } .pill.status.g-active { background: var(--lv-watch-bg); color: var(--lv-watch); }
.pill.status.g-waiting { background: var(--accent-soft); color: var(--accent); } .pill.status.g-done { background: var(--lv-healthy-bg); color: var(--lv-healthy); }
.rv.due { outline: 2px solid var(--lv-sick); background: var(--lv-sick-bg); }
.rv-text.clamp { max-height: 7.5em; overflow: hidden; }
.private { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--lv-watch); background: var(--lv-watch-bg); border-radius: 6px; font-size: 12.5px; white-space: pre-line; }
.card-modal { width: min(1200px, 100%); }
.card-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; padding: 14px 18px; overflow: auto; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } }
.card-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cbox { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cbox h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; } .kv span { color: var(--muted); }
.warn { padding: 8px 10px; border-radius: 8px; background: var(--lv-sick-bg); color: var(--lv-sick); font-size: 13px; }
.hist { padding: 4px 0; font-size: 12.5px; border-bottom: 1px dashed var(--border); cursor: default; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.hist[\@click], .hist:hover { background: transparent; }
.ev { padding: 5px 0; border-bottom: 1px dashed var(--border); } .evc { white-space: pre-line; color: var(--text); margin-top: 2px; }
.card-modal .log { max-height: 320px; border-top: 0; }
.cab-sec { margin-bottom: 16px; } .cab-sec h3 { font-size: 14px; margin: 0 0 6px; display: flex; gap: 6px; align-items: center; }
.cab-list { display: flex; flex-direction: column; gap: 6px; }
.cab-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.cab-item:hover { border-color: var(--accent); } .cab-item.due { border-color: var(--lv-sick); background: var(--lv-sick-bg); } .cab-item.is-urgent { border-left: 3px solid var(--lv-sick); }
.rule { padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; margin-bottom: 8px; }
.draft { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }

/* кластеры (22.10-52): строка менеджера раскрывается списком объектов */
table.grid tbody tr.cl-row td { background: color-mix(in srgb, var(--surface-2) 85%, transparent); border-top: 2px solid var(--line, #d9dfdc); }
table.grid tbody tr.cl-row td.obj .nm { font-weight: 700; font-size: 14px; }
table.grid tbody tr.cl-kid td.obj { padding-left: 30px; }
table.grid tbody tr.cl-kid td { background: transparent; }
.cl-caret { display: inline-block; width: 16px; color: var(--muted, #6b746e); }
.cl-actions { margin-left: 8px; display: inline-flex; gap: 8px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent, #0f7a6c); cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }

/* раздел "Работа" (22.10-53): воронка из 12 колонок, как в amoCRM - горизонтальная прокрутка, цвет этапа сверху */
.board.wk-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 260px); grid-template-columns: none; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.wk-board .col { border-top: 4px solid var(--border); max-height: calc(100vh - 230px); overflow-y: auto; }
.wk-board .col.g-new { border-top-color: var(--accent); } .wk-board .col.g-active { border-top-color: var(--lv-watch); }
.wk-board .col.g-waiting { border-top-color: #5b7fd6; } .wk-board .col.g-done { border-top-color: var(--lv-healthy); }
.wk-board .col h3 { position: sticky; top: -10px; background: var(--surface-2); padding: 4px 0; z-index: 1; }
.wk-card { cursor: pointer; } .wk-card:hover { border-color: var(--accent); }
.wk-card.due { border-color: var(--lv-sick); background: var(--lv-sick-bg); box-shadow: 0 0 0 1px var(--lv-sick); }
.wk-card.is-urgent { border-left: 3px solid var(--lv-sick); }
.wk-card .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.wk-rem { margin-top: 6px; font-size: 12px; } .wk-rem.bad { font-weight: 700; }
.wk-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ava { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ava.none { background: var(--nodata-soft); color: var(--nodata); }
.live { color: var(--ok); }
.log.short { max-height: 140px; overflow-y: auto; }
.cab-summary { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin: 10px 0; }
.sum-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.sum-tile .n { font-size: 26px; font-weight: 700; } .sum-tile.bad { border-color: var(--lv-sick); background: var(--lv-sick-bg); }
.cab-moved { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--accent-soft); }
@media (max-width: 700px) { .cab-summary { grid-template-columns: 1fr 1fr; } }
.wk-board .col h3 { min-height: 36px; align-items: flex-start; gap: 6px; }
.stg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; } .stg-grid .kv .input { width: 110px; } .stg-grid .kv .input:not(.num) { width: 170px; }
.team-box { margin-bottom: 12px; } .team-table { width: 100%; table-layout: auto; margin: 6px 0; } .team-table td, .team-table th { padding: 5px 8px; }
/* 23.10-29: согласование возврата - строка запроса и ответ */
.refund { margin-top: 8px; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--border); background: var(--surface-2); font-size: 12.5px; }
.refund.rf-approved { border-left-color: var(--lv-healthy); background: var(--lv-healthy-bg); }
.refund.rf-declined { border-left-color: var(--lv-sick); background: var(--lv-sick-bg); }
.refund.rf-sent, .refund.rf-queued { border-left-color: var(--lv-watch); background: var(--lv-watch-bg); }
.refund.rf-cancelled { opacity: .6; }
.refund .icon-btn { flex: none; }

/* 24.10-15: пометка "показан оригинал", подпись к сводке */
.tr-note { margin: 4px 0 6px; font-style: italic; }
.team-table { min-width: 860px; } .team-table th { white-space: normal; vertical-align: bottom; line-height: 1.25; letter-spacing: 0; font-size: 10.5px; } .team-table th:first-child { width: 140px; }
.sum-note { flex-basis: 100%; white-space: normal; }

/* ===== 24.10-15: телефон и узкий экран ===== */
.qgrid { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.stg-grid { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.team-box { overflow-x: auto; }
@media (max-width: 1100px) {
  .top { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px; }
  .tabs { order: 10; width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .top .data-at { display: none; }
}
@media (max-width: 760px) {
  main { padding: 12px 10px 60px; }
  .top { padding: 8px 10px; }
  .brand { font-size: 14px; } .logo { width: 26px; height: 26px; border-radius: 8px; }
  .top .btn-label, .userbox .uname { display: none; }
  .top .btn { padding: 6px 8px; }
  .tab { padding: 7px 12px; }
  /* поля ввода 16px - iPhone не увеличивает страницу при нажатии */
  .input, .select, textarea.input { font-size: 16px; }
  .toolbar { gap: 6px; }
  .toolbar .select { flex: 1 1 150px; }
  .input.search { width: 100%; flex: 1 1 100%; }
  .toolbar .spacer { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 10px 12px; } .card .v, .pcard .v { font-size: 21px; }
  .card.wide, .pcard.wide { grid-column: 1 / -1; }
  .cards.platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounts { grid-template-columns: 1fr; }
  .blocks .list, .blocks .fresh { max-height: none; overflow: visible; }
  .more-btn { align-self: flex-start; margin-top: 6px; }
  table.grid col.c-health { width: 92px; } table.grid col.c-ch { width: 80px; }
  table.grid .hpill { padding: 2px 6px; font-size: 10.5px; } .cellbox { min-width: 60px; padding: 2px 4px; }
  table.grid td.obj .nm { white-space: normal; font-size: 12.5px; line-height: 1.25; }
  .fresh-item { grid-template-columns: auto 1fr; } .fresh-item .when { grid-column: 2; text-align: left; }
  .legend { gap: 4px 12px; }
  /* таблица рейтингов: прокрутка вбок, название объекта закреплено слева */
  table.grid td.obj, table.grid th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  table.grid th:first-child { z-index: 3; background: var(--surface-2); }
  .rv-main { padding: 10px 12px; } .rv-side { padding: 10px 12px; }
  .summary { gap: 10px 14px; }
  .board { grid-template-columns: 1fr; }
  .board.wk-board { grid-auto-columns: minmax(230px, 85vw); }
  .wk-board .col { max-height: none; }
  .modal-bg { padding: 0; }
  .modal { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .card-grid, .mgrid { padding: 10px; }
  .kv { flex-wrap: wrap; }
  .stg-grid .kv .input, .stg-grid .kv .input:not(.num) { width: 100%; }
  .kfields { grid-template-columns: 1fr; } .kfields .full { grid-column: auto; }
  .cab-moved { flex-direction: column; align-items: flex-start; }
  .toast { left: 10px; right: 10px; bottom: 10px; }
  .card-modal input[type="datetime-local"] { flex: 1 1 100%; }
}
