/* Аренда — демо-интерфейс в стиле Twenty CRM. Системный шрифт 13px, плотная сетка, мягкие теги.
   Светлая и тёмная темы (prefers-color-scheme + переключатель «Тема»). Без внешних шрифтов, без inline-стилей. */
:root {
  --bg: #f1f1f1; --panel: #ffffff; --panel-2: #fafafa; --hover: #f5f5f5; --active: #ebebeb;
  --border: #ebebeb; --border-2: #d6d6d6; --text: #333333; --text-2: #666666; --text-3: #999999; --text-4: #b3b3b3;
  --accent: #1961ed; --accent-2: #0e4fd1; --accent-bg: #ebf1fe; --accent-tx: #1961ed; --focus: #1961ed;
  --hint-bg: linear-gradient(135deg, #f3f6ff 0%, #f8f2ff 55%, #fff7ef 100%); --hint-border: #dcdffa;
  --note-bg: #fff8db; --note-border: #f2e2a0; --note-tx: #6b5200;
  --shadow: 0 2px 4px rgba(0,0,0,.04), 0 0 4px rgba(0,0,0,.08); --shadow-lg: 0 8px 28px rgba(0,0,0,.14), 0 0 1px rgba(0,0,0,.2);
  --radius: 4px; --radius-lg: 8px; --sidebar: 228px; --drawer: 540px;
  /* статусы на карте и в легенде */
  --st-occupied: #0ca30c; --st-debt: #d03b3b; --st-vacant: #2a78d6; --st-repair: #ec835a; --st-handover: #6250d6;
  /* «бейджи» старых экранов */
  --ok-bg: #e6f4ea; --ok-tx: #1d6b34; --warn-bg: #fff4d6; --warn-tx: #7a5200; --bad-bg: #fde8e8; --bad-tx: #b42318;
  --info-bg: #e8f0fe; --info-tx: #1d4fb8; --violet-bg: #efedfb; --violet-tx: #4a3bb0;
  /* мягкие цвета тегов (фон / текст) */
  --t-gray-bg: #f0f0f0; --t-gray: #555; --t-red-bg: #fde8e8; --t-red: #b42318; --t-orange-bg: #feeedf; --t-orange: #b5470d;
  --t-yellow-bg: #fdf3d0; --t-yellow: #8a5a00; --t-green-bg: #e3f5e8; --t-green: #18794e; --t-turquoise-bg: #ddf5f2; --t-turquoise: #0f766e;
  --t-sky-bg: #e0f2fe; --t-sky: #0369a1; --t-blue-bg: #e8eefd; --t-blue: #1d4fd8; --t-purple-bg: #f0eafd; --t-purple: #6d28d9; --t-pink-bg: #fce7f3; --t-pink: #be185d;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  font-size: 13px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414; --panel: #1b1b1b; --panel-2: #202020; --hover: #252525; --active: #2e2e2e;
    --border: #2b2b2b; --border-2: #3a3a3a; --text: #ebebeb; --text-2: #b3b3b3; --text-3: #8a8a8a; --text-4: #666;
    --accent: #5b8def; --accent-2: #7aa3f3; --accent-bg: #1f2b45; --accent-tx: #8fb1f5; --focus: #7aa3f3;
    --hint-bg: linear-gradient(135deg, #1d2236 0%, #241d33 55%, #2b231b 100%); --hint-border: #34385a;
    --note-bg: #3a3214; --note-border: #5a4c1a; --note-tx: #f1dc8e;
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 0 4px rgba(0,0,0,.4); --shadow-lg: 0 8px 28px rgba(0,0,0,.6), 0 0 1px rgba(255,255,255,.15);
    --ok-bg: #16301f; --ok-tx: #7fd49b; --warn-bg: #3a2e10; --warn-tx: #f2cd6a; --bad-bg: #3a1717; --bad-tx: #f59a92; --info-bg: #1b2a47; --info-tx: #9cbcf7; --violet-bg: #2a2447; --violet-tx: #b9adf5;
    --t-gray-bg: #2c2c2c; --t-gray: #c2c2c2; --t-red-bg: #3d1a1a; --t-red: #f79a90; --t-orange-bg: #3d2614; --t-orange: #f5b27a; --t-yellow-bg: #3a3012; --t-yellow: #f0cf6a;
    --t-green-bg: #163322; --t-green: #7dd89c; --t-turquoise-bg: #133330; --t-turquoise: #6fd8cc; --t-sky-bg: #12304a; --t-sky: #7cc4f5; --t-blue-bg: #1c2948; --t-blue: #95b4f7;
    --t-purple-bg: #2b2148; --t-purple: #c3a6fa; --t-pink-bg: #3c1a2e; --t-pink: #f59ac9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141414; --panel: #1b1b1b; --panel-2: #202020; --hover: #252525; --active: #2e2e2e;
  --border: #2b2b2b; --border-2: #3a3a3a; --text: #ebebeb; --text-2: #b3b3b3; --text-3: #8a8a8a; --text-4: #666;
  --accent: #5b8def; --accent-2: #7aa3f3; --accent-bg: #1f2b45; --accent-tx: #8fb1f5; --focus: #7aa3f3;
  --hint-bg: linear-gradient(135deg, #1d2236 0%, #241d33 55%, #2b231b 100%); --hint-border: #34385a;
  --note-bg: #3a3214; --note-border: #5a4c1a; --note-tx: #f1dc8e;
  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 0 4px rgba(0,0,0,.4); --shadow-lg: 0 8px 28px rgba(0,0,0,.6), 0 0 1px rgba(255,255,255,.15);
  --ok-bg: #16301f; --ok-tx: #7fd49b; --warn-bg: #3a2e10; --warn-tx: #f2cd6a; --bad-bg: #3a1717; --bad-tx: #f59a92; --info-bg: #1b2a47; --info-tx: #9cbcf7; --violet-bg: #2a2447; --violet-tx: #b9adf5;
  --t-gray-bg: #2c2c2c; --t-gray: #c2c2c2; --t-red-bg: #3d1a1a; --t-red: #f79a90; --t-orange-bg: #3d2614; --t-orange: #f5b27a; --t-yellow-bg: #3a3012; --t-yellow: #f0cf6a;
  --t-green-bg: #163322; --t-green: #7dd89c; --t-turquoise-bg: #133330; --t-turquoise: #6fd8cc; --t-sky-bg: #12304a; --t-sky: #7cc4f5; --t-blue-bg: #1c2948; --t-blue: #95b4f7;
  --t-purple-bg: #2b2148; --t-purple: #c3a6fa; --t-pink-bg: #3c1a2e; --t-pink: #f59ac9;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 13px; line-height: 1.45; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-tx); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 3px; }
button { font: inherit; color: inherit; }
kbd { font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; color: var(--text-3); background: var(--panel); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--panel); padding: .5rem 1rem; z-index: 4000; }
.skip-link:focus { left: .5rem; top: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { flex: none; vertical-align: -3px; }
.i.sm { width: 12px; height: 12px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.num, .tnum, .kpi .value, td.num, .dchip, .agg-v, .tab-n, .nav-count, .ib-fn, .pt-count, .vb-n { font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.bad-tx { color: var(--t-red); }
.ok-tx { color: var(--t-green); }
.mt { margin-top: 12px; }
.mt-s { margin-top: 8px; margin-bottom: 0; }
.flex { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.eyebrow { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 0 0 6px; }
.loading { padding: 3rem; text-align: center; color: var(--text-3); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-tx); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.link-like { color: var(--text-2); }

/* ---------- Каркас ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; overflow: hidden; }
body.drawer-open .app { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--drawer); }
.sidebar { padding: 10px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 8px 8px 8px 0; gap: 6px; }
body.drawer-open .main-col { padding-right: 4px; }
#main { flex: 1; min-height: 0; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
#main:focus { outline: none; }
.view { height: 100%; }
.index-page { display: flex; flex-direction: column; height: 100%; }
.index-page > .page-top, .view-bar, .filter-bar, .ix-header, .bulk-bar { flex: none; }
.index-page > *, .inbox-page > * { min-width: 0; }
.app-header { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.hd-sp { flex: 1; }
#hd-controls { display: flex; gap: 6px; }
.hd-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); cursor: pointer; color: var(--text-2); }
.hd-btn:hover { background: var(--hover); color: var(--text); }
.demo-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--t-yellow-bg); color: var(--t-yellow); border: 1px solid var(--note-border); white-space: nowrap; }
.demo-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.menu-btn { display: none; }
.fav-btn.on { color: #e9a600; }
.fav-btn.on svg { fill: currentColor; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1490; }
.backdrop[hidden] { display: none; }

/* Меню слева */
.ws { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 4px 6px 8px; }
.ws-logo { grid-row: span 2; width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #1961ed, #6d28d9); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ws-name { font-weight: 600; font-size: 14px; }
.ws-sub { font-size: 11px; color: var(--text-3); }
.whoami { display: flex; gap: 8px; align-items: center; padding: 8px; margin: 0 2px 6px; border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius-lg); }
.who-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who-t .eyebrow { margin: 0; }
.who-t strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border-radius: var(--radius); color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--active); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 600; }
.nav-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; line-height: 17px; min-width: 18px; text-align: center; }
.nav-sec { margin-top: 10px; }
.nav-sec-t { font-size: 11px; color: var(--text-3); padding: 2px 8px 4px; font-weight: 600; }
.nav-foot { margin-top: auto; padding: 10px 8px 2px; font-size: 11px; color: var(--text-3); display: grid; gap: 2px; }
.nav-foot .i { margin-right: 4px; }

/* Заголовок страницы */
.page-top { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 20; }
.page-top h1 { font-size: 14px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-icon { color: var(--text-2); display: inline-flex; }
.pt-count { color: var(--text-3); }
.pt-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.page.legacy { padding: 0 16px 32px; }
.page.legacy > .page-top, .page.legacy .page-top:first-child { margin: 0 -16px 12px; }
.page-sub { color: var(--text-3); margin: -4px 0 12px; }

/* ---------- Кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border-2); background: var(--panel); color: var(--text); border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12.5px; }
.btn.xs { height: 22px; padding: 0 6px; font-size: 12px; }
input[type="search"], input[type="text"], input[type="email"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 4px 8px; min-height: 28px; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* ---------- Теги, аватарки, чипы ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--radius); font-size: 12px; white-space: nowrap; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag .i { width: 12px; height: 12px; }
.t-gray { background: var(--t-gray-bg); color: var(--t-gray); } .t-red { background: var(--t-red-bg); color: var(--t-red); } .t-orange { background: var(--t-orange-bg); color: var(--t-orange); }
.t-yellow { background: var(--t-yellow-bg); color: var(--t-yellow); } .t-green { background: var(--t-green-bg); color: var(--t-green); } .t-turquoise { background: var(--t-turquoise-bg); color: var(--t-turquoise); }
.t-sky { background: var(--t-sky-bg); color: var(--t-sky); } .t-blue { background: var(--t-blue-bg); color: var(--t-blue); } .t-purple { background: var(--t-purple-bg); color: var(--t-purple); } .t-pink { background: var(--t-pink-bg); color: var(--t-pink); }
.av { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #fff; }
.av-person { border-radius: 50%; } .av-company { border-radius: 4px; }
.av-icon { border-radius: 4px; background: var(--t-gray-bg); color: var(--text-2); }
.av.xs { width: 16px; height: 16px; font-size: 8.5px; } .av.xs .i { width: 11px; height: 11px; }
.av.sm { width: 20px; height: 20px; } .av.sm .i { width: 13px; height: 13px; }
.av.md { width: 32px; height: 32px; font-size: 12px; }
.av.lg { width: 40px; height: 40px; font-size: 14px; } .av.lg .i { width: 22px; height: 22px; }
.h1 { background: #5e81f4; } .h2 { background: #2fb37a; } .h3 { background: #e8833a; } .h4 { background: #9b6bf2; } .h5 { background: #e15a8a; }
.h6 { background: #2aa5c0; } .h7 { background: #c99a10; } .h8 { background: #6c7a89; } .h9 { background: #d9534f; } .h10 { background: #3d9970; }
.rchip { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; height: 22px; padding: 0 6px 0 3px; border: 1px solid var(--border); background: var(--panel-2); border-radius: var(--radius); cursor: pointer; color: var(--text); vertical-align: middle; }
.rchip:hover { background: var(--active); }
.rchip-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.pcell-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcell-s { color: var(--text-3); font-size: 12px; }
.done-t { text-decoration: line-through; color: var(--text-3); }
.pcell-prog { display: inline-flex; align-items: center; gap: 6px; min-width: 110px; }
.pcell-prog.wide { min-width: 160px; }
.pbar { display: inline-block; flex: 1; min-width: 60px; height: 6px; border-radius: 3px; background: var(--active); overflow: hidden; vertical-align: middle; }
.pbar-fill { display: block; height: 100%; width: 0; border-radius: 3px; }
.pbar-fill.t-green { background: #2fb37a; } .pbar-fill.t-yellow { background: #e0a400; } .pbar-fill.t-red { background: #e5484d; } .pbar-fill.t-blue { background: var(--accent); } .pbar-fill.t-gray { background: #9a9a9a; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: #c58a00; font-weight: 600; }
.rating svg { fill: currentColor; width: 13px; height: 13px; }
.bool { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); }
.bool.yes { color: var(--t-green); }
.due-bad { color: var(--t-red); font-weight: 600; }
/* Моно-чипы дней до срока */
.dchip { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: var(--radius); font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; border: 1px solid transparent; }
.dchip .i { width: 12px; height: 12px; }
.dchip.red { background: var(--t-red-bg); color: var(--t-red); border-color: color-mix(in srgb, var(--t-red) 25%, transparent); }
.dchip.yellow { background: var(--t-yellow-bg); color: var(--t-yellow); border-color: color-mix(in srgb, var(--t-yellow) 25%, transparent); }
.dchip.green { background: var(--t-green-bg); color: var(--t-green); border-color: color-mix(in srgb, var(--t-green) 25%, transparent); }
/* Шаги стадий */
.steps-bar { list-style: none; display: flex; gap: 0; margin: 0 0 12px; padding: 0; overflow-x: auto; }
.steps-bar li { flex: 1 1 0; min-width: 76px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; text-align: center; font-size: 11px; color: var(--text-3); padding: 0 2px; }
.steps-bar li::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 2px; background: var(--border-2); z-index: 0; }
.steps-bar li:first-child::before { display: none; }
.st-dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px ui-monospace, Menlo, monospace; background: var(--panel); border: 2px solid var(--border-2); color: var(--text-3); }
.st-dot .i { width: 12px; height: 12px; }
.st-done { color: var(--text-2); } .st-done::before { background: #2fb37a !important; }
.st-done .st-dot { background: #2fb37a; border-color: #2fb37a; color: #fff; }
.st-current { color: var(--text); font-weight: 600; } .st-current::before { background: #2fb37a !important; }
.st-current .st-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-bg); }
.st-warn .st-dot { border-color: #e0a400; box-shadow: 0 0 0 3px var(--t-yellow-bg); }
.st-warn .st-l::after { content: " ⚠"; color: #c58a00; }
.st-l { line-height: 1.2; }

/* ---------- Тулбар представления ---------- */
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.vb-left, .vb-right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vb-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 0; background: none; border-radius: var(--radius); color: var(--text-2); cursor: pointer; }
.vb-btn:hover, .vb-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.vb-view { color: var(--text); font-weight: 600; }
.vb-n { color: var(--text-3); font-weight: 400; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); padding: 1px; background: var(--panel-2); margin-left: 6px; }
.seg-b { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 0; background: none; border-radius: 3px; cursor: pointer; color: var(--text-2); font-size: 12.5px; }
.seg-b[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.vb-search { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-3); }
.vb-search:focus-within { border-color: var(--accent); }
.vb-search input { border: 0; background: none; min-height: 0; padding: 0; width: 140px; box-shadow: none !important; }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.filter-bar[hidden] { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 2px 0 7px; border-radius: var(--radius); background: var(--accent-bg); color: var(--accent-tx); }
.fchip-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 3px; }
.fchip-x:hover { background: rgba(0,0,0,.08); }
.ix-header { padding: 12px 12px 0; }
.ix-header .kpis { margin-bottom: 12px; }
.ix-body { min-width: 0; flex: 1; min-height: 0; overflow: auto; }
.ix-body.mode-table { overflow: hidden; display: flex; flex-direction: column; }
.ix-body.mode-table .tbl-wrap { flex: 1; min-height: 0; }
.ix-body.mode-kanban { padding: 10px 12px; }
.hint-line { color: var(--text-3); font-size: 12px; margin: 8px 2px 0; display: flex; gap: 6px; align-items: center; }
.pad { padding: 12px; }
.bulk-bar { position: relative; margin: 6px auto; width: max-content; max-width: calc(100% - 20px); display: flex; gap: 8px; align-items: center; padding: 6px 8px 6px 12px; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 30; }
.bulk-bar[hidden] { display: none; }
.bulk-n { font-weight: 600; }

/* ---------- Таблица (сетка как в Twenty) ---------- */
.tbl-wrap { overflow: auto; }
.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.tbl th, .tbl td { height: 32px; padding: 0 8px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); white-space: nowrap; text-align: left; vertical-align: middle; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.tbl thead th { position: sticky; top: 0; z-index: 5; background: var(--panel); color: var(--text-3); font-weight: 500; padding: 0 4px; }
.tbl th.num, .tbl td.num { text-align: right; }
.th-b { display: flex; align-items: center; gap: 5px; width: 100%; height: 30px; padding: 0 4px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 3px; font-weight: 500; }
th.num .th-b { justify-content: flex-end; }
.th-b:hover { background: var(--hover); color: var(--text); }
.sort-ind { color: var(--accent-tx); font-weight: 700; }
.tbl .c-check { width: 34px; min-width: 34px; text-align: center; padding: 0; position: sticky; left: 0; z-index: 3; background: var(--panel); }
.tbl thead .c-check { z-index: 6; }
.tbl .c-primary { position: sticky; left: 34px; z-index: 2; background: var(--panel); min-width: 220px; max-width: 340px; }
.tbl thead .c-primary { z-index: 6; }
.tbl .c-fill { width: 100%; border-right: 0; }
.tbl input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; margin: 0; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td, .tbl tbody tr:hover .c-check, .tbl tbody tr:hover .c-primary { background: var(--hover); }
.tbl tbody tr.is-sel td { background: var(--accent-bg); }
.tbl tbody tr.is-open td { background: var(--accent-bg); }
.tbl tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tbl tr.row-bad .c-check { box-shadow: inset 3px 0 0 var(--st-debt); }
.tbl tr.row-warn .c-check { box-shadow: inset 3px 0 0 #e0a400; }
.tbl tr.overdue .pcell-t { color: var(--t-red); }
.tbl tfoot td { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--border); border-bottom: 0; z-index: 2; }
.tbl tfoot .c-check, .tbl tfoot .c-primary { z-index: 4; }
.agg { border: 0; background: none; width: 100%; height: 30px; color: var(--text-3); cursor: pointer; text-align: inherit; padding: 0 2px; border-radius: 3px; white-space: nowrap; }
td.num .agg { text-align: right; }
.agg:hover { background: var(--hover); }
.agg-ph { opacity: 0; transition: opacity .1s; }
.tbl tfoot:hover .agg-ph, .agg:focus-visible .agg-ph { opacity: 1; }
.agg-v { color: var(--text); font-weight: 600; }
.tbl tr.empty td { height: auto; cursor: default; white-space: normal; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; color: var(--text-3); text-align: center; }
.empty-state .i { width: 28px; height: 28px; }
.empty-state p { margin: 0; }
.empty-state.big { padding: 80px 20px; }

/* ---------- Канбан ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.kb-col { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px; min-height: 120px; }
.kb-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; }
.kb-n { color: var(--text-3); }
.kb-sum { margin-left: auto; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.kb-cards { display: grid; gap: 6px; min-height: 40px; border-radius: var(--radius); }
.kb-cards.drop-on { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-bg); }
.kb-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; cursor: pointer; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.kb-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.kb-card.dragging { opacity: .5; }
.kb-card.row-bad { box-shadow: inset 3px 0 0 var(--st-debt); }
.kb-t { margin-bottom: 6px; }
.kb-f { margin: 0; display: grid; gap: 3px; }
.kb-f div { display: flex; gap: 6px; align-items: center; min-width: 0; }
.kb-f dt { color: var(--text-4); display: inline-flex; }
.kb-f dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.kb-empty { color: var(--text-4); text-align: center; margin: 8px 0; font-size: 12px; }

/* ---------- Выпадающие меню ---------- */
.menu { position: fixed; z-index: 3500; min-width: 210px; max-width: 320px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 4px; }
.menu-h { font-size: 11px; color: var(--text-3); padding: 6px 8px 4px; font-weight: 600; }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu-scroll { max-height: 280px; overflow-y: auto; }
.menu-search { padding: 4px; }
.menu-search input { width: 100%; }
.menu-note { font-size: 11.5px; color: var(--text-3); margin: 4px 8px; }
.mi { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 28px; padding: 3px 8px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text); }
.mi:hover, .mi:focus-visible { background: var(--hover); outline: none; }
.mi[disabled] { opacity: .5; cursor: default; }
.mi .i { color: var(--text-3); }
.mi-l { flex: 1; min-width: 0; }
.mi-hint { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.mi-check { width: 14px; display: inline-flex; color: var(--accent); }
.mi-check .i { color: var(--accent); }
.mi-back { color: var(--text-2); font-weight: 600; }

/* ---------- Панель записи (side panel) ---------- */
.drawer { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 8px 8px 8px 4px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.drawer[hidden] { display: none; }
.dr-head { border-bottom: 1px solid var(--border); padding: 6px 12px 0; }
.dr-top { display: flex; align-items: center; gap: 6px; height: 32px; }
.dr-obj { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; }
.dr-spacer { flex: 1; }
.dr-title { display: flex; gap: 10px; align-items: center; padding: 8px 0 10px; }
.dr-tt { min-width: 0; }
.dr-tt h2 { font-size: 16px; margin: 0; line-height: 1.3; }
.dr-tt h2:focus { outline: none; }
.dr-sub { color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.dr-tabs { display: flex; gap: 2px; overflow-x: auto; margin: 0 -4px; }
.dr-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.dr-tabs [role="tab"]:hover { color: var(--text); }
.dr-tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.tab-n { background: var(--active); border-radius: 999px; padding: 0 5px; font-size: 11px; color: var(--text-2); }
.dr-body { flex: 1; overflow-y: auto; padding: 12px; }
.dr-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.dr-sec { margin-top: 16px; }
.dr-sec h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 0 0 8px; font-weight: 600; }
.fields { margin: 0; display: grid; gap: 1px; }
.field { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 28px; padding: 4px 4px; border-radius: var(--radius); }
.field:hover { background: var(--hover); }
.field dt { color: var(--text-3); display: flex; gap: 6px; align-items: center; min-height: 20px; }
.field dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 20px; }
.fields.compact .field { grid-template-columns: 100px minmax(0, 1fr); }
.rel-group { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.rel-l { color: var(--text-3); }
.rel-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
/* Вертикальная лента событий */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-i { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 6px 0; position: relative; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--border-2); color: var(--text-2); position: relative; z-index: 1; }
.tl-dot .i { width: 12px; height: 12px; }
.tl-i.tone-ok .tl-dot { border-color: #2fb37a; color: #2fb37a; }
.tl-i.tone-bad .tl-dot { border-color: #e5484d; color: #e5484d; }
.tl-i.future .tl-dot { border-style: dashed; }
.tl-t { overflow-wrap: anywhere; }
.tl-at { color: var(--text-3); font-size: 12px; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.inline-form input[type="text"], .inline-form input:not([type]) { flex: 1 1 200px; }
.note-form { display: grid; gap: 6px; margin-bottom: 12px; }
.note-form .btn { justify-self: start; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.task-i { display: grid; grid-template-columns: 18px 1fr; gap: 4px 8px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.task-i.overdue { border-color: color-mix(in srgb, var(--t-red) 35%, var(--border)); background: var(--t-red-bg); }
.task-i.done .task-t { text-decoration: line-through; color: var(--text-3); }
.task-m { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; align-items: center; }
.note-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.note-card.pinned { border-color: var(--note-border); background: color-mix(in srgb, var(--note-bg) 45%, var(--panel)); }
.note-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; }
.note-card footer { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.note-card.clickable { cursor: pointer; }
.note-card.clickable:hover { box-shadow: var(--shadow); }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding: 12px; align-items: start; }
.notes-grid .note-card { margin: 0; }
.rich p { margin: 0 0 4px; }
.rich ul { margin: 2px 0 4px; padding-left: 18px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.file-i { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.file-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; background: var(--active); }
.file-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; background: var(--t-red-bg); color: var(--t-red); }
.file-ico.k-image { background: var(--t-blue-bg); color: var(--t-blue); }
.file-n { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.file-meta { color: var(--text-3); font-size: 12px; }
.conv-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conv-mini-a { display: grid; gap: 3px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.conv-mini-a:hover { background: var(--hover); text-decoration: none; }
.create-form { display: grid; gap: 10px; align-content: start; }
.cf { display: grid; gap: 4px; }
.cf > span { color: var(--text-2); font-size: 12px; }
.cf-actions { display: flex; gap: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.gallery.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--active); display: block; }
.gallery figcaption { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
/* Карточка заявки */
.ticket-card { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; margin-bottom: 8px; }
.tk-main, .tk-tenant { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.tk-tenant { background: var(--panel-2); border-style: dashed; }
.tk-status { font-size: 14px; margin: 0 0 10px; }
.tk-status strong { font-size: 15px; }
.tk-prio { margin: 0 0 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-custom { margin-top: 8px; display: grid; gap: 6px; }
.tk-custom[hidden] { display: none; }
.tk-tv { font-size: 14px; margin: 0 0 4px; }
.tg-preview { font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #17212b; color: #e7eef5; border-radius: var(--radius-lg); padding: 10px 12px; white-space: pre-wrap; margin: 0; max-width: 460px; }

/* ---------- ИИ-подсказки ---------- */
.hints { margin: 0 0 12px; }
.hints-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.drawer .hints-grid, .ib-side .hints-grid { grid-template-columns: 1fr; }
.ai-hint { background: var(--hint-bg); border: 1px solid var(--hint-border); border-radius: var(--radius-lg); padding: 10px 12px; display: grid; gap: 6px; align-content: start; }
.hint-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hint-kind { font: 700 10.5px ui-monospace, Menlo, monospace; letter-spacing: .08em; padding: 2px 6px; border-radius: 3px; }
.hint-kind.fact { background: var(--t-green-bg); color: var(--t-green); }
.hint-kind.hyp { background: var(--t-yellow-bg); color: var(--t-yellow); }
.hint-ai { display: inline-flex; gap: 4px; align-items: center; color: var(--text-3); font-size: 11.5px; }
.hint-conf { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; width: 120px; font-size: 11.5px; color: var(--text-2); }
.hint-t { margin: 0; font-size: 13.5px; line-height: 1.35; }
.hint-x { margin: 0; color: var(--text-2); }
.hint-src { color: var(--text-2); font-size: 12px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hint-act { display: flex; gap: 6px; flex-wrap: wrap; }
.hint-disc { margin: 0; font-size: 11px; color: var(--text-3); }
.draft { background: var(--active); color: var(--text); border-radius: var(--radius); padding: 8px 10px; white-space: pre-wrap; font: 12.5px/1.5 system-ui, sans-serif; margin: 0; border: 1px solid var(--border-2); }
.draft[hidden] { display: none; }

/* ---------- Входящие ---------- */
.inbox-page { display: flex; flex-direction: column; height: 100%; }
.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); }
.ib-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.ib-filters { display: flex; gap: 2px; padding: 8px 8px 4px; flex-wrap: wrap; }
.ib-f { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; color: var(--text-2); font-size: 12.5px; }
.ib-f[aria-pressed="true"] { background: var(--active); color: var(--text); font-weight: 600; }
.ib-fn { color: var(--text-3); font-size: 11.5px; }
.ib-ch { display: flex; gap: 4px; padding: 2px 8px 6px; overflow-x: auto; scrollbar-width: thin; }
.chip-s { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); cursor: pointer; color: var(--text-2); white-space: nowrap; font-size: 12px; }
.chip-s span { display: none; }
.chip-s[data-ch="all"] { padding: 0 8px; }
.chip-s[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-tx); }
.chip-s[aria-pressed="true"] span { display: inline; }
.ib-search { margin: 0 8px 6px; border: 1px solid var(--border); }
.ib-search input { width: 100%; }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; border-top: 1px solid var(--border); }
.conv-i { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; }
.conv-i:hover { background: var(--hover); }
.conv-i.is-sel { background: var(--accent-bg); }
.conv-i.breached { box-shadow: inset 3px 0 0 #e5484d; }
.conv-b { display: grid; gap: 2px; min-width: 0; }
.conv-r1 { display: flex; justify-content: space-between; gap: 6px; }
.conv-n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-i.unread .conv-n { font-weight: 700; }
.conv-t { color: var(--text-3); font-size: 11.5px; flex: none; }
.conv-r2 { display: flex; gap: 6px; align-items: center; min-width: 0; }
.conv-c { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-r3 { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-i.unread .conv-r3 { color: var(--text); }
.conv-r4 { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.conv-r4:empty { display: none; }
.unread-n { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; text-align: center; padding: 0 5px; line-height: 18px; }
.ch-tag { height: 18px; padding: 0 5px; }
.ib-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.th-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.th-back { display: none; }
.th-tt { min-width: 0; flex: 1; }
.th-tt h2 { margin: 0; font-size: 14px; }
.th-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--text-2); margin-top: 2px; }
.th-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.th-sla { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.th-sla.bad strong { color: var(--t-red); }
.th-assign { display: inline-flex; gap: 4px; align-items: center; color: var(--text-3); }
.th-assign select { min-height: 26px; padding: 2px 6px; }
.msgs { list-style: none; margin: 0; padding: 14px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 80%; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; flex-direction: row-reverse; }
.bubble { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; min-width: 120px; }
.msg.in .bubble { border-bottom-left-radius: 3px; cursor: pointer; }
.msg.in.is-sel .bubble { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.msg.out .bubble { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 25%, transparent); border-bottom-right-radius: 3px; }
.b-author { font-size: 11.5px; color: var(--accent-tx); font-weight: 600; margin-bottom: 2px; }
.b-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.b-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; color: var(--text-3); font-size: 11px; margin-top: 4px; flex-wrap: wrap; }
.b-meta .ch-tag { height: 16px; }
.dl { display: inline-flex; color: var(--text-3); }
.dl.read { color: var(--accent); }
.demo-local { color: var(--t-yellow); }
.b-acts { display: none; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.msg.in:hover .b-acts, .msg.in.is-sel .b-acts, .msg.in .bubble:focus-within .b-acts { display: flex; }
.xs-btn { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border: 1px solid var(--border-2); background: var(--panel); border-radius: 3px; cursor: pointer; font-size: 11.5px; color: var(--text-2); }
.xs-btn:hover { color: var(--text); background: var(--hover); }
.msg.sys { align-self: center; max-width: 90%; color: var(--text-3); font-size: 12px; gap: 5px; align-items: center; text-align: center; }
.msg.note { align-self: stretch; max-width: 100%; display: block; background: var(--note-bg); border: 1px solid var(--note-border); border-radius: var(--radius-lg); padding: 7px 10px; color: var(--note-tx); }
.note-h { font-size: 11.5px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.note-t { white-space: pre-wrap; color: var(--text); }
.mention { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-tx); border-radius: 3px; padding: 0 2px; font-weight: 600; }
.msg.pending .bubble { background: var(--note-bg); border: 1px dashed #d9a400; }
.pend-h { font-size: 12px; color: var(--note-tx); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pend-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.atts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.att-img { margin: 0; }
.att-img img { width: 200px; height: 140px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; background: var(--active); }
.att-img figcaption { font-size: 11px; color: var(--text-3); }
.att-file { display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); font-size: 12px; }
.call-card { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.call-card.missed { color: var(--t-red); }
.transcript { width: 100%; margin-top: 4px; }
.transcript summary { cursor: pointer; color: var(--accent-tx); font-size: 12px; }
.transcript pre { white-space: pre-wrap; font: 12px/1.5 system-ui, sans-serif; background: var(--panel-2); border-radius: 4px; padding: 6px 8px; margin: 4px 0 0; color: var(--text); }
.composer { border-top: 1px solid var(--border); padding: 8px 12px 10px; display: grid; gap: 6px; background: var(--panel); }
.composer.mode-note textarea { background: var(--note-bg); border-color: var(--note-border); }
.cmp-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cmp-top .seg { margin-left: 0; }
.cmp-ch { display: inline-flex; gap: 5px; align-items: center; color: var(--text-3); }
.note-hint { color: var(--note-tx); display: inline-flex; gap: 4px; align-items: center; }
.cmp-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cmp-sep { width: 1px; height: 18px; background: var(--border-2); }
.cmp-sp { flex: 1; }
.cmp-note { margin: 0; }
.ib-side { border-left: 1px solid var(--border); overflow-y: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.side-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.side-h { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.side-h h3 { margin: 0; font-size: 14px; }
.ib-side .rel-group { grid-template-columns: 100px minmax(0, 1fr); }

/* ---------- Командная палитра ---------- */
.cmdk { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 3800; display: grid; justify-items: center; align-items: start; padding-top: 12vh; }
.cmdk[hidden] { display: none; }
.cmdk-box { width: min(640px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.cmdk-in input { flex: 1; border: 0; background: none; font-size: 15px; min-height: 28px; box-shadow: none !important; padding: 0; }
#cmdk-list { list-style: none; margin: 0; padding: 4px; max-height: 52vh; overflow-y: auto; }
.cmdk-g { font-size: 11px; color: var(--text-3); padding: 8px 8px 3px; font-weight: 600; }
.cmdk-i { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--radius); cursor: pointer; }
.cmdk-i[aria-selected="true"], .cmdk-i:hover { background: var(--hover); }
.cmdk-i .i { color: var(--text-3); }
.cmdk-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-s { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cmdk-empty { padding: 20px; text-align: center; color: var(--text-3); }
.cmdk-foot { display: flex; gap: 14px; padding: 6px 12px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 11.5px; }
.cmdk-foot kbd { margin-right: 2px; }

/* ---------- Тосты ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 6px; z-index: 3900; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: #1f1f1f; color: #fff; padding: 9px 12px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 12.5px; transition: opacity .4s, transform .4s; border-left: 3px solid #5b8def; }
.toast.ok { border-left-color: #2fb37a; } .toast.bad { border-left-color: #e5484d; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Главная, нет доступа, портал ---------- */
.home-hello { padding: 4px 0 12px; }
.home-hello h2 { margin: 0 0 2px; font-size: 20px; }
.home-hello p { margin: 0; }
.lr-list, .goal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.list-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; padding: 6px 6px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text); }
.list-row:hover { background: var(--hover); text-decoration: none; }
.lr-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lr-side { flex: none; display: inline-flex; gap: 6px; align-items: center; }
.lr-side.wide { width: 210px; }
.no-access { margin: 24px auto; max-width: 560px; border: 2px dashed var(--border-2); border-radius: var(--radius-lg); padding: 28px; text-align: center; color: var(--text-2); }
.no-access .i { width: 28px; height: 28px; color: var(--text-3); }
.no-access h2 { margin: 8px 0; font-size: 16px; color: var(--text); }
.portal-tickets { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pt-item { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 10px; }
.pt-item .tk-status { margin: 4px 0; font-size: 13px; }
.pt-item p { margin: 2px 0; }
.meter-form { display: grid; gap: 8px; }
.meter-form .btn { justify-self: start; }

/* ---------- «Классические» блоки (дашборд, коммунальные, энергия, приёмка, карточка) ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; min-width: 0; }
.card + .card { margin-top: 12px; }
.grid > .card + .card { margin-top: 0; }
.card h2 { font-size: 13.5px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 0 0 6px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; color: inherit; display: block; text-decoration: none; }
a.kpi:hover { border-color: var(--border-2); box-shadow: var(--shadow); text-decoration: none; }
.kpi .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.kpi .value { font-size: 20px; font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.kpi .hint { color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.kpi.bad .value { color: var(--t-red); } .kpi.warn .value { color: var(--t-yellow); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.dl dt { color: var(--text-3); } .dl dd { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 10px; }
.toolbar label { color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.chip { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--panel); border-radius: 999px; padding: 2px 10px; cursor: pointer; color: var(--text-2); min-height: 26px; }
.chip[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-tx); }
.chip .count { opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 0 6px; height: 20px; border-radius: var(--radius); white-space: nowrap; font-weight: 500; }
.badge.ok { background: var(--ok-bg); color: var(--ok-tx); } .badge.warn { background: var(--warn-bg); color: var(--warn-tx); } .badge.bad { background: var(--bad-bg); color: var(--bad-tx); }
.badge.info { background: var(--info-bg); color: var(--info-tx); } .badge.violet { background: var(--violet-bg); color: var(--violet-tx); } .badge.neutral { background: var(--t-gray-bg); color: var(--t-gray); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; border: 2px solid var(--panel); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dot.occupied { background: var(--st-occupied); } .dot.debt { background: var(--st-debt); } .dot.vacant { background: var(--st-vacant); } .dot.repair { background: var(--st-repair); } .dot.handover { background: var(--st-handover); }
.alert { border-radius: var(--radius-lg); padding: 8px 12px; border: 1px solid; margin-bottom: 10px; }
.alert.warn { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--note-border); }
.alert.bad { background: var(--bad-bg); color: var(--bad-tx); border-color: color-mix(in srgb, var(--bad-tx) 30%, transparent); }
.alert.info { background: var(--info-bg); color: var(--info-tx); border-color: color-mix(in srgb, var(--info-tx) 25%, transparent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.table-wrap th, .table-wrap td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap thead th { background: var(--panel-2); font-weight: 500; color: var(--text-3); white-space: nowrap; }
.table-wrap th.num, .table-wrap td.num { text-align: right; }
.table-wrap tbody tr:hover { background: var(--hover); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--st-debt); }
.table-wrap tr.row-warn td:first-child { box-shadow: inset 3px 0 0 #e0a400; }
.table-wrap tfoot td { font-weight: 650; background: var(--panel-2); }
caption { text-align: left; padding: 6px 8px; color: var(--text-3); font-size: 12px; caption-side: bottom; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover, .chart .pt:hover { opacity: .75; }
.chart .hit { fill: transparent; }
.chart .s1 { fill: var(--series-1); } .chart .s2 { fill: var(--series-2); } .chart .s3 { fill: var(--series-3); }
.chart .hit:focus-visible { outline: none; stroke: var(--focus); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin: 2px 0 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); } .sw.s3 { background: var(--series-3); }
details.table-view { margin-top: 6px; font-size: 12px; }
details.table-view summary { cursor: pointer; color: var(--accent-tx); }
.chart-tip { position: fixed; pointer-events: none; background: #1f1f1f; color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 4px; z-index: 3950; max-width: 260px; white-space: pre-line; }
.chart-tip[hidden] { display: none; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.calendar .month h3 { text-transform: capitalize; }
.calendar ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.calendar li { padding: 4px 0; border-bottom: 1px dashed var(--border); display: grid; grid-template-columns: 44px 1fr; gap: 6px; }
.calendar li .d { font-weight: 650; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* Карта */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; padding: 10px 12px; }
#map { height: calc(100vh - 190px); min-height: 420px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--active); }
.map-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0; }
.map-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.map-card h2 { font-size: 13px; margin: 0 0 6px; }
.map-legend { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.map-legend li { display: flex; gap: 6px; align-items: center; }
#map-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; max-height: 46vh; overflow-y: auto; }
.map-li { display: flex; gap: 6px; align-items: center; width: 100%; padding: 4px 6px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-li:hover { background: var(--hover); }
.popup h3 { margin: 0 0 3px; font-size: 13px; }
.popup p { margin: 2px 0; font-size: 12px; }
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }

/* Фото до/после */
.compare { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 6px 10px; align-items: start; }
.compare .head { font-weight: 600; color: var(--text-3); font-size: 12px; }
.compare figure { margin: 0; }
.compare img, .photo { width: 100%; height: auto; max-width: 320px; aspect-ratio: 32 / 22; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--active); display: block; }
.compare figcaption { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.compare .item-label { font-weight: 600; padding-top: 3px; }
.compare .damaged img { border: 2px solid var(--st-debt); }

/* Мобильный сценарий приёмки */
.phone-wrap { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 16px; align-items: start; }
.phone { border: 10px solid #1d1f24; border-radius: 34px; background: var(--panel); max-width: 380px; width: 100%; min-height: 680px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.phone-top { background: var(--accent); color: #fff; padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.ph-steps { padding: 10px 6px 0; }
.ph-steps .steps-bar { margin-bottom: 4px; }
.ph-steps .steps-bar li { min-width: 54px; font-size: 10px; }
.phone-body { padding: 12px; flex: 1; overflow-y: auto; max-height: 540px; }
.phone-foot { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; justify-content: space-between; }
.pick-list { display: grid; gap: 6px; }
.pick-list button { text-align: left; font: inherit; border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius-lg); padding: 8px 10px; cursor: pointer; color: var(--text); }
.pick-list button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-bg); }
.check-item { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 10px; margin-bottom: 8px; }
.check-item fieldset { border: 0; padding: 0; margin: 4px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.check-item legend { font-weight: 600; padding: 0; }
.sig-pad { width: 100%; height: 130px; border: 1px dashed var(--border-2); border-radius: 8px; background: #fafbfc; touch-action: none; display: block; }
.thumb-row { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.thumb-row img { width: 96px; height: 66px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.file-btn { position: relative; }
.file-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.act-paper { border: 1px solid var(--border); padding: 12px; font-size: 12px; background: #fff; color: #222; }
.act-paper h3 { text-align: center; }
.act-paper table { font-size: 11.5px; width: 100%; border-collapse: collapse; }
.act-paper th, .act-paper td { border: 1px solid #ccc; padding: 3px 5px; text-align: left; }
.sig-img { height: 50px; border-bottom: 1px solid #333; }
.home .grid-3 { align-items: start; }

/* ---------- Адаптив ---------- */
@media (max-width: 1400px) { :root { --drawer: 480px; } .inbox { grid-template-columns: 300px minmax(0, 1fr) 260px; } }
@media (max-width: 1180px) {
  body.drawer-open .app { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(var(--drawer), 100vw); margin: 0; border-radius: 0; z-index: 1600; box-shadow: var(--shadow-lg); }
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .ib-side { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 1fr; }
  #map { height: 60vh; }
  .phone-wrap { grid-template-columns: minmax(0, 1fr); }
  .ticket-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app, body.drawer-open .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; background: var(--bg); z-index: 1500; transform: translateX(-100%); transition: transform .2s; visibility: hidden; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; visibility: visible; }
  .menu-btn { display: inline-grid; }
  .main-col { padding: 6px; }
  #main { overflow: visible; }
  .app { overflow: visible; grid-template-rows: auto; }
  .view, .index-page, .inbox-page { height: auto; }
  .ix-body, .ix-body.mode-table { overflow: visible; display: block; }
  .tbl-wrap { overflow: visible; }
  .page-top { position: static; }
  .app-header { position: sticky; top: 0; z-index: 40; background: var(--bg); padding: 2px 0; }
  .demo-main { font-size: 10.5px; }
  .demo-main strong ~ * { display: none; }
  .hd-l { display: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .phone { border-width: 6px; border-radius: 24px; }
  .toolbar select, .toolbar label { max-width: 100%; min-width: 0; }
  .toolbar label { flex-wrap: wrap; }
  .view-bar { padding: 6px; }
  .vb-btn span:not(.visually-hidden):not(#vb-view-label):not(.vb-n) { display: none; }
  .seg-b span { display: none; }
  .vb-search input { width: 110px; }
  .compare { grid-template-columns: 1fr 1fr; }
  .compare .item-label { grid-column: 1 / -1; }
  .compare .head:first-child { display: none; }
  .field { grid-template-columns: 1fr; gap: 2px; }
  .rel-group { grid-template-columns: 1fr; gap: 2px; }
  .drawer { width: 100vw; }
  /* таблица → карточки */
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: auto; }
  .tbl thead, .tbl .c-fill, .tbl tfoot td:not(.c-primary) { display: none; }
  .tbl tfoot, .tbl tfoot tr { display: block; }
  .tbl tbody { padding: 8px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
  .tbl td { justify-items: start; }
  .tbl tbody tr { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 8px 8px; position: relative; background: var(--panel); }
  .tbl td { height: auto; border: 0; padding: 2px 0; max-width: none; white-space: normal; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; align-items: center; position: static; background: none !important; text-align: left !important; }
  .tbl td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; }
  .tbl td.c-primary { display: block; padding: 2px 28px 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; min-width: 0; max-width: none; }
  .tbl td.c-primary::before { content: none; }
  .tbl td.c-check { position: absolute; left: auto; right: 6px; top: 8px; width: auto; min-width: 0; display: block; padding: 0; }
  .tbl td.c-check::before { content: none; }
  .tbl tr.row-bad { box-shadow: inset 3px 0 0 var(--st-debt); }
  .tbl tr.row-warn { box-shadow: inset 3px 0 0 #e0a400; }
  .tbl tr.row-bad .c-check, .tbl tr.row-warn .c-check { box-shadow: none; }
  .tbl tr.empty td { display: block; }
  .tbl tr.empty td::before { content: none; }
  .tbl tfoot td.c-primary { border: 0; padding: 4px 12px 10px; margin: 0; }
  .kanban { grid-auto-columns: 82vw; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.show-thread .ib-list { display: none; }
  .inbox:not(.show-thread) .ib-thread { display: none; }
  .th-back { display: inline-grid; }
  .msg { max-width: 92%; }
  .ib-list { min-height: 70vh; }
  .ib-thread { min-height: 80vh; }
  .cmp-bar .btn span, .cmp-sep { display: none; }
  .hint-conf { width: 100%; margin-left: 0; }
  .lr-side.wide { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Печать (акт сверки, акт приёмки) ---------- */
@media print {
  .sidebar, .app-header, .no-print, .toolbar, .chips, .phone-top, .phone-foot, .ph-steps, .drawer, .page-top, .toasts { display: none !important; }
  .app { display: block; height: auto; }
  .main-col { padding: 0; }
  #main { border: 0; overflow: visible; }
  .card { border: 0; padding: 0; }
  .phone { border: 0; box-shadow: none; max-width: none; min-height: 0; }
  .phone-body { max-height: none; overflow: visible; }
  .phone-wrap { display: block; }
  .phone-wrap > :not(.phone) { display: none; }
  body.print-act main * { visibility: hidden; }
  body.print-act #act-paper, body.print-act #act-paper * { visibility: visible; }
  body.print-act #act-paper { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
}

/* Скрытые подписи (position:absolute) не должны «вылезать» из прокручиваемых контейнеров */
.kanban, .tbl-wrap, .table-wrap, .steps-bar, .ib-ch, .dr-tabs, .menu-scroll, .conv-list, .msgs, .dr-body, #cmdk-list, .kb-card, .bubble { position: relative; }
