/* Madlen Space — оформление в фирменных цветах Madlen (оливковый и кремовый с логотипа) */
:root {
  /* светлая тема — своя, и браузер не должен «затемнять» её по-своему (Chrome на Android «Затемнять сайты», тёмные режимы
     других браузеров делали её грязно-тёмной — обращение № 13); у тёмной темы ниже — color-scheme: dark */
  color-scheme: only light;
  --olive: #7f8000;            /* фон логотипа */
  --olive-deep: #6f7000;       /* кнопки и ссылки: белый текст читается уверенно */
  --olive-dark: #575800;
  --olive-ink: #2e2f08;
  --cream: #f5e6c5;            /* знак и надпись логотипа */
  --cream-soft: #fbf6e9;
  --pistachio: #e3e8c4;
  --pistachio-soft: #f3f5e3;

  --bg: #f6f5ee;
  --panel: #ffffff;
  --ink: #25261a;
  --ink-2: #4e503e;
  --muted: #6f715e;
  --line: #e4e2d5;
  --line-2: #efeee4;
  --brand: var(--olive-deep);
  --brand-2: var(--olive-dark);
  --brand-soft: var(--pistachio-soft);
  --blue: #2b68ad;             /* «на рассмотрении» — статус, не фирменный цвет */
  --blue-soft: #e8f0fa;
  --ok: #1e8a52;
  --ok-soft: #e3f4ea;
  --warn: #a86400;
  --warn-soft: #fdf0d5;
  --bad: #c23b32;
  --bad-soft: #fce9e6;
  --info: #5b4bc4;
  --info-soft: #eeebfc;
  --side: #737400;
  --side-ink: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(46, 47, 8, .06), 0 4px 16px rgba(46, 47, 8, .05);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --tabbar-h: 60px;
  font-size: 14px;
  /* --- оттенки, которые раньше были записаны числами: теперь у каждого есть пара для тёмной темы --- */
  --field: #ffffff;            /* поля ввода */
  --soft: #faf9f3;             /* шапки таблиц, итоги */
  --soft-2: #fbfaf5;           /* едва заметная подложка: выходные, чат */
  --soft-3: #f1efe6;           /* плашки */
  --hover: #f7f8ec;            /* строка под курсором */
  --chip-bg: #eeede4;
  --chip-ink: #5f6152;
  --chip-ink-2: #8a8c7b;
  --done-soft: #dff3ec;
  --done-ink: #11724a;
  --line-strong: #d9d7c8;      /* рамки кнопок и полей */
  --line-hover: #cfd3a0;
  --brand-line: #e2e6c2;       /* рамки фирменных плашек */
  --brand-tint: #f8f9ea;
  --art: #b9bc8f;              /* рисунки пустых списков */
  --faint: #b9bba6;            /* самый бледный текст */
  --ok-ink: #155d36;
  --ok-line: #bfe5cd;
  --ok-fill: var(--ok);        /* заливка под белым текстом */
  --good-ink: #006300;
  --bad-ink: #8f251e;
  --bad-line: #f1c6c1;
  --bad-tint: #fdf3f1;
  --bad-fill: var(--bad);
  --warn-ink: #7a4a00;
  --warn-line: #f0d8a6;
  --warn-fill: var(--warn);
  --blue-line: #c9dbf2;
  --blue-tint: #f5f9fe;
  --blue-fill: var(--blue);
  --info-fill: var(--info);
  --accent-ink: var(--olive-deep);     /* ссылки и акцентный текст на светлом */
  --pistachio-ink: var(--olive-ink);   /* текст на фисташковой плашке */
  --login-bg: #fffdf8;
  --bg-glass: rgba(246, 245, 238, .93);
  --tint: rgba(0, 0, 0, .08);
  --series-fact: #2a78d6;
  --series-plan: #898781;
  --series-fcw: #c77700;
  --series-real: #b0457e;
  /* видеокомната: плитки участников тёмные в обеих темах — на них видео */
  --room-bg: #e9e8dd;
  --room-tile: #2b2c1e;
  --room-tile-ink: #f4f1e2;
  --room-cap: rgba(20, 21, 12, .62);
  --room-line: rgba(255, 255, 255, .24);
  --room-talk: #c9cc3c;        /* рамка говорящего */
  --room-off: #ff9c92;         /* выключенный микрофон на плитке */
  /* приветственный блок рабочего стола (переход цвета) и рамка поля, в котором стоит курсор */
  --hero-a: #8e8f10;
  --hero-b: #7f8000;
  --hero-c: #666700;
  --focus: rgba(127, 128, 0, .2);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.45;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 650; text-transform: uppercase;
     letter-spacing: .04em; color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
       stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre { white-space: pre-wrap; word-wrap: break-word; }
.m-only { display: none; }

/* ---------- каркас */
.layout { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 14px; position: sticky; top: 0;
        height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px;
        scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); padding: 2px 6px 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: 46px; flex: none; display: block; }
.wordmark { display: flex; flex-direction: column; font-family: var(--serif); line-height: 1; text-transform: uppercase; }
.wordmark b { font-weight: 600; font-size: 20px; letter-spacing: .16em; }
.wordmark i { font-style: normal; font-size: 10.5px; letter-spacing: .52em; margin-top: 6px; }
.side .new { margin: 0 2px 12px; justify-content: center; background: var(--cream); border-color: var(--cream);
             color: var(--olive-ink); font-weight: 650; padding: 10px 14px; }
.side .new:hover { background: #fff; border-color: #fff; }
.side .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--cream);
             padding: 14px 10px 6px; }
/* разделы меню сворачиваются: заголовок — кнопка со стрелкой; у свёрнутого раздела виден общий счётчик */
.side .sgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 10px 9px;
                          margin-top: 3px; border-radius: 9px; user-select: none; }
.side .sgroup > summary::-webkit-details-marker { display: none; }
.side .sgroup > summary:hover { background: rgba(255,255,255,.09); }
.side .sgroup > summary .gt { flex: 1; min-width: 0; }
.side .sgroup > summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
                                 transform: rotate(-45deg); opacity: .75; flex: none; margin: 0 3px 1px 0; transition: transform .15s; }
.side .sgroup[open] > summary::after { transform: rotate(45deg); margin-bottom: 3px; }
.side .sgroup .gcnt { background: var(--cream); color: var(--olive-ink); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
                      letter-spacing: 0; }
.side .sgroup .gcnt:empty, .side .sgroup[open] .gcnt { display: none; }
.side .sgroup a.item { margin-top: 3px; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
               color: var(--side-ink); font-weight: 500; }
.side a.item:hover { background: rgba(255,255,255,.13); text-decoration: none; }
.side a.item.active { background: rgba(0,0,0,.24); font-weight: 600; box-shadow: inset 3px 0 0 var(--cream); }
.side a.item .cnt { margin-left: auto; background: var(--cream); color: var(--olive-ink); font-size: 11px; font-weight: 700;
                    padding: 1px 7px; border-radius: 10px; }
.side a.item .cnt.grey { background: rgba(255,255,255,.24); color: #fff; }
.side .foot { margin-top: auto; padding: 12px 8px 0; font-size: 12px; color: rgba(255,255,255,.75); }
.side-user { display: none; }
.scrim, .tabbar, .top-brand { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex;
       align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.top form.search { flex: 1; max-width: 520px; position: relative; min-width: 0; }
.top form.search input { width: 100%; padding-left: 36px; background: var(--bg); border-color: transparent; }
.top form.search .ico { position: absolute; left: 11px; top: 50%; margin-top: -9px; color: var(--muted); }
.top .spacer { flex: 1; }
.bell { position: relative; color: var(--ink-2); display: grid; place-items: center; width: 38px; height: 38px;
        border-radius: 50%; }
.bell:hover { background: var(--bg); }
.bell .dot { position: absolute; top: 4px; right: 2px; background: var(--bad-fill); color: #fff; font-size: 10px;
             font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center;
             padding: 0 4px; }
.me { display: flex; align-items: center; gap: 10px; }
.me .who { line-height: 1.2; }
.me .who b { display: block; font-weight: 600; }
.me .who span { font-size: 12px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pistachio); color: var(--olive-dark);
          display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar:hover { text-decoration: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.content { padding: 24px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .grow { flex: 1; }

/* ---------- элементы */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); }
.card.pad { padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { margin: 0; }
.card-head .grow { flex: 1; }
.card-body { padding: 16px 20px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
       border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: inherit;
       font-weight: 550; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn .ico { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ok { background: var(--ok-fill); border-color: var(--ok-fill); color: #fff; }
.btn.ok:hover { filter: brightness(.93); }
.btn.bad { color: var(--bad); border-color: var(--bad-line); }
.btn.bad:hover { background: var(--bad-soft); }
.btn.warn { color: var(--warn); border-color: var(--warn-line); }
.btn.warn:hover { background: var(--warn-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input, select, textarea {
  font: inherit; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 8px 11px; background: var(--field); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--olive); box-shadow: 0 0 0 3px var(--focus); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
textarea { resize: vertical; min-height: 80px; }
input[type=checkbox] { width: auto; accent-color: var(--olive-deep); }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
label.f .req { color: var(--bad); }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- таблицы */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px;
             border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
table.t th a { color: inherit; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.link { cursor: pointer; }
table.t tbody tr.link:hover td { background: var(--hover); }
table.t tr.unseen td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.t tfoot td { font-weight: 650; border-top: 1px solid var(--line); background: var(--soft); }
.t-title { font-weight: 600; color: var(--ink); }
.t-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.table-wrap { overflow-x: auto; }
.card > .table-wrap:last-child { border-radius: 0 0 var(--radius) var(--radius); }
/* закреплённая строка заголовков (static/stickyhead.js): копия шапки таблицы под верхней панелью, пока таблица на экране */
.sticky-head { position: fixed; z-index: 9; overflow: hidden; background: var(--soft); pointer-events: auto;
               box-shadow: 0 3px 10px rgba(46,47,8,.12); border-bottom: 1px solid var(--line); }
.sticky-head table { margin: 0; table-layout: auto; border-collapse: collapse; }
.sticky-head th { cursor: default; }
.sticky-head th.tf-sortable { cursor: pointer; user-select: none; }
.sticky-head th.tf-sortable:hover { color: var(--ink); }
.sticky-head th.tf-asc::after { content: " ▲"; font-size: 10px; }      /* стрелки сортировки — как у таблиц с data-tf */
.sticky-head th.tf-desc::after { content: " ▼"; font-size: 10px; }
@media print { .sticky-head { display: none !important; } }

/* ---------- статусы */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px;
        font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.draft { background: var(--chip-bg); color: var(--chip-ink); }
.chip.in_review { background: var(--blue-soft); color: var(--blue); }
.chip.rework { background: var(--warn-soft); color: var(--warn); }
.chip.approved { background: var(--ok-soft); color: var(--ok); }
.chip.in_work { background: var(--info-soft); color: var(--info); }
.chip.done { background: var(--done-soft); color: var(--done-ink); }
.chip.rejected { background: var(--bad-soft); color: var(--bad); }
.chip.cancelled { background: var(--chip-bg); color: var(--chip-ink-2); text-decoration: line-through; }
.chip.high { background: var(--bad-soft); color: var(--bad); }
.chip.high::before { display: none; }
.chip.late { background: var(--bad-fill); color: #fff; }
.chip.late::before { display: none; }

.chip.pay-none { background: var(--chip-bg); color: var(--chip-ink); }
.chip.pay-partial { background: var(--warn-soft); color: var(--warn); }
.chip.pay-full { background: var(--ok-soft); color: var(--ok); }
.chip.pay-over { background: var(--bad-soft); color: var(--bad); }
/* вид подразделения в кадрах — как в PL: производство, кухня, зал, АУП точки, АУП */
.chip.k-prod { background: var(--info-soft); color: var(--info); }
.chip.k-kitchen { background: var(--done-soft); color: var(--done-ink); }
.chip.k-hall { background: var(--blue-soft); color: var(--blue); }
.chip.k-ttadm, .chip.k-tt, .chip.k-tttech { background: var(--ok-soft); color: var(--ok); }
.chip.k-aup { background: var(--chip-bg); color: var(--chip-ink); }
a.chip:hover { text-decoration: none; filter: brightness(.97); }
.payline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.payline .bar { flex: 1; min-width: 140px; }
.bar.big { height: 12px; border-radius: 6px; }
.bar i.partial { background: var(--warn); }
.bar i.full { background: var(--ok); }
.bar i.over { background: var(--bad); }
.copy { cursor: pointer; border-bottom: 1px dashed var(--accent-ink); color: var(--accent-ink); display: inline-flex;
        align-items: center; gap: 4px; }
.copy .ico { width: 13px; height: 13px; }
.copy.copied { color: var(--ok); border-color: var(--ok); }
.bad-text { color: var(--bad); font-weight: 600; }
code.inline { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }

/* ---------- сообщения */
.flash { padding: 11px 14px; border-radius: 9px; margin-bottom: 12px; font-weight: 500; border: 1px solid; }
.flash.ok { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.flash.error { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.flash.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }

/* ---------- главная */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: inherit; }
.stat:hover { text-decoration: none; border-color: var(--line-hover); }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.alert .v { color: var(--bad); }
.stat.warn .v { color: var(--warn); }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two > .card + .card, .stats > .card + .card { margin-top: 0; }   /* в сетке отступ задаёт gap */
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; color: var(--line-strong); margin-bottom: 6px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius);
          background: var(--pistachio); color: var(--pistachio-ink); margin-bottom: 16px; }

/* ---------- фильтры */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; padding: 14px 16px;
           border-bottom: 1px solid var(--line-2); }
.filters .extra { display: contents; }
.filters .fi { display: flex; flex-direction: column; gap: 4px; }
.filters .fi label { font-size: 11px; color: var(--muted); font-weight: 600; }
.filters input, .filters select { width: auto; min-width: 140px; padding: 7px 10px; }
.filters input[name=q] { min-width: 240px; }
.filters .more-btn { display: none; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 16px;
         border-top: 1px solid var(--line-2); }

/* ---------- карточка записки */
.memo-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.memo-head .grow { flex: 1; min-width: 300px; }
.memo-head .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; color: var(--muted); }
.memo-head h1 { font-size: 21px; }
.memo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
/* расходная часть — на всю ширину под формой и вложениями (обращение № 14, 27.11.2026) */
.memo-grid > .memo-lines { grid-column: 1 / -1; min-width: 0; }
.memo-grid > .memo-lines > .card { margin-bottom: 0; }
.section { margin-bottom: 18px; }
.section:last-child { margin-bottom: 0; }
.section .pre { font-size: 14.5px; }
.decision { border: 2px solid var(--olive); background: linear-gradient(0deg, var(--panel), var(--brand-tint)); }
.decision textarea { min-height: 64px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.person { display: flex; align-items: center; gap: 9px; }
.person b { font-weight: 600; display: block; line-height: 1.25; }
.person span { font-size: 12px; color: var(--muted); }

.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route .stage { position: relative; padding-left: 30px; padding-bottom: 14px; }
.route .stage::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.route .stage:last-child::before { display: none; }
.route .stage .no { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
                    background: var(--line); color: var(--ink-2); font-size: 11px; font-weight: 700;
                    display: grid; place-items: center; }
.route .stage.active .no { background: var(--blue-fill); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.route .stage.passed .no { background: var(--ok-fill); color: #fff; }
.route .stage.failed .no { background: var(--bad-fill); color: #fff; }
.route .stage .stitle { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
                        margin: 2px 0 6px; font-weight: 600; }
.ap { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-bottom: 6px; background: var(--panel); }
.ap.pending { border-color: var(--blue-line); background: var(--blue-tint); }
.ap.approved { border-color: var(--ok-line); }
.ap.rejected, .ap.rework { border-color: var(--bad-line); background: var(--bad-tint); }
.ap.skipped, .ap.waiting { opacity: .7; }
.ap .row { display: flex; gap: 8px; align-items: center; }
.ap .row .grow { flex: 1; min-width: 0; }
.ap .st { font-size: 12px; font-weight: 600; }
.ap.pending .st { color: var(--blue); }
.ap.approved .st { color: var(--ok); }
.ap.rejected .st, .ap.rework .st { color: var(--bad); }
.ap .cm { margin-top: 6px; font-size: 13px; background: var(--bg); border-radius: 6px; padding: 6px 9px; }
.ap .when { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
details.round { margin-top: 10px; }
details.round summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }

.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
        border-radius: 9px; }
.file .ext { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; font-size: 10px;
             font-weight: 800; text-transform: uppercase; background: var(--pistachio); color: var(--olive-dark); flex: none; }
.file .ext.pdf { background: var(--bad-soft); color: var(--bad); }
.file .ext.xls, .file .ext.xlsx, .file .ext.csv { background: var(--ok-soft); color: var(--ok); }
.file .ext.doc, .file .ext.docx { background: var(--blue-soft); color: var(--blue); }
.file .grow { flex: 1; min-width: 0; }
.file .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.drop { border: 2px dashed var(--line-strong); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted);
        transition: .15s; cursor: pointer; position: relative; display: block; }
.drop.over { border-color: var(--olive); background: var(--pistachio-soft); color: var(--olive-dark); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.picked { margin-top: 8px; display: grid; gap: 6px; }
.picked .pf { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.picked .pf select { width: auto; padding: 4px 8px; font-size: 12px; }

.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .body { flex: 1; background: var(--bg); border-radius: 0 10px 10px 10px; padding: 9px 12px; min-width: 0; }
.comment .body .h { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.comment .body .h b { color: var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 7px 0 7px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px;
                       border-radius: 50%; background: var(--line-strong); }
.timeline .d { font-size: 11.5px; color: var(--muted); }

/* ---------- форма записки */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: left; padding: 0 6px 6px; }
.lines td { padding: 3px; vertical-align: top; }
.lines input, .lines select { padding: 7px 8px; font-size: 13px; }
.lines .total td { padding-top: 10px; font-weight: 700; }
.route-preview { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.route-preview .rp { background: var(--pistachio); color: var(--olive-dark); padding: 4px 10px; border-radius: 16px; font-weight: 600; }
.route-preview .arr { color: var(--muted); }
/* «Согласующие по очереди» — автор сам выбирает, кто и в каком порядке согласует (memo_chain.py, static/chain.js) */
.chain-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.chain-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px;
             padding: 7px 8px 7px 10px; background: var(--panel); }
.chain-row.bad { border-color: var(--bad-line); background: var(--bad-tint); }
.chain-row .no { width: 24px; height: 24px; border-radius: 50%; background: var(--pistachio); color: var(--olive-dark);
                 font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.chain-row .grow { flex: 1; min-width: 0; }
.chain-row .grow b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.chain-btns { display: flex; gap: 2px; flex: none; }
.chain-btns .btn { min-width: 32px; justify-content: center; }
.chain-btns .btn[disabled] { opacity: .3; cursor: default; }
.chain-empty { margin: 0 0 10px; }
.chain-add { position: relative; }
.chain-pick { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 320px; overflow-y: auto;
              padding: 4px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
              box-shadow: 0 12px 30px rgba(46,47,8,.18); }
.chain-pick button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px;
                     border-radius: 7px; cursor: pointer; color: var(--ink); font: inherit; }
.chain-pick button:hover, .chain-pick button.on { background: var(--hover); }
.chain-pick > .small { padding: 7px 10px; }
.chain-err { margin: 10px 0 0; }
.chain-flow { margin: 0 0 6px; padding-left: 22px; font-size: 13.5px; font-weight: 600; }
.chain-flow li { margin: 2px 0; }
.chain-exec { margin: 0 0 8px; color: var(--muted); }
/* обязательные согласующие (memo_must.py): без кнопок, с пометкой «обязательно»; выбранный автором и обязательный —
   согласует в конце, на своём месте (пометка у строки) */
.chain-must { margin-top: 12px; }
.chain-must .hint { margin: 0 0 6px; }
.chain-row.must { background: var(--bg); border-style: dashed; }
.chain-row.must .no { background: var(--olive); color: #fff; }
.chain-row.must.bad { border-color: var(--bad-line); background: var(--bad-tint); }
.chain-row.dup { opacity: .75; }
.chain-dup { color: var(--olive-dark); }
.chip.must-chip { background: var(--pistachio); color: var(--olive-dark); flex: none; }
.chain-flow li.must { font-weight: 600; }
.chain-flow li.must .chip { font-size: 11px; padding: 1px 7px; vertical-align: 1px; }
.must-warn { color: var(--bad); margin-top: 4px; }
#mustRows { table-layout: fixed; min-width: 980px; }      /* «Маршруты» → правила: ширины столбцов как задано, на телефоне — прокрутка вбок */
/* платёжки 1С (pay_1c.py, 02.12.2026): реквизиты получателя под контрагентом в форме записки (static/payreq.js), строка
   реквизитов в карточке, черновик платёжки из 1С и кнопка «Открыть платёжку» у оплаты */
.pay-req { margin-top: 4px; font-size: 12.5px; }
.pay-req > summary { cursor: pointer; color: var(--muted); padding: 2px 0; user-select: none; }
.pay-req > summary:hover { color: var(--ink); }
.pay-req-sum { font-size: 11.5px; padding: 0 6px; border-radius: 8px; background: var(--bg); color: var(--ink-2, var(--muted)); }
.pay-req-sum.bad { background: var(--bad-tint); color: var(--bad); }
.pay-req-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; margin-top: 4px; }
.pay-req-grid label { display: block; font-size: 11.5px; color: var(--muted); min-width: 0; }
.pay-req-grid input { display: block; width: 100%; margin-top: 2px; }
.pay-req-bin, .pay-req-iik, .pay-req-bik { grid-column: 1 / -1; }
.pay-req input.bad { border-color: var(--bad); background: var(--bad-tint); }
.pay-req-err { color: var(--bad); margin-top: 4px; overflow-wrap: anywhere; }
.pay-req-hint { margin-top: 4px; white-space: normal; }
/* реквизиты в карточке записки (проверка 02.12.2026: в столбце «Контрагент» ИИК рвался, а таблица на ноутбуке уходила за
   край): на компьютере — отдельной строкой под строкой расхода, слева, без черты между ними; на телефоне — под контрагентом,
   длинный ИИК при нехватке места переносится внутри */
.pay-req-line { overflow-wrap: anywhere; }
table.t tr.pay-req-row td { padding-top: 0; text-align: left; }
table.t tr.has-req td { border-bottom: 0; }      /* строка расхода, под которой реквизиты (memo_view.html); не :has — медленно */
@media (max-width: 720px) {
  .pay-req-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }      /* БИК — половина, Кбе и КНП — по четверти */
  .pay-req-bik { grid-column: span 2; }
}
.pp-draft { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; padding: 9px 12px;
            border: 1px dashed var(--line-strong, var(--line)); border-radius: 10px; background: var(--bg); }
.pp-draft .grow { flex: 1 1 240px; min-width: 0; }
.chip.pp-draft-chip { background: var(--warn-soft, var(--pistachio)); color: var(--ink); flex: none; }
.pp-open { margin: 6px 0 2px; }
a.btn.pp-open { margin: 6px 0 0; }
/* статьи ДДС (dds_rec.py, static/ddsrec.js, 03.12.2026): в форме записки под полем статьи — «Рекомендуем: …» кнопкой; в
   карточке — «рекомендуемая статья: …» у строки, где статья другая, и «Изменить статью» финконтролю и администратору;
   в «Справочниках» — загрузка каталога владельца */
.dds-rec { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.dds-rec-btn { border: 1px dashed var(--olive); background: var(--pistachio-soft); color: var(--olive-dark); border-radius: 8px;
               padding: 3px 9px; margin-top: 2px; font: inherit; font-weight: 600; cursor: pointer; text-align: left;
               overflow-wrap: anywhere; }
.dds-rec-btn:hover:not(:disabled), .dds-rec-btn:focus-visible { background: var(--pistachio); }
.dds-rec-why { display: block; font-size: 11.5px; margin-top: 2px; }
@media (max-width: 860px) { .dds-rec-btn { padding: 7px 12px; } }      /* на телефоне — под палец */
/* автор печатает: прежняя подсказка гаснет на своём месте и не нажимается — не прячется, чтобы поле не прыгало */
.dds-rec.dds-rec-stale { opacity: .45; }
.dds-rec-btn:disabled { cursor: default; pointer-events: none; }
.dds-rec-wait { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }    /* «подсказки — через минуту» (429) */
.dds-mark { margin-top: 4px; font-size: 12px; color: var(--warn-ink); background: var(--warn-soft); border-radius: 8px;
            padding: 3px 8px; display: inline-block; overflow-wrap: anywhere; }
.dds-mark b { font-weight: 650; }
.dds-why { color: var(--muted); font-weight: 400; }
/* «Изменить статью» — окно правки, таблица записки не раздвигается; на компьютере — значок у статьи (слова — в title) */
.dds-edit-btn { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 12.5px; color: var(--muted);
                cursor: pointer; vertical-align: -2px; white-space: nowrap; }  /* перед значком — пробел: он переносится, а не расширяет столбец */
.dds-edit-btn .ico { width: 15px; height: 15px; }
.dds-edit-btn:hover, .dds-edit-btn:focus-visible { color: var(--ink); }
.dds-edit-t { display: none; }
.dds-mark.dds-mark-m { display: none; }           /* пометка в ячейке — только на телефоне; на компьютере — строкой под строкой */
.dds-mark-row .dds-mark { margin-top: 0; }
@media (max-width: 860px) {
  .dds-edit-t { display: inline; margin-left: 4px; text-decoration: underline; }
  .dds-mark.dds-mark-m { display: block; }
}
.dds-dlg .dds-mark { margin: 0 0 12px; }
.dds-dlg .df { flex-wrap: wrap; }                  /* три кнопки на телефоне — в две строки, а не за край окна */
.dds-dlg .df .dds-cancel { order: 1; }             /* «Сохранить» — первая в разметке (Enter), на экране — последняя */
.dds-dlg .df .dds-pick { order: 2; }
.dds-dlg .df .dds-save { order: 3; }
.dds-now { font-weight: 600; overflow-wrap: anywhere; }
.dds-load { display: grid; gap: 6px; margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px;
            background: var(--bg); }
.dds-load-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dds-load-form input[type=file] { flex: 1 1 200px; min-width: 0; font-size: 12.5px; }
.dds-load .hint { margin: 0; }
/* карточка записки: кто уже согласовал, у кого сейчас, кто следующий */
.queue-sum { display: grid; gap: 4px; margin: 0 0 12px; padding: 9px 11px; border-radius: 9px; background: var(--bg); font-size: 13px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg-glass); backdrop-filter: blur(6px);
                  padding: 14px 0; margin-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 10px;
                  align-items: center; z-index: 5; flex-wrap: wrap; }

/* ---------- модальное окно */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25);
         color: var(--ink); }
dialog::backdrop { background: rgba(46,47,8,.5); }
dialog .dh { padding: 16px 20px; border-bottom: 1px solid var(--line-2); font-weight: 650; font-size: 16px; }
dialog .db { padding: 16px 20px; }
dialog .df { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- вход */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
              background: var(--cream-soft) url(brand/pattern-light.svg) 0 0 / 300px; }
.login-wrap.single { grid-template-columns: 1fr; place-items: center; padding: 24px;
                     background: var(--olive) url(brand/pattern.svg) 0 0 / 300px; }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
               justify-content: center; gap: 30px; padding: 48px 32px; color: var(--cream);
               background: radial-gradient(1000px 700px at 28% 18%, #8e8f10 0%, var(--olive) 52%, #6a6b00 100%); }
.login-brand::before { content: ""; position: absolute; inset: 0 -300px -300px 0;
                       background: url(brand/pattern.svg) 0 0 / 300px; }
.login-brand > * { position: relative; }
.logo-anim { width: min(320px, 62%); height: auto; display: block; color: var(--cream); overflow: visible; }
.login-tag { font-family: var(--serif); font-size: 13px; letter-spacing: .34em; text-transform: uppercase; text-align: center; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login { width: min(400px, 100%); padding: 30px 30px 24px; border: 1px solid var(--line); background: var(--login-bg);
         box-shadow: 0 18px 50px rgba(46,47,8,.16); }
.login h1 { font-family: var(--serif); font-weight: 600; font-size: 25px; letter-spacing: .16em; text-transform: uppercase;
            text-align: center; color: var(--olive-dark); }
.login .sub { text-align: center; color: var(--muted); margin: 6px 0 20px; }
.demo-hint { text-align: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- приветствие на рабочем столе */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; margin-bottom: 18px;
        padding: 24px 28px; border-radius: 16px; color: #fff;
        background: radial-gradient(900px 420px at 12% 0%, var(--hero-a) 0%, var(--hero-b) 46%, var(--hero-c) 100%);
        box-shadow: 0 10px 30px rgba(87,88,0,.22); }
.hero::before { content: ""; position: absolute; inset: 0; background: url(brand/pattern.svg) 0 0 / 300px; }
.hero > * { position: relative; }
.hero-text { flex: 1; min-width: 0; }
.hero-date { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); }
.hero h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .01em; margin: 6px 0 4px; }
.hero-sub { margin: 0 0 16px; color: #fff; opacity: .95; font-size: 15px; }
.hero .btn { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.1); color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,.2); }
.hero .btn.hero-main { background: var(--cream); border-color: var(--cream); color: var(--olive-ink); font-weight: 650; }
.hero .btn.hero-main:hover { background: #fff; border-color: #fff; }
.hero-art { width: 236px; height: 150px; flex: none; fill: none; stroke: var(--cream); stroke-linecap: round;
            stroke-linejoin: round; opacity: .8; }
.crm-strip { display: flex; align-items: center; gap: 22px; padding: 14px 20px; margin-bottom: 18px; color: inherit; flex-wrap: wrap; }
.crm-strip:hover { text-decoration: none; border-color: var(--line-hover); box-shadow: 0 8px 24px rgba(46,47,8,.1); }
.crm-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--pistachio); color: var(--olive-dark);
           display: grid; place-items: center; flex: none; }
.crm-title { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; }
.crm-num { display: flex; flex-direction: column; line-height: 1.2; }
.crm-num b { font-size: 20px; font-variant-numeric: tabular-nums; }
.crm-num span { font-size: 12px; color: var(--muted); }
.crm-num.hot b { color: var(--bad); }
.crm-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-ink); }
.empty-art { width: 54px; height: 54px; fill: none; stroke: var(--art); stroke-width: 1; stroke-linecap: round;
             stroke-linejoin: round; display: block; margin: 0 auto 8px; }

/* ---------- отчёты */
.bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--olive); border-radius: 4px; }

.notif { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); color: inherit; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--hover); text-decoration: none; }
.notif.unread { background: var(--hover); }
.notif.unread .tx { font-weight: 600; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 7px; flex: none; }
.notif.unread .dot { background: var(--olive); }

@media (max-width: 1200px) {
  .memo-grid { grid-template-columns: minmax(0, 1fr); }
  .memo-grid > .memo-lines { order: 1; }            /* в одну колонку: форма → расходная часть → вложения */
  .memo-grid > .memo-side { order: 2; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }   /* minmax(0, …): широкая таблица внутри не растягивает страницу */
}

/* =====================================================================================
   Телефон и узкий планшет: меню выезжает слева, внизу панель быстрых кнопок,
   списки записок превращаются в карточки.
   ===================================================================================== */
@media (max-width: 860px) {
  :root { font-size: 15px; }
  .m-only { display: inline; }
  .m-only.m-block { display: block; }
  .d-only { display: none !important; }
  .layout { display: block; }

  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(304px, 86vw); height: auto; z-index: 60;
          transform: translateX(-104%); transition: transform .22s ease; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .nav-open .side { transform: none; box-shadow: 0 0 44px rgba(0,0,0,.4); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(46,47,8,.5); z-index: 55; opacity: 0;
           pointer-events: none; transition: opacity .2s; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .nav-open { overflow: hidden; }
  .side a.item { padding: 12px 10px; font-size: 15px; }
  .side-user { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 8px 0;
               border-top: 1px solid rgba(255,255,255,.25); }
  .side-user .grow { flex: 1; min-width: 0; line-height: 1.25; }
  .side-user b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user span { font-size: 12px; opacity: .85; }
  .side-user .btn { color: #fff; }
  .side-user .btn:hover { background: rgba(255,255,255,.15); }
  .side .foot { margin-top: 10px; }

  .top { height: 54px; padding: 0 12px; gap: 10px; }
  .top-brand { display: block; flex: none; }
  .top-brand img { width: 34px; height: 34px; display: block; border-radius: 8px; }
  .top .spacer, .me .who, .me form { display: none; }
  .top form.search { max-width: none; }

  .content { padding: 14px 12px calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom)); }
  h1 { font-size: 20px; }
  .page-head { gap: 10px; margin-bottom: 14px; }
  .page-head .grow { flex: 1 1 100%; }
  .card.pad { padding: 14px; }
  .card-head { padding: 12px 14px; flex-wrap: wrap; }
  .card-body { padding: 14px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g2 > *, .g3 > *, .g4 > * { grid-column: auto !important; }   /* «на две колонки» на телефоне не нужно */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 24px; }
  .notif { padding: 12px 14px; }

  /* поля и кнопки — под палец; 16px, чтобы iPhone не увеличивал страницу при вводе */
  input, select, textarea { font-size: 16px; padding: 10px 12px; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 8px 11px; }
  .btn.lg { padding: 13px 18px; }

  /* нижняя панель */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
            background: var(--panel); border-top: 1px solid var(--line); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
            padding: 0 4px env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(46,47,8,.07); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
            font: inherit; font-size: 10.5px; color: var(--muted); background: none; border: 0; padding: 0; position: relative;
            cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ico { width: 23px; height: 23px; }
  .tabbar .active { color: var(--accent-ink); font-weight: 650; }
  .tabbar .plus { width: 46px; height: 46px; border-radius: 50%; background: var(--olive); color: #fff; display: grid;
                  place-items: center; margin-top: -20px; box-shadow: 0 6px 16px rgba(87,88,0,.4); border: 3px solid var(--panel); }
  .tabbar .plus .ico { width: 24px; height: 24px; }
  .tabbar .badge { position: absolute; top: 6px; left: 50%; margin-left: 5px; background: var(--bad-fill); color: #fff;
                   font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid;
                   place-items: center; padding: 0 4px; }

  /* список записок -> карточки */
  table.t.memos thead { display: none; }
  table.t.memos, table.t.memos tbody { display: block; }
  table.t.memos tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 5px;
                     padding: 13px 14px; border-bottom: 1px solid var(--line-2); align-items: start; }
  table.t.memos tr:last-child { border-bottom: 0; }
  table.t.memos td { display: block; padding: 0; border: 0; min-width: 0; }
  table.t.memos tbody tr.link:hover td { background: none; }
  table.t.memos .c-num { grid-area: 1 / 1; font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
                         white-space: normal; }
  table.t.memos .c-status { grid-area: 1 / 2; text-align: right; }
  table.t.memos .c-status .t-sub { display: none; }
  table.t.memos .c-title { grid-area: 2 / 1 / 3 / 3; }
  table.t.memos .c-title .t-title { font-size: 15.5px; line-height: 1.3; }
  table.t.memos .c-author { grid-area: 3 / 1; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; }
  table.t.memos .c-author .t-sub, table.t.memos .c-org .t-sub { margin: 0; font-size: 12.5px; }
  table.t.memos .c-author .t-sub:not(:empty)::before, table.t.memos .c-org .t-sub:not(:empty)::before { content: "· "; }
  table.t.memos .c-sum { grid-area: 3 / 2; font-weight: 700; text-align: right; align-self: end; }
  table.t.memos .c-org { grid-area: 4 / 1 / 5 / 3; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
  table.t.memos .c-date { display: none; }

  /* таблицы «название — значение» */
  table.t.stack thead { display: none; }
  table.t.stack, table.t.stack tbody, table.t.stack tr { display: block; }
  table.t.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { display: flex; gap: 12px; justify-content: space-between; padding: 3px 0; border: 0;
                     text-align: right; white-space: normal; }
  table.t.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex: none; text-align: left; }
  table.t.stack td.hide-m, table.t.stack td:empty { display: none; }
  table.t.stack td.lead { display: block; text-align: left; font-weight: 600; }
  table.t.stack td.lead::before { display: none; }
  /* остальные широкие таблицы прокручиваются вбок */
  .table-wrap > table.t:not(.memos):not(.stack):not(.tlist) { min-width: 640px; }

  /* фильтры сворачиваются */
  .filters { padding: 12px; gap: 8px; }
  .filters .fi { flex: 1 1 140px; }
  .filters .fi.q { flex: 1 1 100%; }
  .filters input, .filters select, .filters input[name=q] { width: 100%; min-width: 0; }
  .filters .extra { display: none; }
  .filters.open .extra { display: contents; }
  .filters .more-btn { display: inline-flex; }

  /* карточка записки */
  .memo-head { margin-bottom: 14px; gap: 12px; }
  .memo-head .grow { min-width: 0; flex-basis: 100%; }
  .memo-head h1 { font-size: 19px; }
  .memo-head .btns { width: 100%; }
  .memo-head .btns .btn.primary, .memo-head .btns .btn.ok { flex: 1 1 auto; justify-content: center; }
  .decision .btns .btn.ok { flex: 1 1 100%; justify-content: center; }
  .decision .btns .btn.warn, .decision .btns .btn.bad { flex: 1 1 0; justify-content: center; }
  .decision .btns .grow { display: none; }
  .kv { grid-template-columns: 104px 1fr; }
  .payline .num { flex-basis: 100%; }
  dialog .df .btn { flex: 1; justify-content: center; }

  /* форма: строки расходной части — карточками */
  .lines thead { display: none; }
  .lines, .lines tbody, .lines tfoot { display: block; }
  .lines tr.line { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; border: 1px solid var(--line);
                   border-radius: 10px; margin-bottom: 10px; background: var(--soft-2); }
  .lines tr.line td { display: block; padding: 0; min-width: 0; }
  .lines tr.line td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600;
                                          color: var(--ink-2); margin-bottom: 4px; }
  .lines tr.line td.wide { grid-column: 1 / -1; }
  .lines tr.line td.del-cell { grid-column: 1 / -1; text-align: right; }
  .lines input, .lines select { font-size: 16px; padding: 10px 12px; }
  .lines tr.total { display: flex; justify-content: space-between; padding: 4px 2px 0; font-size: 16px; }
  .lines tr.total td { padding: 0; }
  .lines tr.total td:last-child { display: none; }
  .sticky-actions { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 10px 0; }
  .sticky-actions { flex-wrap: nowrap; }
  .sticky-actions .btn { flex: 1 1 0; justify-content: center; padding-left: 10px; padding-right: 10px; }
  .sticky-actions .btn.send { flex: 1.5 1 0; }

  .login-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 34px 20px 26px; gap: 18px; }
  .logo-anim { width: min(200px, 48vw); }
  .login-tag { font-size: 11px; letter-spacing: .26em; }
  .login-side { align-items: flex-start; padding: 22px 16px 28px; }
  .login { padding: 24px 22px 20px; }

  .hero { padding: 18px 16px; border-radius: 14px; margin-bottom: 14px; }
  .hero h1 { font-size: 24px; }
  .hero-sub { font-size: 14px; margin-bottom: 12px; }
  .hero-art { position: absolute; right: -34px; bottom: -22px; width: 190px; height: 121px; opacity: .28; }
  .hero .btn.hero-main { display: none; }   /* на телефоне создаёт записку круглая кнопка «+» внизу */
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .tabbar a, .tabbar button { font-size: 10px; }
}

/* =====================================================================================
   Задачи: роли и виды, метки сроков, доска «Сроки», календарь, карточка с чатом.
   ===================================================================================== */
.tasks-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 20px; color: var(--ink-2);
       font-weight: 550; border: 1px solid transparent; white-space: nowrap; }
.tab:hover { background: var(--panel); text-decoration: none; border-color: var(--line); }
.tab.on { background: var(--olive-deep); color: #fff; }
.tab b { font-size: 11px; background: var(--tint); padding: 1px 7px; border-radius: 10px; }
.tab.on b { background: rgba(255,255,255,.25); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 7px; color: var(--ink-2);
         font-weight: 550; white-space: nowrap; }
.seg a:hover { background: var(--bg); text-decoration: none; }
.seg a.on { background: var(--pistachio); color: var(--pistachio-ink); }
.seg .ico { width: 15px; height: 15px; }
.alerts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.alert { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; font-weight: 550; border: 1px solid; }
.alert:hover { text-decoration: none; filter: brightness(.98); }
.alert .ico { width: 15px; height: 15px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.alert.info { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }

.quick-add { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); color: var(--muted); }
.quick-add input, .quick-add input:focus { border: 0; background: transparent; padding: 6px 0; box-shadow: none; }

.due { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
       white-space: nowrap; background: var(--chip-bg); color: var(--chip-ink); }
.due.late { background: var(--bad-fill); color: #fff; }
.due.today { background: var(--warn-soft); color: var(--warn); }
.due.soon { background: var(--blue-soft); color: var(--blue); }
.due.ok { background: var(--pistachio); color: var(--olive-dark); }
.due.done { background: var(--done-soft); color: var(--done-ink); }
.chip.t-new { background: var(--chip-bg); color: var(--chip-ink); }
.chip.t-in_progress { background: var(--blue-soft); color: var(--blue); }
.chip.t-review { background: var(--warn-soft); color: var(--warn); }
.chip.t-done { background: var(--done-soft); color: var(--done-ink); }
.chip.t-deferred { background: var(--info-soft); color: var(--info); }
.chip .ico { width: 12px; height: 12px; }
.who { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.marks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.mark .ico { width: 13px; height: 13px; }
.mark.new { color: #fff; background: var(--bad-fill); padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.proj { font-size: 12px; background: var(--pistachio-soft); color: var(--olive-dark); padding: 1px 8px; border-radius: 10px;
        border: 1px solid var(--brand-line); white-space: nowrap; }
.ico.fire { color: #e2572b; fill: #fbd1bf; width: 15px; height: 15px; }
table.tlist a.t-title { color: var(--ink); }
table.tlist tr.closed .t-title { color: var(--muted); text-decoration: line-through; }

/* доска «Сроки» */
.board-hint { margin: -4px 0 10px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px;
         align-items: start; }
.bcol { background: var(--line-2); border-radius: 12px; padding: 10px; min-height: 130px; border: 2px solid transparent; }
.bcol header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 13px; }
.bcol header .n { margin-left: auto; background: var(--panel); border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.bcol.late header b { color: var(--bad); }
.bcol.over { border-color: var(--olive); background: var(--pistachio-soft); }
.bcards { display: grid; gap: 8px; }
.bcard { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: inherit;
         box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.bcard:hover { text-decoration: none; border-color: var(--line-hover); transform: translateY(-1px); }
.bcard[draggable=true] { cursor: grab; }
.bcard.dragging { opacity: .45; }
.bcard.imp { border-left: 3px solid #e2572b; }
.bt { font-weight: 600; line-height: 1.3; margin-bottom: 7px; overflow-wrap: anywhere; }
.bm { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bempty { text-align: center; color: var(--faint); padding: 14px 0; }

/* канбан (обращение № 22, 01.12.2026): колонки по состоянию задачи, на карточке — кнопки тех же действий, что в задаче;
   нажатие на саму карточку открывает задачу (ссылка названия растянута на всю карточку, кнопки — поверх неё) */
.kb-hint { margin: 12px 2px 10px; }
.kb { grid-template-columns: repeat(4, minmax(220px, 1fr)); }       /* четыре колонки помещаются и на экране 1280 */
.kb-card { position: relative; }
.kb-card a.bt { display: block; color: var(--ink); }
.kb-card a.bt:hover { text-decoration: none; }
.kb-card a.bt::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.kb-card .bf .avatar { position: relative; z-index: 1; }
.kb-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-top: 9px;
           border-top: 1px dashed var(--line); }
.kb-acts form { display: contents; }
/* длинная подпись («Готово — на проверку КДП») переносится внутри кнопки, а не раздвигает карточку, стопку «Табели» и
   колонку: на экране 1280 и на телефоне 320 стопка вылезала за край колонки (проверка 01.12.2026) */
.kb-acts .btn { padding: 4px 9px; font-size: 12.5px; gap: 5px; white-space: normal; text-align: left; }
.kb .bcards > * { min-width: 0; }
.kb-acts .btn .ico { width: 13px; height: 13px; }
.kb .bcol header { flex-wrap: wrap; row-gap: 6px; }      /* «просрочено» — второй строкой шапки, под названием */
.bcol header .kb-late { flex-basis: 100%; }
.bcol header .kb-late span { font-size: 11.5px; font-weight: 700; color: var(--bad); background: var(--bad-soft); border-radius: 10px;
                             padding: 1px 8px; white-space: nowrap; }
.kb-note { font-size: 12px; color: var(--muted); padding: 0 4px 10px; margin-top: -4px; }
.kb-more { display: block; text-align: center; font-size: 12.5px; padding: 4px 0; }
.kb-stack { background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 10px; }
.kb-stack > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 11px;
                      font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kb-stack > summary::-webkit-details-marker { display: none; }
.kb-stack > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--muted);
                              border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
.kb-stack[open] > summary::before { transform: rotate(45deg); }
.kb-stack > .bcards { padding: 0 8px 8px; }
/* группы задач по проектам (Илья, 02.12.2026: «задачи забиты табелями»): в списке и на канбане у проекта своя шапка —
   сколько задач и сколько просрочено; «Табели» свёрнута; «чипы» проектов над списком и доской */
.kb-grp { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.kb-grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 9px 11px;
                    font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kb-grp > summary::-webkit-details-marker { display: none; }
.kb-grp > summary::before { content: ""; width: 6px; height: 6px; margin-right: 2px; border-right: 2px solid var(--muted);
                            border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
.kb-grp[open] > summary::before { transform: rotate(45deg); }
.kb-grp > .bcards { padding: 0 8px 8px; }
.kb-grp-name { overflow-wrap: anywhere; }
.kb-grp-late, .tgrp-late { font-size: 11.5px; font-weight: 700; color: var(--bad); background: var(--bad-soft); border-radius: 10px;
                           padding: 1px 8px; white-space: nowrap; }
.kb-stack > summary { flex-wrap: wrap; row-gap: 4px; }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 16px; border: 1px solid var(--line);
         background: var(--panel); color: var(--ink-2); font-size: 13px; font-weight: 550; white-space: nowrap; }
.tchip:hover { text-decoration: none; border-color: var(--line-hover); background: var(--pistachio-soft); }
.tchip b { font-size: 11px; background: var(--tint); padding: 0 7px; border-radius: 10px; }
.tchip.on { background: var(--olive-deep); border-color: var(--olive-deep); color: #fff; }
.tchip.on b { background: rgba(255,255,255,.25); }
/* список: одна таблица, у группы — строка-шапка с кнопкой «свернуть» (её задачи — свой tbody) */
table.t.tlist tbody[hidden] { display: none; }
table.t.tlist tr.tgrp-row td { background: var(--soft); padding: 8px 14px; border-top: 1px solid var(--line-2); }
table.t.tlist tbody.tgrp-sheets tr.tgrp-row td { background: var(--panel); border-bottom: 1px dashed var(--line-strong); }
/* шапка группы — в первой ячейке, но ширину столбца «Название» не задаёт: её содержимое — в блоке нулевой ширины и
   выходит на соседние (пустые) ячейки строки-шапки. Иначе длинная шапка («Табели 47 · просрочено 47 · на этой
   странице — 33») раздвигала «Название», и «Статус» уходил за правый край уже на экранах ~1500 px */
table.t.tlist td.tgrp-cell { white-space: nowrap; }
.tgrp-in { width: 0; overflow: visible; white-space: nowrap; }
.tgrp-toggle { display: inline-flex; align-items: center; gap: 6px 10px; padding: 2px 0; border: 0; background: none; font: inherit;
               font-size: 14px; color: var(--ink); cursor: pointer; text-align: left;
               width: max-content; max-width: 80vw; flex-wrap: wrap; white-space: normal; }
.tgrp-toggle b { overflow-wrap: anywhere; }
.tgrp-toggle .n, .tgrp-toggle .muted { white-space: nowrap; }
.tgrp-toggle::before { content: ""; width: 7px; height: 7px; margin-right: 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
                       transform: rotate(-45deg); transition: transform .15s ease; }
.tgrp-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.tgrp-toggle .n { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 12px;
                  font-weight: 700; color: var(--ink-2); }
.alert .alert-text { min-width: 0; }      /* «Просрочено у меня: N, из них табели — M» — одним текстом: на телефоне переносится по словам */

/* календарь */
.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.cal-head h2 { margin: 0 6px; min-width: 150px; text-align: center; font-family: var(--serif); font-size: 20px; }
.cal-head .grow { flex: 1; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
           display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.weekend { background: var(--soft-2); }
.cal-day.other { background: var(--soft); }
.cal-day.other .cal-num { color: var(--faint); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--olive); }
.cal-num { font-size: 12.5px; font-weight: 650; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.cal-item { display: block; font-size: 12px; line-height: 1.25; padding: 3px 6px; border-radius: 6px; background: var(--pistachio);
            color: var(--pistachio-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item:hover { text-decoration: none; filter: brightness(.96); }
.cal-item.late { background: var(--bad-soft); color: var(--bad); }
.cal-item.today { background: var(--warn-soft); color: var(--warn-ink); }
.cal-item.done { background: var(--chip-bg); color: var(--chip-ink-2); text-decoration: line-through; }
.cal-item .ico.fire { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }
.cal-more { font-size: 11.5px; color: var(--muted); padding-left: 4px; }
.cal-cnt { background: var(--olive-deep); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; font-size: 10.5px;
           place-items: center; padding: 0 5px; }
.agenda-day { display: flex; gap: 10px; align-items: baseline; padding: 9px 20px 6px; background: var(--soft);
              border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.agenda-day.today b { color: var(--accent-ink); }

/* карточка задачи и чат */
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); gap: 16px; align-items: start; }
.task-main > .card + .card { margin-top: 16px; }
.chat-card { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.chat { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 260px;
        background: var(--soft-2); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg.mine { align-self: flex-end; }
.msg .bubble { background: var(--panel); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 7px 11px; min-width: 0; }
.msg.mine .bubble { background: var(--pistachio); border-color: var(--brand-line); border-radius: 12px 12px 4px 12px; }
.msg .mh { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg .mh b { color: var(--ink); font-size: 12.5px; }
.msg.sys { align-self: center; max-width: 100%; }
.msg.sys span { font-size: 11.5px; color: var(--muted); background: var(--line-2); padding: 3px 10px; border-radius: 10px; text-align: center; }
.mfile { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.mfile .ico { width: 14px; height: 14px; }
.chat-form { border-top: 1px solid var(--line-2); padding: 10px 12px; }
.chat-form .picked { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { min-height: 40px; max-height: 140px; resize: none; }
.chat-input .attach { padding: 10px; cursor: pointer; }
.checks { display: grid; gap: 2px; }
.check-row { display: flex; align-items: center; gap: 6px; }
.check-form { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px 0; }
.cbox { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-strong); background: var(--panel); display: grid;
        place-items: center; cursor: pointer; flex: none; padding: 0; color: transparent; }
.cbox .ico { width: 14px; height: 14px; stroke-width: 3; }
.check-row.done .cbox { background: var(--ok-fill); border-color: var(--ok-fill); color: #fff; }
.check-row.done .check-form span { color: var(--muted); text-decoration: line-through; }
.cbox:disabled { cursor: default; opacity: .6; }
.people { display: flex; flex-wrap: wrap; gap: 6px 12px; }

/* форма задачи */
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.quick-dates button { font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 12px; border: 1px solid var(--line);
                      background: var(--panel); cursor: pointer; color: var(--ink-2); }
.quick-dates button:hover { background: var(--pistachio-soft); border-color: var(--line-hover); }
.picker { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; }
.picker summary { cursor: pointer; }
.pcount { display: inline-block; margin-left: 6px; background: var(--olive-deep); color: #fff; border-radius: 10px; font-size: 11px;
          font-weight: 700; padding: 0 7px; }
.pcount:empty { display: none; }
.pfilter { margin: 10px 0 6px; }
.plist { max-height: 230px; overflow-y: auto; display: grid; gap: 1px; }
.plist label { display: flex; align-items: baseline; gap: 8px; padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.plist label:hover { background: var(--bg); }
#checkInputs { display: grid; gap: 6px; }

/* виджет задач на рабочем столе, окно «Создать» */
.tw { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tw a { padding: 12px 18px; border-right: 1px solid var(--line-2); color: inherit; display: flex; flex-direction: column; gap: 2px; }
.tw a:last-child { border-right: 0; }
.tw a:hover { background: var(--hover); text-decoration: none; }
.tw b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tw span { font-size: 12.5px; color: var(--muted); }
.tw .hot b { color: var(--bad); }
.create-list { display: grid; gap: 8px; }
.create-list a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.create-list a:hover { text-decoration: none; border-color: var(--olive); background: var(--pistachio-soft); }
.create-list .ci { width: 40px; height: 40px; border-radius: 10px; background: var(--pistachio); color: var(--olive-dark); display: grid; place-items: center; flex: none; }
.create-list b { display: block; }
.create-list span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1200px) {
  .task-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-card { position: static; max-height: none; }
  .chat { max-height: 60vh; }
}
@media (max-width: 860px) {
  .tasks-bar { gap: 8px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; flex-basis: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .seg { width: 100%; }
  .seg a { flex: 1; justify-content: center; padding: 8px 6px; }
  table.t.tlist thead { display: none; }
  table.t.tlist, table.t.tlist tbody { display: block; }
  table.t.tlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px 14px;
                     border-bottom: 1px solid var(--line-2); align-items: center; }
  table.t.tlist tr:last-child { border-bottom: 0; }
  table.t.tlist td { display: block; padding: 0; border: 0; min-width: 0; }
  table.t.tlist tbody tr.link:hover td { background: none; }
  table.t.tlist .c-title { grid-area: 1 / 1 / 2 / 3; }
  table.t.tlist .c-title .t-title { font-size: 15.5px; line-height: 1.3; }
  table.t.tlist .c-due { grid-area: 2 / 1; }
  table.t.tlist .c-status { grid-area: 2 / 2; justify-self: end; }
  table.t.tlist .c-to { grid-area: 3 / 1; font-size: 13px; }
  table.t.tlist .c-from { grid-area: 3 / 2; justify-self: end; font-size: 12.5px; color: var(--muted); }
  table.t.tlist .c-from .avatar { display: none; }
  table.t.tlist .c-from .who::before { content: "от"; }
  table.t.tlist .c-act { display: none; }
  table.t.tlist tr.tgrp-row { display: block; padding: 0; }                /* шапка группы задач (02.12.2026) */
  table.t.tlist tr.tgrp-row td { display: none; }
  table.t.tlist tr.tgrp-row td.tgrp-cell { display: block; padding: 10px 14px; white-space: normal; }
  table.t.tlist tr.tgrp-row .tgrp-in { width: auto; white-space: normal; }
  .tgrp-toggle { width: auto; max-width: 100%; }
  .tgrp-toggle { flex-wrap: wrap; }
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82vw; scroll-snap-type: x mandatory;
           margin: 0 -12px; padding: 0 12px 8px; }
  .bcol { scroll-snap-align: center; }
  .kb-acts .btn { padding: 7px 11px; font-size: 13px; }            /* на телефоне — под палец */
  .cal-head h2 { min-width: 0; flex: 1; font-size: 17px; white-space: nowrap; }
  .cal-day { min-height: 52px; padding: 4px; align-items: center; }
  .cal-item, .cal-more { display: none; }
  .cal-cnt { display: inline-grid; }
  .cal-num { flex-direction: column; gap: 3px; }
  .cal-dow div { padding: 6px 2px; text-align: center; }
  .agenda-day { padding: 9px 14px 6px; }
  .chat { max-height: 55vh; padding: 12px; }
  .tw { grid-template-columns: repeat(2, 1fr); }
  .tw a:nth-child(2) { border-right: 0; }
  .tw a:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 460px) {     /* четыре вида задач в переключателе: на узком экране — без иконок, чтобы поместились подписи */
  .tasks-bar .seg .ico { display: none; }
  .tasks-bar .seg a { padding: 8px 2px; }
}

/* =====================================================================================
   Характер: заголовки шрифтом с засечками, как надпись на логотипе; в меню снизу
   проступает узор с выпечкой.
   ===================================================================================== */
.content h1 { font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: .005em; }
.memo-head h1 { font-size: 24px; }
/* Узор в меню — отдельный слой (.side-bg), который едет плавно: его двигает видеокарта (transform), меню при этом
   не перерисовывается. Раньше двигался сам фон меню — ступеньками, четыре раза в секунду, и это выглядело дёргано.
   Слой «прилипает» к верху меню (sticky), поэтому не уезжает, когда длинное меню прокручивают; места в меню не занимает
   (отрицательные поля). Сверху узор приглушён маской. Фаза движения берётся от часов (--drift-at ставит скрипт в шапке
   страницы), поэтому при переходе со страницы на страницу узор не прыгает в начало. */
.side > * { position: relative; z-index: 1; }
.side > .side-bg { position: sticky; top: -18px; z-index: 0; flex: none; height: 100vh; height: 100dvh; margin: -18px -14px calc(15px - 100vh);
                   margin-bottom: calc(15px - 100dvh); overflow: hidden; pointer-events: none;
                   -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), #000 38%);
                   mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), #000 38%); }
.side-bg i { position: absolute; inset: 0 0 -300px -300px; background: url(brand/pattern.svg) 0 0 / 300px; }
@keyframes side-drift { to { transform: translate3d(300px, -300px, 0); } }
.hero::before, .login-brand::before { inset: 0 -300px -300px 0; }
@media (max-width: 860px) {
  .content h1 { font-size: 23px; }
  .memo-head h1 { font-size: 21px; }
}

/* =====================================================================================
   Движение: мягкое и быстрое, чтобы система ощущалась живой, но не отвлекала от работы.
   Если в настройках компьютера или телефона включено «уменьшить движение» — всё отключается.
   ===================================================================================== */
.card, .btn, .side a.item, .file, .notif, .tabbar a, .tabbar button, .tabbar .plus {
  transition: background-color .16s ease, border-color .16s ease, box-shadow .2s ease, transform .16s ease, color .16s ease; }
.btn:active { transform: scale(.97); }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,47,8,.12); }
.file:hover { border-color: var(--line-hover); }
.tabbar a:active .plus { transform: scale(.92); }

@media (prefers-reduced-motion: no-preference) {
  /* плавная смена страниц (Chrome, Edge); меню и панели при этом стоят на месте */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
  .side { view-transition-name: side; }
  .top { view-transition-name: topbar; }
  .tabbar { view-transition-name: tabbar; }

  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes drift { to { transform: translate(-300px, -300px); } }
  @keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(194,59,50,0); } 50% { box-shadow: 0 0 0 5px rgba(194,59,50,.18); } }

  .content > * { animation: rise .42s cubic-bezier(.2,.7,.2,1) both; }
  .content > *:nth-child(2) { animation-delay: .04s; }
  .content > *:nth-child(3) { animation-delay: .08s; }
  .content > *:nth-child(4) { animation-delay: .12s; }
  .content > *:nth-child(n+5) { animation-delay: .16s; }
  .stats > .card { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
  .stats > .card:nth-child(2) { animation-delay: .05s; }
  .stats > .card:nth-child(3) { animation-delay: .1s; }
  .stats > .card:nth-child(4) { animation-delay: .15s; }
  .stats > .card:nth-child(5) { animation-delay: .2s; }
  .flash { animation: drop .35s cubic-bezier(.2,.7,.2,1) both; }
  .bar i { transform-origin: left center; animation: grow .9s cubic-bezier(.2,.7,.2,1) .15s both; }
  dialog[open] { animation: pop .2s ease both; }
  .chip.late { animation: glow 2.2s ease-in-out infinite; }
  .hero::before, .login-brand::before { animation: drift 90s linear infinite; will-change: transform; }
  .side-bg i { animation: side-drift 120s linear var(--drift-at, 0s) infinite; will-change: transform; }
  .hero-art use { animation: rise .7s cubic-bezier(.2,.7,.2,1) .15s both; }
  .hero-art use:nth-child(2) { animation-delay: .28s; }
  .hero-art use:nth-child(3) { animation-delay: .4s; }

  /* логотип на странице входа: кольцо рисуется, буква проявляется, надпись выходит по буквам */
  @keyframes lg-draw { to { stroke-dashoffset: 0; } }
  @keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes lg-letter { from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; } }
  .logo-anim .lg-ring { stroke-dasharray: 100; stroke-dashoffset: 100;
                        animation: lg-draw 1.3s cubic-bezier(.65,.05,.25,1) .2s forwards; }
  .logo-anim .lg-m { opacity: 0; animation: lg-fade .9s ease .85s forwards; }
  .logo-anim .lg-letter { opacity: 0; animation: lg-letter .6s cubic-bezier(.2,.7,.2,1) forwards;
                          animation-delay: calc(1.25s + var(--i) * 80ms); }
  .logo-anim .lg-tag { opacity: 0; animation: lg-fade .9s ease 1.9s forwards; }
  .login-tag { animation: lg-fade .9s ease 2.2s both; }
  .login { animation: rise .6s cubic-bezier(.2,.7,.2,1) .25s both; }
}

/* ================================================================ Торговые точки: план-факт */
.trade-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.trade-bar .grow { flex: 1; }
.trade-bar select, .trade-bar input[type=date] { width: auto; padding: 6px 10px; }
.trade-bar label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.mnav { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line);
        border-radius: 10px; padding: 3px; }
.mnav a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px;
          color: var(--ink-2); font-size: 16px; }
.mnav a:hover { background: var(--bg); text-decoration: none; }
.mnav b { min-width: 124px; text-align: center; font-weight: 650; }
.lead-note { background: var(--pistachio-soft); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 12px 16px;
             margin-bottom: 14px; line-height: 1.55; }
.lead-note b { font-weight: 650; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px;
       box-shadow: var(--shadow); min-width: 0; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi .v { font-size: 23px; font-weight: 650; letter-spacing: -.01em; margin: 3px 0 2px; white-space: nowrap; }
.kpi .s { font-size: 12.5px; color: var(--ink-2); }
.kpi.lead .v { font-size: 26px; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good-ink); }
.delta.down { color: var(--bad); }
.tnum { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t.trade td, table.t.trade th { padding-left: 9px; padding-right: 9px; }
table.t.trade th { line-height: 1.25; vertical-align: bottom; }
table.t.trade td.r, table.t.trade th.r { text-align: right; }
table.t.trade th a.on { color: var(--ink); }
table.t.trade tr.weekend td { background: var(--soft-2); }
table.t.trade tr.today td { box-shadow: inset 0 1px 0 var(--olive), inset 0 -1px 0 var(--olive); }
table.t.trade input { padding: 6px 9px; text-align: right; max-width: 170px; font-variant-numeric: tabular-nums; }
table.t.trade input.txt { text-align: left; max-width: none; }
table.t.trade select { padding: 6px 9px; }
.late-date { color: var(--warn); font-weight: 600; }
.src { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
/* свой период «с — по»: два поля с календарём, готовые периоды, отбор по виду точек */
.trade-bar .period { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel);
                     border: 1px solid var(--line); border-radius: 10px; padding: 3px 4px 3px 10px; }
.trade-bar .period.on { border-color: var(--olive); box-shadow: 0 0 0 2px var(--pistachio-soft); }
.trade-bar .period input[type=date] { padding: 4px 8px; min-height: 30px; }
.trade-bar .period .btn { min-height: 30px; }
.period-quick { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line);
            background: var(--panel); color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.chip-btn:hover { background: var(--bg); text-decoration: none; border-color: var(--line-hover); }
.chip-btn.on { background: var(--pistachio); color: var(--pistachio-ink); border-color: transparent; font-weight: 600; }
.kind-seg { margin-bottom: 14px; flex-wrap: wrap; }
.kind-seg .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kind-seg a.on .n { color: inherit; opacity: .75; }
/* расходы точек одной таблицей и расчёт безубыточности в справочнике точек */
table.t.trade.costs-all input { max-width: 112px; padding-left: 7px; padding-right: 7px; }
table.t.trade.costs-all input[data-pct] { max-width: 62px; }
table.t.trade.costs-all td, table.t.trade.costs-all th { padding-left: 7px; padding-right: 7px; }
@media (min-width: 861px) {
  /* название точки остаётся на месте, когда таблицу листают вбок на нешироком экране */
  table.t.trade.costs-all td.lead, table.t.trade.costs-all thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel);
                                                                                  min-width: 132px; box-shadow: inset -1px 0 0 var(--line-2); }
  table.t.trade.costs-all thead th:first-child { background: var(--soft); z-index: 2; }
  table.t.trade.costs-all tfoot td.lead { background: var(--soft); }
}
table.t.trade .be-cell .t-sub { max-width: 250px; margin-left: auto; white-space: normal; line-height: 1.3; }
table.t.trade .be-calc b { font-weight: 650; }
tr.be-changed [data-be] { color: var(--accent-ink); }
/* каналы продаж: плашки «кафе / магазин / кейтеринг» и полоса доли (один цвет — доля читается по длине и числу рядом) */
.ch-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ch-tile { background: var(--soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ch-tile .l { color: var(--muted); font-size: 12.5px; }
.ch-tile .v { font-size: 21px; font-weight: 650; margin: 2px 0 6px; white-space: nowrap; }
.ch-tile .s { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.ch-tile.none .v, .ch-tile.none .s { color: var(--muted); }
.ch-meter { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.ch-meter i { display: block; height: 100%; border-radius: 4px; background: var(--olive); min-width: 0; }
.ch-meter.wide { display: inline-block; width: 96px; vertical-align: middle; margin-right: 8px; }

/* выполнение плана: полоса с отметкой 100% */
.meter { display: flex; align-items: center; gap: 6px; min-width: 112px; --m-fill: #c3c2b7; --m-track: var(--line-2); }
.meter .track { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--m-track); min-width: 56px; }
.meter .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--m-fill); }
.meter .mark { position: absolute; top: -3px; bottom: -3px; left: 83.333%; width: 2px; background: var(--ink-2); border-radius: 1px; }
.meter b { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.meter.good { --m-fill: #0ca30c; --m-track: #d7f0d7; }
.meter.warn { --m-fill: #e39a00; --m-track: #fbe8bd; }
.meter.bad { --m-fill: #d03b3b; --m-track: #f5d5d5; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.st.good { color: var(--good-ink); }
.st.bad { color: var(--bad); }
.st.warn { color: var(--warn); }

/* график: цвета проверены по методике (факт — синий, план — серый; прогноз — пунктир) */
.viz-root { --surface-1: #ffffff; --text-primary: #25261a; --text-secondary: #4e503e; --text-muted: #7b7d69;
            --grid: #e9e7dc; --axis: #c3c2b7; --series-fact: #2a78d6; --series-plan: #898781;
            --series-fcw: #c77700; --series-real: #b0457e; position: relative; }
/* три фудкоста: по iiko — синий, со списаниями — оранжевый пунктир, реальный — пурпурный (тона Окабе — Ито, различимы
   и при нарушении цветового зрения; у второй линии ещё и штрих) */
.viz-root .ln.fcw { stroke: var(--series-fcw); stroke-dasharray: 6 4; }
.viz-root .ln.real { stroke: var(--series-real); stroke-width: 2.5; }
.viz-root .dot.fcw { fill: var(--series-fcw); }
.viz-root .dot.real { fill: var(--series-real); }
.viz-legend i.fcw { border-top: 2px dashed var(--series-fcw); }
.viz-legend i.real { border-top: 3px solid var(--series-real); }
.viz-root svg { display: block; width: 100%; outline: none; }
.viz-root svg:focus-visible { box-shadow: 0 0 0 2px var(--olive); border-radius: 8px; }
.viz-root text { font-family: inherit; font-size: 11.5px; fill: var(--text-muted); }
.viz-root .val { fill: var(--text-primary); font-weight: 650; font-size: 12px; }
.viz-root .grid { stroke: var(--grid); stroke-width: 1; }
.viz-root .axis { stroke: var(--axis); stroke-width: 1; }
.viz-root .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-root .ln.plan { stroke: var(--series-plan); }
.viz-root .ln.fact { stroke: var(--series-fact); }
.viz-root .ln.fc { stroke: var(--series-fact); stroke-dasharray: 2 6; }
.viz-root .be { stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 6 4; }
.viz-root .dot { stroke: var(--surface-1); stroke-width: 2; }
.viz-root .dot.plan { fill: var(--series-plan); }
.viz-root .dot.fact { fill: var(--series-fact); }
.viz-root .cross { stroke: var(--text-secondary); stroke-width: 1; opacity: .55; }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend i { width: 22px; height: 0; border-top: 2px solid var(--series-plan); display: inline-block; }
.viz-legend i.fact { border-top-color: var(--series-fact); }
.viz-legend i.fc { border-top: 2px dotted var(--series-fact); }
.viz-legend i.be { border-top: 1px dashed var(--ink-2); }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line);
           border-radius: 10px; box-shadow: 0 6px 22px rgba(46,47,8,.16); padding: 9px 11px; font-size: 12.5px;
           min-width: 190px; max-width: 260px; }
.viz-tip .h { font-weight: 650; margin-bottom: 5px; }
.viz-tip .r { display: flex; align-items: center; gap: 7px; padding: 1px 0; white-space: nowrap; }
.viz-tip .r i { width: 14px; height: 0; border-top: 2px solid var(--series-plan); flex: none; }
.viz-tip .r i.fact { border-top-color: var(--series-fact); }
.viz-tip .r i.fc { border-top: 2px dotted var(--series-fact); }
.viz-tip .r b { font-weight: 650; }
.viz-tip .r span { color: var(--muted); }
.viz-tip .d { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line-2); color: var(--ink-2); }
details.viz-table { border-top: 1px solid var(--line-2); }
details.viz-table summary { cursor: pointer; padding: 10px 20px; color: var(--ink-2); font-weight: 550; }
details.viz-table[open] summary { border-bottom: 1px solid var(--line-2); }
/* сравнение с прошлым месяцем внизу страницы точки (trade_compare.py, обращение №19): таблица, пометки, недели — неделя
   раскрывается по дням (<details>); на телефоне строка недели — название сверху, числа с подписями ниже */
.card.cmp { margin-top: 16px; }
.cmp .card-head { flex-wrap: wrap; }
.lead-note a.cmp-lead { display: table; margin-top: 4px; }      /* фраза в зелёной сводке — своей строкой */
table.t.cmp-t th .t-sub { font-weight: 400; }
.cmp-notes { border-top: 1px solid var(--line-2); }
.cmp-weeks { border-top: 1px solid var(--line-2); }
.cmp-cap { padding: 10px 20px 8px; }
.cmp-wh, details.cmp-week > summary { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 4px 12px;
                                      align-items: center; padding: 9px 20px; }
.cmp-weeks.no-peer .cmp-wh, .cmp-weeks.no-peer details.cmp-week > summary { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
.cmp-wh { background: var(--soft); border-top: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.cmp-wh > span + span, details.cmp-week > summary > span + span { text-align: center; }
details.cmp-week { border-top: 1px solid var(--line-2); }
details.cmp-week > summary { cursor: pointer; list-style: none; }
details.cmp-week > summary::-webkit-details-marker { display: none; }
details.cmp-week > summary:hover { background: var(--hover); }
details.cmp-week[open] > summary { background: var(--soft); border-bottom: 1px solid var(--line-2); }
.cmp-wl { position: relative; padding-left: 18px; min-width: 0; }
.cmp-wl::before { content: ""; position: absolute; left: 2px; top: .5em; width: 6px; height: 6px; border-right: 2px solid var(--muted);
                  border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
details.cmp-week[open] .cmp-wl::before { transform: rotate(45deg); }
.cmp-wl .t-sub { display: block; }
@media (max-width: 860px) {
  .cmp-cap { padding: 10px 14px 4px; }
  .cmp-wh { display: none; }
  details.cmp-week > summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 10px 14px; }
  .cmp-weeks.no-peer details.cmp-week > summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  details.cmp-week > summary > .cmp-wl { grid-column: 1 / -1; }
  details.cmp-week > summary > span + span { text-align: left; font-size: 13.5px; }
  details.cmp-week > summary > span[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); line-height: 1.25;
                                                          white-space: normal; }
  table.t.cmp-days tr.weekend { background: var(--soft-2); }        /* выходной — фоном всей карточки дня, а не каждой ячейки */
  table.t.cmp-days tr.weekend td { background: none; }
}
.steps { margin: 0; padding-left: 20px; line-height: 1.7; }
.bridge td { padding: 7px 12px !important; }
.bridge tr.sum td { font-weight: 650; background: var(--soft); }
.tw-trade { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 18px; margin-top: 16px; color: inherit; }
.tw-trade:hover { text-decoration: none; border-color: var(--line-hover); }
.tw-trade .ti { width: 40px; height: 40px; border-radius: 11px; background: var(--pistachio-soft); color: var(--accent-ink);
                display: grid; place-items: center; flex: none; }
.tw-trade .tt { flex: 1; min-width: 180px; }
.tw-trade .tt b { display: block; }
.tw-trade .tt span { color: var(--muted); font-size: 12.5px; }
.tw-trade .tn { display: flex; flex-direction: column; min-width: 96px; }
.tw-trade .tn b { font-size: 18px; font-weight: 650; }
.tw-trade .tn span { color: var(--muted); font-size: 12px; }

/* производство: заявки на подтверждение заказов */
.prq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.prq > .card + .card { margin-top: 0; }
.prq-day { font-weight: 650; margin: 14px 0 2px; display: flex; gap: 10px; align-items: baseline; }
.prq-day:first-child { margin-top: 0; }
.prq-card { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(230px, 300px); gap: 16px; padding: 14px 18px; }
.prq-when b { display: block; font-size: 22px; font-weight: 650; line-height: 1.1; }
.prq-when span { color: var(--muted); font-size: 12.5px; }
.prq-body h2 { margin: 0 0 4px; font-size: 16px; }
.prq-items { margin: 8px 0 0; padding: 0; list-style: none; }
.prq-items li { display: flex; gap: 10px; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.prq-items li:last-child { border-bottom: 0; }
.prq-kv { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.prq-note { margin-top: 8px; padding: 8px 10px; background: var(--cream-soft); border-radius: 8px; font-size: 13px; white-space: pre-wrap; }
.prq-act textarea { min-height: 54px; margin-bottom: 8px; }
.prq-act .btns { justify-content: flex-end; }
.prq-done { font-size: 13px; color: var(--ink-2); }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .v { font-size: 20px; }
  .kpi.lead .v { font-size: 24px; }
  .mnav b { min-width: 104px; }
  .trade-bar .grow { display: none; }
  .trade-bar .period { width: 100%; padding: 6px 8px; }
  .trade-bar .period label { flex: 1 1 140px; }
  .trade-bar .period input[type=date] { flex: 1; min-width: 0; }
  .period-quick { width: 100%; }
  .ch-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ch-tile { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 10px 12px; }
  .ch-tile .v { margin: 0; font-size: 18px; grid-row: 1; grid-column: 2; }
  .ch-tile .ch-meter, .ch-tile .s { grid-column: 1 / -1; }
  .ch-tile .s { margin-top: 0; }
  table.t.trade.costs-all input { max-width: 150px; }
  table.t.trade .be-cell .t-sub { max-width: none; }
  table.t.trade.stack td.r { text-align: right; }
  table.t.trade.stack td.lead .t-sub { font-weight: 400; white-space: normal; }
  table.t.trade.stack td .meter { flex: 1; min-width: 0; margin-top: 4px; }
  table.t.trade.stack td.lead .meter { margin-top: 6px; }
  table.t.trade input { max-width: 150px; }
  .prq-card { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .prq-when { display: flex; gap: 10px; align-items: baseline; }
  .tw-trade { gap: 12px; }
  .tw-trade .tn { min-width: 80px; }
}

/* ================================================================ Автозаказ точек и план производства */
.mnav b.wide { min-width: 208px; }
input[type=radio] { width: auto; accent-color: var(--olive-deep); flex: none; }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
table.t.trade td.pre { color: var(--muted); font-style: italic; }
.sup-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sup-bar input[type=search] { width: auto; flex: 0 1 280px; min-width: 160px; }
.sup-bar .grow { flex: 1; }
details.sup-cat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
                  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
details.sup-cat.none { display: none; }
details.sup-cat > summary { cursor: pointer; padding: 12px 18px; display: flex; align-items: center; gap: 10px;
                            flex-wrap: wrap; font-weight: 650; list-style: none; user-select: none; }
details.sup-cat > summary::-webkit-details-marker { display: none; }
details.sup-cat > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted);
                                    border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s;
                                    flex: none; margin-right: 2px; }
details.sup-cat[open] > summary::before { transform: rotate(45deg); }
details.sup-cat[open] > summary { border-bottom: 1px solid var(--line-2); }
details.sup-cat > summary .grow { flex: 1; }
details.sup-cat > summary .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; }
table.sup td { vertical-align: middle; }
table.sup .cutnote { white-space: normal; max-width: 110px; margin-left: auto; line-height: 1.25; }
table.sup td.lead { max-width: 380px; }
table.sup tr.zero, table.sup tr.hide { display: none; }
.show-zero table.sup tr.zero:not(.hide), .searching table.sup tr.zero:not(.hide) { display: table-row; }
table.sup tr.diff .qty-in input { border-color: var(--olive); background: var(--pistachio-soft); }
/* остаток точки по учёту iiko в заявке: было — пришло — … — остаток сейчас — будет утром */
.sup-stock-bar { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; font-size: 13px; }
.sup-stock-bar .muted { flex: 1 1 320px; }
table.t.trade.sup.sup-wide td, table.t.trade.sup.sup-wide th { padding-left: 6px; padding-right: 6px; }
table.sup.sup-wide td.lead { max-width: 300px; }
table.sup td.c-now { cursor: help; }
table.sup td.c-now.neg b { color: var(--bad); }
table.sup td.c-morn b { font-weight: 650; }
.qty-in { display: inline-flex; align-items: center; gap: 4px; }
.qty-in input, table.t.trade .qty-in input { width: 70px; max-width: 70px; text-align: center; padding: 6px 4px;
                                              font-variant-numeric: tabular-nums; font-weight: 650; }
.qty-in button { width: 30px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
                 cursor: pointer; font-size: 17px; line-height: 1; color: var(--ink-2); padding: 0; }
.qty-in button:hover { background: var(--bg); }
table.t.trade input.stock-in { width: 66px; max-width: 66px; text-align: center; padding: 6px 4px; }
.sup-foot { position: sticky; bottom: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line);
            border-radius: var(--radius); box-shadow: 0 -4px 18px rgba(46, 47, 8, .10); padding: 10px 16px;
            display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sup-foot .tot { flex: 1; display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--ink-2); }
.sup-foot .tot b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.sup-tot { color: var(--ink-2); }
.sup-tot b { color: var(--ink); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.rules label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); justify-content: flex-end; }
.rules input { max-width: 120px; }
.xrow { display: flex; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line-2); align-items: flex-start; }
.card-head + .xrow { border-top: 0; }
.xrow .grow { flex: 1; min-width: 0; }
.xitems { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; }
.xtime { min-width: 92px; }
.xtime b { display: block; font-size: 17px; font-weight: 650; }
.xtime span { color: var(--muted); font-size: 12.5px; }
.xsum { cursor: pointer; padding: 12px 18px; font-weight: 600; color: var(--ink-2); }
.prq-when b.xname { font-size: 18px; }

/* сводная заявка: позиции × точки, шапка и первый столбец закреплены */
.plan-wrap { overflow: auto; max-height: 74vh; }
table.plan { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
table.plan th, table.plan td { padding: 6px 9px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
                               text-align: right; font-variant-numeric: tabular-nums; }
table.plan th { position: sticky; top: 0; z-index: 2; background: var(--soft); font-size: 12px; color: var(--muted);
                font-weight: 600; vertical-align: bottom; max-width: 92px; white-space: normal; line-height: 1.2; }
table.plan .name { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; max-width: 300px;
                   overflow: hidden; text-overflow: ellipsis; box-shadow: inset -1px 0 0 var(--line-2); }
table.plan th.name { z-index: 3; background: var(--soft); max-width: 300px; }
table.plan td.u { color: var(--muted); text-align: left; }
table.plan .tot { font-weight: 650; background: var(--soft); }
table.plan tr.cat td { background: var(--pistachio-soft); font-weight: 650; }
table.plan tr.cat td.name { background: var(--pistachio-soft); }
table.plan tbody tr:not(.cat):hover td { background: var(--hover); }
table.plan td.pre, .plan-m b.pre, .plan-line b.pre { color: var(--muted); font-style: italic; font-weight: 400; }
table.plan td.ex { box-shadow: inset 0 -2px 0 var(--warn); }
.plan-outs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.plan-outs > .card + .card { margin-top: 0; }
.plan-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.plan-line b { white-space: nowrap; }
.plan-m-cat { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; background: var(--pistachio-soft);
              font-weight: 650; }
.plan-m details { border-bottom: 1px solid var(--line-2); }
.plan-m summary { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; cursor: pointer; }
.plan-m ul { margin: 0; padding: 0 14px 8px 28px; list-style: none; color: var(--ink-2); }
.plan-m li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }

@media (max-width: 1200px) {
  .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .kpis.three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .mnav b.wide { min-width: 0; padding: 0 6px; font-size: 13px; }
  .hide-s { display: none !important; }
  .sup-bar input[type=search] { flex: 1 1 100%; }
  /* заявка на телефоне: название, строка с цифрами и сразу «остаток» и «заказ» в одну линию */
  table.t.stack.sup tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
  table.t.stack.sup tr.zero, table.t.stack.sup tr.hide { display: none; }
  .show-zero table.t.stack.sup tr.zero:not(.hide), .searching table.t.stack.sup tr.zero:not(.hide) { display: grid; }
  table.t.stack.sup td.lead { grid-column: 1 / -1; max-width: none; }
  table.t.stack.sup td { align-items: center; padding: 0; }
  table.t.stack.sup td.c-stock { justify-content: flex-start; }
  table.t.stack.sup td.c-qty { grid-column: 2; justify-content: flex-end; }
  table.t.stack.sup td.nolabel::before { display: none; }
  .sup-facts { font-weight: 400; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.55; }
  .sup-facts .st { display: inline; white-space: normal; }
  .sup-facts .st::before { display: inline-block; margin-right: 4px; }
  .sup-foot { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 8px 12px; gap: 10px; }
  .sup-foot .btn { flex: 1 1 100%; justify-content: center; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .xrow { flex-wrap: wrap; padding: 12px 14px; }
}
@media print {
  .side, .top, .tabbar, .scrim, .no-print, .flash, dialog { display: none !important; }
  .layout, .main, .content { display: block; margin: 0; padding: 0; max-width: none; }
  body { background: var(--panel); }
  .card, .kpi { box-shadow: none; }
  .plan-wrap { overflow: visible; max-height: none; }
  table.plan { width: 100%; font-size: 10px; }
  table.plan th, table.plan .name { position: static; }
  .plan-outs { display: block; }
  .plan-outs > .card { break-inside: avoid; margin-bottom: 10px; }
  .content > * { animation: none !important; }
}

/* ================================================================ Чаты и объявления */
[hidden] { display: none !important; }      /* скрытое остаётся скрытым, даже если у блока задан свой display */
.cava { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700;
        font-size: 13px; flex: none; color: #fff; background: var(--olive); letter-spacing: .02em; }
.cava.sm { width: 30px; height: 30px; font-size: 11px; }
.cava.ghost { background: transparent; }
.cava.gen { background: var(--olive-deep); }
.cava .ico { width: 20px; height: 20px; }
.cava.sm .ico { width: 15px; height: 15px; }
.cava.c0 { background: #7f8000; } .cava.c1 { background: #b3682a; } .cava.c2 { background: #2b68ad; }
.cava.c3 { background: #1e8a52; } .cava.c4 { background: #8a5bc4; } .cava.c5 { background: #c2553b; }
.cava.c6 { background: #2a8c8c; } .cava.c7 { background: #a07a1f; }

.chatwrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - 60px - 48px); min-height: 440px;
            background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
            overflow: hidden; }
/* без анимации появления: после неё у блока остаётся transform, и переписка на телефоне не смогла бы занять весь экран */
.content > .chatwrap { animation: none !important; transform: none !important; }
.chatlist { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cl-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.cl-head h1 { flex: 1; font-size: 22px; }
.cl-search { padding: 0 12px 10px; }
.cl-items { flex: 1; overflow-y: auto; min-height: 0; }
.cl-item { display: flex; gap: 11px; padding: 10px 14px; align-items: center; color: inherit; border-left: 3px solid transparent; }
.cl-item:hover { background: var(--hover); text-decoration: none; }
.cl-item.on { background: var(--pistachio-soft); border-left-color: var(--olive); }
.cl-item .tx { flex: 1; min-width: 0; }
.cl-item .t, .cl-item .l { display: flex; gap: 8px; align-items: baseline; }
.cl-item .t b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cl-item .t span { font-size: 11.5px; color: var(--muted); flex: none; }
.cl-item .l { align-items: center; margin-top: 1px; }
.cl-item .l span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.cl-item .n { background: var(--olive-deep); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; min-width: 19px;
              height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; flex: none; }
.cl-item.unread .t b { font-weight: 700; }
.cl-item.unread .l span { color: var(--ink); }
.cl-sec { padding: 10px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cl-none { padding: 22px 14px; color: var(--muted); text-align: center; }

.chatpane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: var(--panel); }
.cp-back { display: none; }
.cp-title { flex: 1; min-width: 0; line-height: 1.25; }
.cp-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.cp-who:hover { text-decoration: none; }
.cp-who:hover #cpTitle { color: var(--olive); }
.cp-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.cp-title span { font-size: 12.5px; color: var(--muted); }
.cp-msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.cp-older { align-self: center; }
.cp-msgs .day { align-self: center; font-size: 11.5px; color: var(--ink-2); background: var(--chip-bg); padding: 3px 12px;
                border-radius: 10px; margin: 6px 0 2px; }
.cp-msgs .msg { max-width: min(76%, 640px); position: relative; }
.cp-msgs .msg.sys { max-width: 100%; }
.cp-msgs .msg.cont { margin-top: -4px; }
.cp-msgs .msg .bubble { padding: 7px 11px 5px; box-shadow: 0 1px 1px rgba(46, 47, 8, .05); }
.cp-msgs .msg.cont .bubble { border-radius: 12px; }
.mmeta { font-size: 10.5px; color: var(--muted); text-align: right; margin-top: 2px; white-space: nowrap; }
.mread { font-style: normal; }
.mread.on { color: var(--blue); }
.mdel { color: var(--muted); font-style: italic; }
.mtext { overflow-wrap: anywhere; }
.mreply { display: block; width: 100%; text-align: left; font: inherit; border: 0; border-left: 3px solid var(--olive);
          background: rgba(127, 128, 0, .08); border-radius: 6px; padding: 4px 8px; margin-bottom: 5px; cursor: pointer; }
.mreply b { display: block; font-size: 12px; color: var(--olive-dark); }
.mreply span { display: block; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis;
               white-space: nowrap; max-width: 420px; }
.mimg { display: block; margin: 2px 0 5px; }
.mimg img { max-width: min(320px, 100%); max-height: 300px; border-radius: 9px; display: block; }
.macts { display: none; gap: 4px; align-self: center; flex: none; }
.msg.sel .macts { display: flex; }
@media (hover: hover) { .cp-msgs .msg:hover .macts { display: flex; } }
.msg.mine .macts { order: -1; }
.macts button { font: inherit; font-size: 11.5px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
                padding: 2px 9px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.macts button:hover { background: var(--pistachio-soft); }
.macts button.bad { color: var(--bad); }
.msg.flash-it .bubble { box-shadow: 0 0 0 3px rgba(127, 128, 0, .35); }
.cp-down { position: absolute; right: 18px; bottom: 84px; border: 1px solid var(--line); background: var(--panel); border-radius: 16px;
           padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; box-shadow: var(--shadow);
           color: var(--olive-dark); font-weight: 600; z-index: 2; }
.cp-form { border-top: 1px solid var(--line-2); padding: 10px 12px; background: var(--panel); }
.cp-note { display: flex; gap: 10px; align-items: center; border-left: 3px solid var(--olive); background: var(--pistachio-soft);
           border-radius: 6px; padding: 5px 8px 5px 10px; margin-bottom: 8px; }
.cp-note .grow { flex: 1; min-width: 0; }
.cp-note b { display: block; font-size: 12px; color: var(--olive-dark); }
.cp-note span { display: block; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-picked { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.cp-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 30px;
            color: var(--muted); }
.cp-empty b { color: var(--ink); font-size: 17px; }
.nc-people { max-height: 320px; margin-top: 8px; }
.nc-row { display: flex; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 8px; color: inherit; }
.nc-row:hover { background: var(--pistachio-soft); text-decoration: none; }
.nc-row div b { display: block; font-weight: 600; }
.nc-row div span { font-size: 12.5px; color: var(--muted); }
.nc-pick { max-height: 220px; margin-top: 6px; }
.nc-pick label { align-items: center; }
.nc-pick label span:first-of-type { flex: none; white-space: nowrap; }
.nc-pick label .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .m-pos { display: block; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line-2); }
.pp-row .grow { flex: 1; min-width: 0; }
.pp-row .grow b { display: block; font-weight: 600; }
.pp-row .grow span { font-size: 12.5px; color: var(--muted); }

.news-list { display: grid; gap: 14px; max-width: 900px; }
.news-list > .card + .card { margin-top: 0; }
.card.news { padding: 16px 20px; }
.card.news.imp { border-left: 4px solid var(--bad); }
.card.news.new { box-shadow: 0 0 0 2px rgba(127, 128, 0, .28), var(--shadow); }
.news-head { display: flex; gap: 12px; align-items: flex-start; }
.news-head .grow { flex: 1; min-width: 0; }
.news-head h2 { margin: 0 0 2px; font-size: 17px; }
.news-head h2 a { color: inherit; }
.news-head .pin .ico { width: 14px; height: 14px; vertical-align: -1px; color: var(--muted); margin-right: 4px; }
.news-text { margin-top: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.news-text.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.news-files { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; align-items: flex-start; }
.news-files .mimg img { max-height: 220px; }
.news-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px;
             border-top: 1px solid var(--line-2); }
.news-foot .grow { flex: 1; }
.tw-news .notif .chip { flex: none; }
.readers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
.readers > div { min-width: 0; }

.toast { position: fixed; right: 18px; bottom: 18px; z-index: 80; background: var(--panel); border: 1px solid var(--line);
         border-left: 4px solid var(--olive); border-radius: 12px; box-shadow: 0 10px 30px rgba(46, 47, 8, .18);
         padding: 10px 14px; max-width: 340px; color: inherit; display: block; }
.toast:hover { text-decoration: none; background: var(--soft-2); }
.toast b { display: block; font-size: 13px; }
.toast span { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 860px) {
  .chatwrap { display: block; height: auto; min-height: 0; border: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .chatwrap .chatlist { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
  .chatwrap.has-active .chatlist { display: none; }
  .chatwrap:not(.has-active) .chatpane { display: none; }
  .chatwrap.has-active .chatpane { position: fixed; inset: 0; z-index: 70; height: 100dvh; }
  .cl-items { overflow: visible; }
  .cp-back { display: inline-flex; font-size: 18px; padding: 6px 10px; }
  .cp-head { padding: 8px 10px; }
  .cp-msgs { padding: 12px 10px 6px; }
  .cp-msgs .msg { max-width: 90%; }
  .cp-msgs .msg.sel { flex-wrap: wrap; }
  .cp-msgs .msg.sel .macts { flex-basis: 100%; order: 3; margin-top: 4px; padding-left: 38px; }
  .cp-msgs .msg.mine.sel .macts { justify-content: flex-end; padding-left: 0; }
  .macts button { padding: 6px 12px; font-size: 13px; }
  body.chat-open .tabbar { display: none; }
  .cp-form { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .cp-down { bottom: 78px; right: 12px; }
  .pp-row { padding: 10px 14px; flex-wrap: wrap; }
  .card.news { padding: 14px; }
  .readers { grid-template-columns: minmax(0, 1fr); }
  .toast { left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); max-width: none; }
}

/* ================================================================ Сотрудники списком: памятки с логинами */
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; letter-spacing: .02em; }
/* названия классов не должны совпадать с table.t.memos (список служебных записок) */
.login-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.login-slip { background: var(--panel); border: 1px dashed var(--art); border-radius: 10px; padding: 14px 16px; break-inside: avoid; }
.mc-brand { font-family: var(--serif); font-size: 15px; color: var(--olive-dark); letter-spacing: .08em; text-transform: uppercase; }
.mc-name { font-weight: 650; font-size: 16px; margin-top: 4px; }
.mc-pos { color: var(--muted); font-size: 12.5px; min-height: 1em; }
.login-slip table { margin: 8px 0; border-collapse: collapse; }
.login-slip td { padding: 2px 12px 2px 0; font-size: 13.5px; vertical-align: baseline; }
.login-slip td:first-child { color: var(--muted); white-space: nowrap; }
.mc-note { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
@media print {
  .login-slips { display: block; }
  .login-slip { display: inline-block; vertical-align: top; width: 47%; margin: 0 1.5% 12px 0; page-break-inside: avoid; }
}

/* ================================================================ правила пароля: подсказка под полем */
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pw-rules span { font-size: 12px; line-height: 1.5; padding: 1px 9px; border-radius: 999px; background: var(--soft-3); color: var(--muted); transition: background .15s, color .15s; }
.pw-rules span.ok { background: var(--pistachio-soft); color: var(--olive-dark); }
.pw-rules span.ok::before { content: "✓ "; }
.pw-rules span.bad { background: var(--bad-soft, #fde8e6); color: var(--bad); }
/* ================================================================ Активность сотрудников и «в сети» — activity.py */
.cava.online { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ok); }
.cp-title span.is-online { color: var(--ok); }
.pres { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pres::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.pres.on { color: var(--ok-ink); }
.pres.on::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.act-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.act-bar input[type=date] { width: auto; }
.act-bar input[type=search] { width: 220px; }
.act-online { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.act-top { display: flex; flex-wrap: wrap; gap: 4px; }
.act-top span { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); white-space: nowrap; }
tr.act-quiet td { background: var(--bad-tint); }
.act-bar-h { height: 6px; border-radius: 3px; background: var(--olive); min-width: 2px; }
@media (max-width: 720px) { .act-bar input[type=search] { width: 100%; } }

/* ================================================================ Кадровые процессы — hr_flow.py (как «Роботизация» Sandyq) */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.flow-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.flow-card:hover { border-color: var(--line-hover); text-decoration: none; }
.flow-card-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.flow-card-head .cnt { margin-left: auto; }
.flow-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.flow-steps span { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); }
.flow-card-foot { font-size: 13px; margin-top: auto; }
.flow-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.flow-col { flex: 0 0 250px; background: var(--soft-3); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.flow-col.start { flex-basis: 190px; }
.flow-col.done { opacity: .9; }
.flow-col-head { padding: 6px 8px 8px; border-bottom: 3px solid var(--olive); border-radius: 10px 10px 0 0; background: var(--panel); }
.flow-col.start .flow-col-head { border-bottom-color: var(--blue); }
.flow-col.done .flow-col-head { border-bottom-color: var(--ok); }
.flow-col-who { display: flex; align-items: center; gap: 2px; margin-top: 6px; min-height: 26px; flex-wrap: wrap; }
.flow-add { display: grid; place-items: center; height: 46px; border: 1.5px dashed var(--line-strong); border-radius: 10px; color: var(--muted); background: var(--panel); }
.flow-add:hover { color: var(--brand); border-color: var(--brand); }
.flow-add .ico { width: 22px; height: 22px; }
.flow-item { display: flex; flex-direction: column; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px;
             color: var(--ink); text-decoration: none; font-size: 13px; }
.flow-item:hover { border-color: var(--line-hover); text-decoration: none; }
.flow-item.mine { border-left: 4px solid var(--bad); }
.fi-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fi-name { font-size: 14px; }
.fi-row { color: var(--ink-2); }
.fi-foot { display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.fi-foot .muted { margin-left: auto; }
.flow-form .flow-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.flow-form .flow-fields .field.wide { grid-column: 1 / -1; }
.flow-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.flow-files { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; font-size: 13px; }
.flow-path { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 16px; }
.flow-path .fp { position: relative; padding: 7px 16px 7px 22px; font-size: 12.5px; background: var(--soft-3); color: var(--muted);
                 clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); margin-right: -4px; }
.flow-path .fp:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 14px; }
.flow-path .fp.passed { background: var(--pistachio); color: var(--olive-dark); }
.flow-path .fp.now { background: var(--olive-deep); color: #fff; font-weight: 600; }
.flow-path .fp.now-done { background: var(--ok-fill); color: #fff; }
.flow-path .fp.stop { background: var(--bad-fill); color: #fff; }
.flow-resp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.flow-person { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.flow-h { font-size: 15px; }
.flow-dl { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: 6px 14px; margin: 0; }
.flow-dl dt { color: var(--muted); font-size: 13px; }
.flow-dl dd { margin: 0; overflow-wrap: anywhere; }
.flow-history { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.fh { font-size: 13px; border-left: 3px solid var(--line-strong); padding-left: 10px; }
.fh-c { margin-top: 3px; color: var(--ink-2); white-space: pre-wrap; }
.flow-roles summary { cursor: pointer; }
.flow-roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; margin-top: 12px; }
@media (max-width: 720px) {
  .flow-form .flow-fields, .flow-checks { grid-template-columns: minmax(0, 1fr); }
  .flow-dl { grid-template-columns: minmax(0, 1fr); }
  .flow-dl dd { margin-bottom: 6px; }
  .flow-col { flex-basis: 78vw; }
}

/* ================================================================ «День по чекам» точки — trade_day.py */
.day-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.day-bar input[type=date] { width: auto; }
.day-bar select { width: auto; max-width: 220px; }
.chip-link { padding: 4px 11px; border-radius: 999px; background: var(--chip-bg); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.chip-link:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.chip-link.on { background: var(--brand); color: #fff; }
.day-find { width: 260px; max-width: 100%; padding: 6px 10px; font-size: 13px; }
.card-foot { padding: 10px 16px 14px; }
.hour-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 18px; }
.hour-bars .hb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.hb-bar { width: 100%; max-width: 38px; background: var(--olive); border-radius: 4px 4px 0 0; min-height: 0; }
.hb-v { font-size: 11px; color: var(--ink-2); margin-bottom: 3px; white-space: nowrap; }
.hb-v small { font-size: 9px; color: var(--muted); margin-left: 1px; }
.hb-h { font-size: 11px; color: var(--muted); margin-top: 4px; }
.hb:hover .hb-bar { background: var(--olive-deep); }
table.day-prod tr.prow { cursor: pointer; }
table.day-prod tr.prow:hover td, table.day-prod tr.prow.open td { background: var(--hover); }
table.day-prod tr.prow .pname::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
table.day-prod tr.prow.open .pname::before { transform: rotate(90deg); }
table.day-prod tr.pdetail > td { background: var(--soft-2); padding: 12px 16px 14px; }
.chip.big-buy { background: var(--warn-soft); color: var(--warn-ink); font-size: 11px; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 82px; margin-bottom: 10px; max-width: 760px; padding-top: 14px; }
.mini-bars .mb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.mb-bar { width: 100%; max-width: 26px; background: var(--warn); border-radius: 3px 3px 0 0; opacity: .85; }
.mb-v { font-size: 10px; color: var(--ink-2); margin-bottom: 2px; }
.mb-h { font-size: 10px; color: var(--muted); margin-top: 3px; }
table.mini-t { font-size: 13px; }
table.mini-t td, table.mini-t th { padding: 5px 10px; }
#checkTable tr.big td { background: var(--warn-soft); }
#checkTable tr.ret td { color: var(--bad-ink); }
#checkTable .ci { display: inline-block; margin: 0 10px 2px 0; }
#checkTable .ci b { font-weight: 650; color: var(--ink); }
tr.find-off, tr.big-off { display: none; }
tr.flash-row td { animation: row-flash 2.2s ease-out; }
@keyframes row-flash { 0%, 40% { background: var(--pistachio); } 100% { background: transparent; } }
@media (max-width: 720px) { .day-find { width: 100%; } .hour-bars { gap: 2px; } .hb-v { font-size: 9px; } }

/* ================================================================ «Горит»: записку нужно согласовать (и оплатить) сегодня — burn.py */
.chip.burn { background: var(--bad-soft); color: var(--bad); display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.chip.burn .ico { width: 13px; height: 13px; }
.chip.burn.on { background: var(--bad-fill); color: #fff; animation: burn-pulse 1.6s ease-in-out infinite; }
@keyframes burn-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 0%, transparent); } }
@keyframes burn-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 30%, transparent); }
  50% { box-shadow: 0 0 20px 2px color-mix(in srgb, var(--bad) 42%, transparent); } }
.burn-box { background: var(--bad-tint); border: 1px solid var(--bad-line); border-radius: 12px; padding: 12px 14px; }
.burn-box label.f { color: var(--bad-ink); display: flex; align-items: center; gap: 6px; }
.burn-box label.f .ico { color: var(--bad); }
.burn-note { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px;
  background: var(--bad-tint); border: 1px solid var(--bad-line); color: var(--bad-ink); }
.burn-note > .ico { width: 22px; height: 22px; flex: none; color: var(--bad); margin-top: 1px; }
.burn-note .grow { flex: 1; min-width: 220px; }
.burn-note.on { border-color: var(--bad); animation: burn-glow 2.4s ease-in-out infinite; }
.burn-board { margin-bottom: 18px; border-radius: 16px; padding: 14px 16px; background: var(--bad-tint);
  border: 1.5px solid var(--bad); animation: burn-glow 2.4s ease-in-out infinite; }
.burn-board-head { display: flex; align-items: center; gap: 8px; color: var(--bad); font-size: 15px; margin-bottom: 10px; }
.burn-board-head .ico { width: 22px; height: 22px; }
.burn-board-head span { color: var(--muted); font-size: 13px; }
.burn-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; background: var(--panel);
  border: 1px solid var(--bad-line); color: var(--ink); text-decoration: none; }
.burn-item + .burn-item { margin-top: 8px; }
.burn-item:hover { border-color: var(--bad); text-decoration: none; }
.burn-num { font-weight: 650; color: var(--bad); white-space: nowrap; font-size: 13px; }
.burn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.burn-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.burn-sub { font-size: 12.5px; color: var(--muted); }
.burn-sum { font-weight: 650; white-space: nowrap; }
.burn-go { color: var(--bad); font-weight: 600; white-space: nowrap; font-size: 13px; }
@media (max-width: 720px) {
  .burn-item { flex-wrap: wrap; }
  .burn-main { flex-basis: 100%; order: 2; }
  .burn-main b { white-space: normal; }
  .burn-go { margin-left: auto; }
}
.burn-toast { position: fixed; z-index: 90; top: 72px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 42px 12px 14px; border-radius: 14px; background: var(--bad-fill); color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: burn-in .3s ease-out, burn-toast-glow 2s ease-in-out .3s infinite; }
.burn-toast-ico { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.burn-toast-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.burn-toast-list a { color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 1px; }
.burn-toast-list a b { font-size: 14px; }
.burn-toast-list a span { font-size: 13px; opacity: .93; overflow-wrap: anywhere; }
.burn-toast-list a:hover span { text-decoration: underline; }
.burn-toast-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 4px 7px; opacity: .85; border-radius: 8px; }
.burn-toast-x:hover { opacity: 1; background: rgba(255, 255, 255, .15); }
@keyframes burn-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes burn-toast-glow { 0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 0 color-mix(in srgb, var(--bad) 50%, transparent); }
  50% { box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 0 8px color-mix(in srgb, var(--bad) 0%, transparent); } }
@media (max-width: 720px) { .burn-toast { top: 64px; } }
/* автозаказ: «не продаётся на точке» (supply_dead.py) */
.sup-dead { line-height: 1.55; }
.sup-dead-item { white-space: nowrap; }
tr.muted-row td { opacity: .6; }
/* «руководство — только просмотр» (seeall.py): кнопки отправки скрыты и без скрипта */
body.ro main.content form[method="post"] button, body.ro main.content form[method="POST"] button,
body.ro main.content form[method="post"] input[type=submit] { display: none !important; }
/* страница «Не продаётся на точках»: все ячейки строки — по одной линии, числа — ровным столбцом, кнопка — справа
   (Илья, обращение № 2, 21.11.2026: «выровнять, чтобы это всё красиво выглядело») */
.dead-when .kpi .v { font-variant-numeric: tabular-nums; }
table.t.dead-t th { vertical-align: bottom; }
table.t.dead-t th .t-sub { font-weight: 400; margin-top: 2px; white-space: nowrap; }
table.t.dead-t td { vertical-align: middle; }
table.t.dead-t .num { width: 112px; white-space: nowrap; }
table.t.dead-t .num .u { color: var(--muted); font-size: 12px; margin-left: 4px; }
table.t.dead-t .act { width: 1%; white-space: nowrap; text-align: right; }
table.t.dead-t .act form { display: inline-block; margin: 0; }
/* Илья (22.11.2026): «таблицу неудобно смотреть, сделай разграничение и выравнивай по центру» — на компьютере линии между
   столбцами, шапка и чередование строк; всё по центру, кроме названий позиций (длинные — слева, как в отчётах) */
@media (min-width: 861px) {
  table.t.dead-t th, table.t.dead-t td, table.t.trade.dead-t td.r, table.t.trade.dead-t th.r, table.t.dead-t .act { text-align: center; }
  table.t.dead-t th.l, table.t.dead-t td.l { text-align: left; }
  table.t.dead-t th + th, table.t.dead-t td + td { border-left: 1px solid var(--line); }
  table.t.dead-t thead th { background: var(--soft); border-bottom: 1px solid var(--line); vertical-align: middle; }
  table.t.dead-t tbody tr:nth-child(even) td { background: var(--soft); }
  table.t.dead-t tbody tr:hover td { background: var(--hover); }
  table.t.dead-t td.lead { white-space: nowrap; }
}
@media (max-width: 860px) {
  table.t.dead-t .num { width: auto; }
  table.t.dead-t td.act { width: auto; justify-content: flex-end; padding-top: 8px; }
  table.t.dead-t td.act::before { display: none; }
}
/* приложение на телефон (push.py, app-install.js) */
.app-page { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.app-page h2 { font-size: 16px; margin: 0 0 10px; }
.app-hero { display: flex; gap: 16px; align-items: flex-start; }
.app-hero img { border-radius: 14px; flex: none; }
.app-hero p { margin: 4px 0 0; }
.app-step ol { margin: 8px 0 0; padding-left: 22px; line-height: 1.55; }
.app-step ol li { margin-bottom: 4px; }
.app-step.ok { display: flex; gap: 8px; align-items: center; color: var(--pistachio-ink); background: var(--pistachio); padding: 10px 14px; border-radius: 12px; }
.app-step.ok[hidden] { display: none; }
.app-step .btn.primary { margin-bottom: 6px; }
.app-addr { font-size: 16px; user-select: all; }
.app-status { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: var(--soft-3); font-size: 14px; }
.app-status.ok { background: var(--pistachio); color: var(--pistachio-ink); }
.app-status.warn { background: var(--warn-soft); color: var(--warn-ink); }
.app-devs { display: flex; flex-direction: column; }
.app-dev { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.app-dev:last-child { border-bottom: 0; }
.app-dev .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-dev .grow span { overflow-wrap: anywhere; }
.app-hint { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 10px 10px 12px; border-radius: 14px;
            background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .06)); }
.app-hint[hidden] { display: none; }
.app-hint img { border-radius: 10px; flex: none; }
.app-hint .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.app-hint .grow span { font-size: 12.5px; color: var(--muted); }
.app-hint-x { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
/* «Вас зовут во встречу» — позвали из идущей встречи */
.call-toast { position: fixed; z-index: 91; right: 18px; bottom: 18px; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column;
  gap: 8px; animation: call-in .3s ease-out; }
.call-toast-row { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-radius: 14px; background: var(--panel);
  border: 2px solid var(--olive); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: call-ring 2s ease-in-out .3s infinite; }
.call-toast-ico { width: 22px; height: 22px; flex: none; color: var(--olive); }
.call-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.call-toast-text b { font-size: 14px; }
.call-toast-text span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.call-toast-x { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 7px; border-radius: 8px; }
.call-toast-x:hover { background: var(--soft-3); color: var(--ink); }
@keyframes call-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes call-ring { 0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, .22), 0 0 0 0 color-mix(in srgb, var(--olive) 45%, transparent); }
  50% { box-shadow: 0 10px 30px rgba(0, 0, 0, .22), 0 0 0 8px color-mix(in srgb, var(--olive) 0%, transparent); } }
@media (max-width: 720px) { .call-toast { left: 12px; right: 12px; width: auto; bottom: calc(var(--tabbar-h, 0px) + 12px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .call-toast, .call-toast-row { animation: none; } }
@media (prefers-reduced-motion: reduce) { .chip.burn.on, .burn-note.on, .burn-board, .burn-toast { animation: none; } }

/* «глазик» в поле пароля: показать / скрыть набранное */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { padding-right: 44px; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 42px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; border-radius: 0 9px 9px 0; }
.pw-eye:hover { color: var(--ink); }
.pw-eye[aria-pressed="true"] { color: var(--olive-deep); }
.pw-eye:focus-visible { outline: 2px solid var(--olive); outline-offset: -3px; }

/* ================================================================ Кэшфлоу: план движения денег */
.cf-neg { color: var(--bad); font-weight: 650; }
.cf-pos { color: var(--ok); font-weight: 650; }
.cf-in { color: var(--good-ink); }
table.t.trade tr.cf-low td { background: var(--bad-tint); }
.viz-root .dot.bad { fill: var(--bad); }
.cf-days > details.card + details.card { margin-top: 8px; }
details.cf-day > summary { cursor: pointer; padding: 11px 18px; display: flex; gap: 4px 18px; align-items: baseline; flex-wrap: wrap;
                           list-style: none; }
details.cf-day > summary::-webkit-details-marker { display: none; }
details.cf-day > summary b.d { min-width: 170px; font-weight: 650; }
details.cf-day > summary .grow { flex: 1; }
details.cf-day > summary b { font-variant-numeric: tabular-nums; white-space: nowrap; }
details.cf-day[open] > summary { border-bottom: 1px solid var(--line-2); background: var(--soft); border-radius: var(--radius) var(--radius) 0 0; }
.cf-sum { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; text-align: right; min-width: 110px; }
.cf-sum.in { color: var(--good-ink); }
.cf-edit { margin-top: 5px; }
.cf-edit > summary { cursor: pointer; color: var(--accent-ink); font-size: 12.5px; font-weight: 400; display: inline-block; list-style: none; }
.cf-edit > summary::-webkit-details-marker { display: none; }
.cf-edit > summary:hover { text-decoration: underline; }
.cf-form { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; padding: 10px 12px;
           background: var(--cream-soft); border: 1px solid var(--line-2); border-radius: 9px; font-weight: 400; }
.cf-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.cf-form label.wide { flex: 1 1 180px; }
.cf-form input, table.t.trade .cf-form input { width: auto; max-width: none; padding: 6px 9px; text-align: left; }
.cf-form label.wide input { width: 100%; }
/* платёжный календарь «вправо»: дни — столбцы, платёж — строка с суммой в столбце своей даты */
.cf-wrap { max-height: 78vh; }
table.plan.cf-grid th, table.plan.cf-grid td { min-width: 92px; padding: 6px 8px; }
table.plan.cf-grid th { text-align: right; max-width: none; white-space: nowrap; }
table.plan.cf-grid th span { display: block; font-weight: 400; font-size: 11px; }
table.plan.cf-grid .name { min-width: 250px; max-width: 320px; }
table.plan.cf-grid th.name { text-align: left; }
table.plan.cf-grid td.name a { font-weight: 600; }
table.plan.cf-grid td.name span { display: block; overflow: hidden; text-overflow: ellipsis; }
table.plan.cf-grid .we { background: var(--soft-2); }
table.plan.cf-grid th.we { background: var(--soft-3); }
table.plan.cf-grid .now { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
table.plan.cf-grid tr.sum td { font-weight: 650; background: var(--soft); }
table.plan.cf-grid tr.sum td.we { background: var(--soft-3); }
table.plan.cf-grid tr.sum.end td { border-bottom: 2px solid var(--line); }
table.plan.cf-grid tr.sum td.low { color: var(--bad); background: var(--bad-soft); }
table.plan.cf-grid tr.cat td.name { position: sticky; left: 0; }
table.plan.cf-grid tr.cat td.name span { display: inline; }
table.plan.cf-grid tr.cat td { text-align: right; }
table.plan.cf-grid tr.cat td.name, table.plan.cf-grid tr.cat td[colspan] { text-align: left; }
table.plan.cf-grid td.tot { color: var(--ink-2); }
table.plan.cf-grid td.cf-cell { padding: 3px 4px; }
table.plan.cf-grid td.cf-cell.over { background: var(--pistachio-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cf-chip { display: inline-block; font: inherit; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; color: var(--ink);
           background: var(--cream-soft); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; line-height: 1.35; }
button.cf-chip { cursor: grab; }
button.cf-chip:hover, button.cf-chip:focus-visible { border-color: var(--accent); background: var(--panel); outline: none; }
button.cf-chip:active { cursor: grabbing; }
.cf-chip.rev { border-style: dashed; color: var(--ink-2); font-weight: 500; }
.cf-chip.late { border-color: var(--bad); color: var(--bad); }
.cf-chip.moved { background: var(--pistachio-soft); }
.cf-chip.in { color: var(--good-ink); background: transparent; border-color: var(--line-2); }
.cf-chip.drag { opacity: .45; }
#cfMove { width: min(560px, 94vw); }
/* наличные по точкам: точки — строки, дни — столбцы */
.tl-wrap { max-height: none; }      /* точек немного — таблица видна целиком, прокручивается вся страница */
.tl-head { flex-wrap: wrap; row-gap: 8px; }
.tl-head .tl-seg { margin-left: 12px; }
@media (max-width: 860px) {
  .tl-head .tl-seg { margin-left: 0; font-size: 12.5px; }
  .tl-head .tl-seg a { white-space: normal; text-align: center; line-height: 1.2; padding: 6px 4px; }
}
table.plan.cf-grid.tl-grid th, table.plan.cf-grid.tl-grid td { min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
table.plan.cf-grid.tl-grid .name { min-width: 190px; max-width: 240px; text-align: left; overflow: hidden; text-overflow: ellipsis; }
table.plan.cf-grid.tl-grid td.left { background: var(--warn-soft); color: var(--warn-ink); font-weight: 650; }
table.plan.cf-grid.tl-grid td.neg { color: var(--bad); font-weight: 650; }
table.plan.cf-grid.tl-grid td.live { text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 860px) {
  table.plan.cf-grid.tl-grid .name { min-width: 120px; max-width: 140px; white-space: normal; }
  table.plan.cf-grid.tl-grid th, table.plan.cf-grid.tl-grid td { min-width: 70px; }
}
@media (max-width: 860px) {
  table.plan.cf-grid .name { min-width: 150px; max-width: 170px; white-space: normal; }
  table.plan.cf-grid th, table.plan.cf-grid td { min-width: 84px; }
}
@media (max-width: 860px) {
  details.cf-day > summary { padding: 10px 14px; }
  details.cf-day > summary b.d { min-width: 100%; }
  .cf-sum { min-width: 0; }
  .cf-form label, .cf-form label.wide { flex: 1 1 100%; }
  .cf-form input, table.t.trade .cf-form input { width: 100%; }
}

/* ================================================================ Закупка сырья */
.by-cls { display: inline-flex; align-items: center; gap: 5px; min-width: 26px; justify-content: center; padding: 1px 8px;
          border-radius: 7px; font-weight: 700; font-size: 12.5px; background: var(--chip-bg); color: var(--chip-ink); white-space: nowrap; }
.by-cls.a { background: var(--bad-soft); color: var(--bad); }
.by-cls.b { background: var(--warn-soft); color: var(--warn); }
.by-cls i { font-style: normal; font-weight: 400; font-size: 11px; opacity: .85; }
.lead-note.by-budget { background: var(--warn-soft); border-color: var(--warn-line); }
.by-imp { align-items: start; }
.by-imp > .card + .card { margin-top: 0; }
@media (max-width: 1200px) {
  .by-imp { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ Кадры и табели */
.hr-lock { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: nowrap; }
.hr-lock .ico { width: 14px; height: 14px; }
.lead-note.hr-vault { display: flex; gap: 10px; align-items: center; background: var(--cream-soft); border-color: var(--brand-line); }
.lead-note.hr-vault .ico { color: var(--accent-ink); flex: none; }
.hr-issues { border-left: 4px solid var(--bad); margin-bottom: 14px; }
.hr-issues ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.hr-issues ul a { color: inherit; }
/* табель точки: заголовок раздела (отдела) над его таблицей */
.hr-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 16px 8px; border-top: 1px solid var(--line-2);
          scroll-margin-top: 80px; }
.hr-sec:first-child { border-top: 0; }
.hr-sec b { font-size: 15px; }
.hr-sec-empty { margin: 0; padding: 0 16px 12px; }
.hr-secure { border-left: 4px solid var(--olive); margin-bottom: 16px; }
.hr-code { border: 2px solid var(--warn); margin-bottom: 16px; }
.hr-code-box { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 22px; letter-spacing: .08em; font-weight: 700;
               padding: 14px 18px; background: var(--warn-soft); border-radius: 10px; text-align: center; user-select: all;
               overflow-wrap: anywhere; }
.hr-indent { display: inline-flex; align-items: center; gap: 6px; }
table.plan.hr-grid td, table.plan.hr-grid th { padding: 5px 6px; text-align: center; min-width: 30px; }
table.plan.hr-grid .name { text-align: left; min-width: 190px; max-width: 240px; }
table.plan.hr-grid td.name span { display: block; overflow: hidden; text-overflow: ellipsis; }
table.plan.hr-grid .we { background: var(--soft-2); }
table.plan.hr-grid th.we { background: var(--soft-3); }
table.plan.hr-grid td.bad { background: var(--bad-soft); color: var(--bad); font-weight: 650; }
table.plan.hr-grid td.draft { font-style: italic; color: var(--muted); }
table.plan.hr-grid td.mk-sick { color: var(--blue); }
table.plan.hr-grid td.mk-vac { color: var(--ok); }
table.plan.hr-grid td.mk-absent { color: var(--bad); font-weight: 650; }
table.plan.hr-grid td.u { text-align: center; }
/* табель по ТСО: дни поуже (часы округлены до десятых), первая строка — сколько человек отметилось за день */
table.plan.tso-grid td, table.plan.tso-grid th { padding: 5px 4px; min-width: 34px; }
table.plan.tso-grid td.name, table.plan.tso-grid th.name { padding-left: 10px; padding-right: 8px; }
table.plan.tso-grid tr.sum td { background: var(--soft); font-weight: 650; color: var(--ink-2); }
table.plan.tso-grid tbody tr.sum:hover td { background: var(--soft); }
table.hr-sheet input[type=checkbox] { width: 21px; height: 21px; }
/* табель (02.12.2026): ФИО — в одну строку, «Работал как» — узко, примечание — значком ✎ у ФИО (поле раскрывается в той же
   ячейке), замечания про человека — в его строке, «почему не засчитан» — под «Если не был» */
table.hr-sheet td.lead { min-width: 220px; }
.hr-who { display: flex; align-items: center; gap: 6px; }
.hr-name { white-space: nowrap; }
.hr-note-btn { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid transparent;
               border-radius: 7px; background: transparent; color: var(--faint, var(--muted)); cursor: pointer; }
.hr-note-btn:hover, .hr-note-btn:focus-visible { border-color: var(--line); color: var(--ink-2); background: var(--panel); }
.hr-note-btn.on { color: var(--accent-ink, var(--olive-dark)); }
.hr-note-btn .ico { width: 14px; height: 14px; }
.hr-note { margin-top: 5px; font-weight: 400; }
.hr-note input { width: 100%; min-width: 0; max-width: 360px; padding: 5px 8px; font-size: 13px; }
.hr-flag { margin-top: 4px; font-size: 12.5px; font-weight: 400; color: var(--bad); max-width: 420px; }
.hr-flag > summary { cursor: pointer; list-style: none; display: inline; white-space: normal; }
.hr-flag > summary::-webkit-details-marker { display: none; }
.hr-flag > summary::before { content: "!"; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 5px;
                             border-radius: 50%; background: var(--bad-fill, var(--bad)); color: #fff; font-size: 10.5px; font-weight: 800;
                             vertical-align: 1px; }
/* раскрыто — на месте короткого текста полный; ещё нажатие по нему — снова коротко (заголовок не прячем: им и сворачивают) */
.hr-flag:not([open]) .hr-flag-full, .hr-flag[open] .hr-flag-s { display: none; }
.hr-flag-full { color: var(--bad); white-space: normal; }
.hr-flag.acc, .hr-flag.acc .hr-flag-full { color: var(--muted); }
.hr-flag.acc > summary::before { background: var(--muted); }
/* предупреждение (03.12.2026: в табеле часов меньше, чем по ТСО) — мягче замечания: янтарный, а не красный */
.hr-flag.warn, .hr-flag.warn .hr-flag-full { color: var(--warn-ink); }
.hr-flag.warn > summary::before { background: var(--warn-fill); }
.hr-warns { border-left: 4px solid var(--warn); margin-bottom: 14px; }
.hr-warns h2 { color: var(--warn-ink); }
.hr-warns ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.hr-warns ul a { color: inherit; }
.hr-warns a.hr-goto { text-decoration: underline dotted; text-underline-offset: 3px; }
.hr-warns a.hr-goto::after { content: " ↓"; color: var(--muted); }
table.hr-sheet tr.hr-has-warn td.lead { box-shadow: inset 3px 0 0 var(--warn-line); }
.hr-warn-sub { color: var(--warn-ink); }
.hr-why-note { margin-top: 3px; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.hr-why-note::before { content: "◦ "; color: var(--muted); }
table.hr-sheet tr.hr-has-issue td.lead { box-shadow: inset 3px 0 0 var(--bad); }
table.hr-sheet select.hr-mark { width: auto; min-width: 120px; }
table.hr-sheet select.hr-pos { width: 150px; max-width: 150px; text-overflow: ellipsis; }
table.hr-sheet input.hr-hours { max-width: 70px; }
.hr-why { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; }
.hr-why select { width: auto; max-width: 220px; }
.hr-why input { max-width: 220px; padding: 5px 8px; font-size: 13px; }
.hr-why-add { display: block; margin: 4px auto 0; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px;
              text-decoration: underline dotted; cursor: pointer; }
.hr-why-add:hover { color: var(--ink-2); }
.hr-whys ul { margin: 6px 0 0; padding-left: 20px; }
.lead-note.hr-before { background: var(--warn-soft); border-color: var(--warn-line, var(--line)); }
/* строка, к которой перешли из замечания: подсвечивается на несколько секунд */
@keyframes hrHit { 0%, 45% { background-color: var(--warn-soft); } 100% { background-color: transparent; } }
table.hr-sheet tr.hr-hit td, table.t tr.hr-hit td { animation: hrHit 3.8s ease-out; }
table.hr-sheet tr.hr-hit td.lead { box-shadow: inset 4px 0 0 var(--warn); }
table.hr-sheet tr { scroll-margin-top: 90px; }
.hr-issues a.hr-goto { text-decoration: underline dotted; text-underline-offset: 3px; }
.hr-issues a.hr-goto::after { content: " ↓"; color: var(--muted); }
table.plan.hr-grid td.why { text-decoration: underline dotted; text-underline-offset: 3px; }
.hr-set .field { max-width: 720px; }
.hr-watchers { display: flex; flex-direction: column; gap: 6px; align-items: stretch; max-width: 520px; }
table.t.trade.hr-rates th { white-space: normal; min-width: 58px; max-width: 96px; padding-left: 6px; padding-right: 6px; }
table.t.trade.hr-rates td { padding-left: 6px; padding-right: 6px; }
table.t.trade.hr-rates input { max-width: 58px; padding: 6px 6px; }
@media (max-width: 860px) {
  .hr-code-box { font-size: 17px; }
  /* табель на телефоне: сотрудник — карточка, поля в две колонки, чтобы на экран помещалось больше людей */
  table.t.stack.hr-sheet tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: start; }
  table.t.stack.hr-sheet td.lead { grid-column: 1 / -1; min-width: 0; }
  table.t.stack.hr-sheet td { padding: 0; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; }
  table.t.stack.hr-sheet td select, table.t.stack.hr-sheet td input:not([type=checkbox]) { width: 100% !important; max-width: none !important;
                                                                                         min-width: 0 !important; text-align: left; }
  table.t.stack.hr-sheet td .check { min-height: 38px; }
  table.t.stack.hr-sheet input[type=checkbox] { width: 26px; height: 26px; }
  table.t.stack.hr-sheet .hr-name { white-space: normal; }
  table.t.stack.hr-sheet .hr-note-btn { width: 34px; height: 34px; margin-left: auto; }
  table.t.stack.hr-sheet .hr-why-add { margin: 2px 0 0; text-align: left; font-size: 13px; }
  /* выбор «почему не засчитан» открыт — «Если не был» на всю ширину карточки, чтобы причина читалась целиком */
  table.t.stack.hr-sheet td.hr-c-off:has(> .hr-why:not([hidden])) { grid-column: 1 / -1; }
  table.t.stack.hr-sheet tr.hr-has-issue { box-shadow: inset 3px 0 0 var(--bad); }
  table.t.stack.hr-sheet tr.hr-has-issue td.lead { box-shadow: none; }
  table.t.stack.hr-sheet tr.hr-has-warn { box-shadow: inset 3px 0 0 var(--warn-line); }
  table.t.stack.hr-sheet tr.hr-has-warn td.lead { box-shadow: none; }
  table.t.stack.hr-sheet tr.hr-hit { animation: hrHit 3.8s ease-out; box-shadow: inset 4px 0 0 var(--warn); }
  table.t.stack.hr-sheet tr.hr-hit td, table.t.stack.hr-sheet tr.hr-hit td.lead { animation: none; box-shadow: none; }
}

/* ---------------------------------------------------------------- архив договоров */
a.kpi { display: block; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--olive); }
.ct-file { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.ct-file:last-of-type { border-bottom: 0; }
.ct-file .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ct-file .ct-ico { color: var(--accent-ink); display: inline-flex; flex: none; }
.ct-kv { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13.5px; }
.ct-kv dt { color: var(--muted); }
.ct-kv dd { margin: 0; overflow-wrap: anywhere; }
.ct-up { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13.5px; }
.ct-up li { padding: 6px 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; color: var(--muted); }
.ct-up li.ok { color: var(--ink); }
.ct-up li.bad { color: var(--bad); }
/* переключатель компаний: названия длинные — на узком экране переносим на несколько строк */
.seg.ct-seg { flex-wrap: wrap; max-width: 100%; }
.seg.ct-seg a { white-space: nowrap; }
@media (max-width: 760px) {
  .seg.ct-seg a { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .ct-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ct-kv dd { margin-bottom: 8px; }
  .ct-file { flex-wrap: wrap; }
}

/* договоры на странице служебной записки */
.ct-party + .ct-party { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.ct-party-name { font-weight: 650; margin-bottom: 4px; overflow-wrap: anywhere; }
.ct-deal { display: flex; align-items: center; gap: 10px; padding: 5px 0; min-width: 0; flex-wrap: wrap; }
.ct-deal .grow { flex: 1; min-width: 200px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- таблицы показателей на любом экране
   На среднем экране (ноутбук, окно рядом с чатом) широкая таблица точек не уезжает за край: менее важные столбцы
   прячутся по мере сужения. На узком экране строка становится карточкой, где каждое число стоит под своей подписью. */
#outlets .table-wrap { container-type: inline-size; }
table.t.trade th a.sortable { cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
table.t.trade th a.sortable.on { border-bottom-color: var(--ink); }
@media (min-width: 861px) {
  @container (max-width: 920px) { #outlets .c-checks { display: none; } }
  @container (max-width: 815px) { #outlets .c-need { display: none; } }
  @container (max-width: 740px) { #outlets .c-plan { display: none; } }
  @container (max-width: 660px) { #outlets .c-be { display: none; } }
}
@media (max-width: 860px) {
  table.t.stack.stack-grid tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; align-items: start; }
  table.t.stack.stack-grid td { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; padding: 0; text-align: left; }
  table.t.trade.stack.stack-grid td.r { text-align: left; }
  table.t.stack.stack-grid td.lead { grid-column: 1 / -1; }
  table.t.stack.stack-grid td::before { font-size: 11.5px; }
}
@media (max-width: 520px) {
  table.t.stack.stack-grid tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* сообщение после сохранения, когда страница вернулась на прежнее место, а не в начало. По центру — полями auto, а не
   transform: анимация появления .flash (drop) задаёт свой transform и сдвигала сообщение вправо, за край экрана на
   ноутбуке и телефоне (проверка 03.12.2026). Нажатие на него закрывает его (app.js) — отсюда указатель-«рука» */
.flash.flash-float { position: fixed; top: 70px; left: 0; right: 0; width: fit-content; z-index: 95; max-width: min(720px, 92vw);
                     box-shadow: var(--shadow); margin: 0 auto; cursor: pointer; }

/* ---------------------------------------------------------------- разбор точки и расчёт безубыточности */
.rv-pick { width: auto; max-width: 240px; padding: 7px 10px; }
.two.rv-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two.rv-two.rv-in { gap: 0; }
.two.rv-two.rv-in > .table-wrap + .table-wrap { border-left: 1px solid var(--line-2); }
.rv-set { border: 0; padding: 0; margin: 0; min-width: 0; }
table.rv-costs input.txt { min-width: 150px; width: 100%; }
table.rv-costs select { width: 100%; min-width: 150px; }
table.rv-costs td.r input { width: 130px; }
table.rv-costs tr.rv-new td { background: var(--soft-2); }
.rv-pcts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--line-2); }
.rv-pcts .field { margin: 0; }
.rv-be-big { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; }
.rv-be-big span { font-family: inherit; font-size: 16px; color: var(--muted); font-weight: 400; }
.rv-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.rv-steps ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.rv-if { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rv-notes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv-notes li { position: relative; padding-left: 20px; }
.rv-notes li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.rv-notes li.bad::before { background: var(--bad-fill); }
.rv-notes li.warn::before { background: var(--warn-fill); }
.rv-notes li.good::before { background: var(--ok-fill); }
.rv-legend { display: inline-flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.rv-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--series-fact); display: inline-block; margin-left: 8px; }
.rv-legend i.bad { background: var(--bad-fill); }
.rv-legend i.be { width: 18px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--ink-2); }
.rv-months { display: flex; align-items: flex-end; gap: 6px; height: 230px; }
.rv-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.rv-val { text-align: center; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; min-height: 16px; white-space: nowrap; }
.rv-track { position: relative; flex: 1; min-height: 0; border-bottom: 1px solid var(--line-strong); }
.rv-fill { position: absolute; left: 12%; right: 12%; bottom: 0; background: var(--series-fact); border-radius: 4px 4px 0 0; min-height: 2px; }
.rv-col.bad .rv-fill { background: var(--bad-fill); }
.rv-col.part .rv-fill { opacity: .5; }
.rv-col.cur .rv-lab { font-weight: 700; color: var(--ink); }
.rv-be { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--ink-2); }
.rv-lab { text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rv-wd { display: grid; grid-template-columns: 26px minmax(0, 1fr) 84px 52px; align-items: center; gap: 10px; padding: 5px 0; }
.rv-wd-name { color: var(--ink-2); font-weight: 600; }
.rv-wd-track { height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.rv-wd-track i { display: block; height: 100%; background: var(--series-plan); border-radius: 6px; }
.rv-wd.good .rv-wd-track i { background: var(--ok-fill); }
.rv-wd.bad .rv-wd-track i { background: var(--bad-fill); }
.rv-wd-val, .rv-wd-idx { text-align: right; white-space: nowrap; }
table.t.trade tr.rv-sep td { background: var(--soft); font-size: 12px; font-weight: 650; color: var(--ink-2); padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 1100px) {
  .two.rv-two { grid-template-columns: minmax(0, 1fr); }
  .two.rv-two.rv-in > .table-wrap + .table-wrap { border-left: 0; border-top: 1px solid var(--line-2); }
}
@media (max-width: 700px) {
  .rv-pcts { grid-template-columns: minmax(0, 1fr); }
  .rv-months { gap: 2px; height: 190px; }
  .rv-val { font-size: 10px; }
  .rv-lab { font-size: 10px; }
  .rv-wd { grid-template-columns: 24px minmax(0, 1fr) 72px 46px; gap: 6px; }
  .rv-be-big { font-size: 28px; }
}

/* ---------------------------------------------------------------- отчёты по продажам (trade_reports) */
.rp-seg { margin-bottom: 14px; flex-wrap: wrap; max-width: 100%; }
.rp-seg a { white-space: nowrap; }
.rp-filters { display: flex; gap: 0 14px; flex-wrap: wrap; align-items: flex-start; }
/* «Факторный анализ»: выбор точки (вся сеть или одна, trade_compare.factors_scope) — в одной строке с отборами */
.rp-where { display: flex; gap: 0 14px; flex-wrap: wrap; align-items: flex-start; }
.rp-where .rv-pick { margin-bottom: 14px; }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-bottom: 16px; }
.rp-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); min-width: 0; }
.rp-card:hover { text-decoration: none; border-color: var(--line-hover); }
.rp-card-head { display: flex; align-items: center; gap: 10px; }
.rp-card-head .ico { width: 22px; height: 22px; color: var(--brand); flex: none; }
.rp-card h2 { margin: 0; font-size: 17px; }
.rp-q { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.rp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.rp-facts b { display: block; font-size: 21px; font-weight: 650; white-space: nowrap; letter-spacing: -.01em; }
.rp-facts span { font-size: 12.5px; color: var(--muted); }
.rp-when { font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.rp-open { color: var(--brand); font-weight: 600; font-size: 13.5px; }
.rp-how ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
/* «мост»: из чего сложилось изменение — плашки по шагам */
.rp-bridge { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.rp-step { flex: 1 1 140px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rp-step.end { background: var(--brand-tint); border-color: var(--brand-line); }
.rp-step .l { font-size: 12.5px; color: var(--muted); }
.rp-step .v { font-size: 20px; font-weight: 650; white-space: nowrap; margin: 2px 0; }
.rp-step .v.up { color: var(--good-ink); }
.rp-step .v.down { color: var(--bad); }
.rp-step .s { font-size: 12.5px; color: var(--ink-2); }
.rp-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 10px; font-size: 12px; line-height: 1.5;
          background: var(--chip-bg); color: var(--chip-ink); margin: 1px 4px 1px 0; }
.rp-tag.bad { background: var(--bad-soft); color: var(--bad-ink); }
.rp-tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.rp-tag.good { background: var(--ok-soft); color: var(--ok-ink); }
/* отчёты: числа и подписи столбцов — по центру, первый столбец (названия) — слева (просьба Ильи: «чтобы цифры стояли
   по центру, а не где-то справа, где-то слева»). На телефоне таблицы-карточки (stack) выравниваются по-своему. */
@media (min-width: 861px) {
  table.t.rpt th, table.t.rpt td, table.t.trade.rpt td.r, table.t.trade.rpt th.r { text-align: center; }
  table.t.rpt th:first-child, table.t.rpt td:first-child, table.t.rpt td.l, table.t.rpt th.l { text-align: left; }
  table.t.rpt td .rp-tag { margin-right: 0; }
  table.t.rpt td .rp-gaps, table.t.rpt td.rp-gaps { justify-content: center; }
}
table.t.rpt td .rp-bar { vertical-align: middle; }
/* выбор периода: кнопка с календарём открывает окно — готовые периоды, два месяца, поля «с — по» (trade.js) */
.rpk { position: relative; display: inline-flex; }
.rpk-open { gap: 7px; white-space: nowrap; }
.rpk-open.on { border-color: var(--olive); box-shadow: 0 0 0 2px var(--pistachio-soft); font-weight: 600; }
.rpk-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; display: grid; grid-template-columns: 172px auto;
           background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
           padding: 12px; gap: 0 14px; width: max-content; max-width: calc(100vw - 24px); }
.rpk-pop[hidden] { display: none; }
/* отчёт «Сотрудники»: выбор должностей — кнопка открывает окно с готовыми наборами и галочками (trade.js) */
.pos-pick { position: relative; }
.pos-pick > summary { list-style: none; cursor: pointer; gap: 7px; white-space: nowrap; }
.pos-pick > summary::-webkit-details-marker { display: none; }
.pos-pick > summary.on { border-color: var(--olive); box-shadow: 0 0 0 2px var(--pistachio-soft); font-weight: 600; }
.pos-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 440px; max-width: calc(100vw - 32px);
           background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
           padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pos-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pos-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; }
.pos-list label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.pos-list label:hover { background: var(--bg); }
.pos-list .grow, .pos-act .grow { flex: 1; }
/* «Кто на точке»: под должностью — сколько людей и смен и почему по правилу не считается */
.pos-list .t-sub { display: block; }
.onsite-pop .pos-list label { align-items: flex-start; }
.onsite-pop .pos-list input[type="checkbox"] { margin-top: 3px; }
.pos-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.staff-mix .mix-kpi td.lead { font-weight: 500; }
.seg.wrap-seg { flex-wrap: wrap; max-width: 100%; }
.staff-filters { position: relative; }
.staff-filters.pos-show { z-index: 9; }      /* окно «Должности» или «Кто на точке» открыто — над таблицей ниже (trade.js) */
/* «Сотрудники»: выбор точки (вся сеть или одна) — в одной строке с видом точек; у сотрудника — строка точки, из которой пришли */
.staff-where { display: flex; gap: 0 14px; flex-wrap: wrap; align-items: flex-start; }
.staff-where .rv-pick { margin-bottom: 14px; }
table.t.trade tr.staff-here td { background: var(--pistachio-soft); }
/* на телефоне окно должностей — во всю ширину строки отборов (у строки своя анимация, поэтому не «fixed») */
@media (max-width: 640px) {
  .pos-pick { position: static; }
  .pos-pop { left: 0; right: 0; top: auto; margin-top: 6px; width: auto; max-width: none; }
  .pos-list { max-height: 42vh; }
}
/* блоки страницы появляются с анимацией (у каждого свой слой, более поздние рисуются поверх): пока окно открыто,
   панель периода поднимается над соседями; её анимация после первого открытия выключена */
.trade-bar.rpk-still { animation: none; transform: none; }
.trade-bar.rpk-show { position: relative; z-index: 9; }      /* ниже шапки (у неё 10): при прокрутке окно уходит под неё */
.rpk-presets { display: flex; flex-direction: column; gap: 2px; grid-row: 1 / span 2; border-right: 1px solid var(--line-2); padding-right: 12px; }
.rpk-preset { text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit;
              font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.rpk-preset:hover { background: var(--bg); }
.rpk-preset.on { background: var(--pistachio); color: var(--pistachio-ink); font-weight: 600; }
.rpk-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rpk-hint { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); }
.rpk-arrow { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink-2);
             cursor: pointer; font: inherit; }
.rpk-arrow:hover:not(:disabled) { background: var(--bg); }
.rpk-arrow:disabled { opacity: .35; cursor: default; }
.rpk-months { display: flex; gap: 18px; }
.rpk-mname { display: block; width: 100%; border: 0; background: none; font: inherit; font-weight: 650; color: var(--ink); padding: 5px 0 7px;
             border-radius: 8px; cursor: pointer; }
.rpk-mname:hover { background: var(--bg); }
.rpk-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px 0; justify-items: stretch; }
.rpk-wd { text-align: center; font-size: 11.5px; color: var(--muted); padding: 2px 0 4px; }
.rpk-wd.we { color: var(--warn); }
.rpk-day { height: 32px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; border-radius: 8px;
           font-variant-numeric: tabular-nums; }
.rpk-day.we { color: var(--ink-2); }
.rpk-day:hover:not(:disabled) { background: var(--bg); }
.rpk-day:disabled { color: var(--muted); opacity: .45; cursor: default; }
.rpk-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.rpk-day.in { background: var(--pistachio-soft); border-radius: 0; color: var(--ink); }
.rpk-day.a { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.rpk-day.b { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.rpk-day.a, .rpk-day.b { background: var(--olive); color: #fff; font-weight: 650; }
.rpk-foot { grid-column: 2; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.trade-bar.rpk-on .rpk-foot .period { border: 0; padding: 0; background: none; box-shadow: none; width: auto; }
@media (max-width: 720px) {
  .trade-bar.rpk-show { z-index: 60; }           /* на телефоне окно — шторка снизу, поверх всего */
  .rpk { display: flex; width: 100%; }
  .rpk-open { flex: 1; justify-content: center; }
  .rpk-pop { position: fixed; left: 8px !important; right: 8px; top: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); grid-template-columns: minmax(0, 1fr);
             width: auto; max-height: calc(100vh - 150px); overflow: auto; }
  .rpk-presets { grid-row: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-2); padding: 0 0 8px;
                 margin-bottom: 8px; }
  .rpk-preset { border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; font-size: 13px; }
  .rpk-foot { grid-column: 1; }
  .rpk-months { justify-content: center; }
  .rpk-months .rpk-month:first-child { display: none; }
  .rpk-grid { grid-template-columns: repeat(7, minmax(36px, 1fr)); }
  .rpk-day { height: 38px; }
}
/* переключатель показателя в отчёте («чеки / выручка / средний чек») и то, что он прячет */
[data-m][hidden] { display: none !important; }
.seg.rp-switch { padding: 2px; }
.seg.rp-switch a { padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* справочник точек: особенности точки (галочки) под её видом */
.o-marks { margin-top: 5px; font-size: 12.5px; }
.o-marks summary { cursor: pointer; color: var(--muted); }
.o-marks[open] summary { margin-bottom: 3px; }
.o-marks .check { gap: 6px; margin: 3px 0; white-space: nowrap; }
.o-marks .check.wrap { white-space: normal; align-items: flex-start; max-width: 260px; text-align: left; }   /* длинная подпись — переносом */
.o-marks .check.wrap input { flex: none; margin-top: 2px; }
/* особенности точки под её названием: «себестоимость исправлена», «социальный проект» */
.rp-marks { margin-top: 4px; display: flex; flex-wrap: wrap; white-space: normal; }
.rp-marks .rp-tag { font-size: 11.5px; padding: 1px 8px; cursor: help; }
.rp-abc { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11.5px;
          font-weight: 700; background: var(--chip-bg); color: var(--chip-ink); margin-right: 6px; }
.rp-abc.a { background: var(--pistachio); color: var(--pistachio-ink); }
.rp-bar { display: inline-block; width: 72px; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.rp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--series-fact); }
.rp-bar.warn i { background: var(--warn-fill); }
.rp-bar.bad i { background: var(--bad-fill); }
/* факторный анализ: «мост» от выручки периода сравнения к выручке этого периода — шаги на общей шкале от нуля */
.fx-wf { display: grid; gap: 2px; }
.fx-row { display: grid; grid-template-columns: minmax(0, 320px) minmax(120px, 1fr) 108px; gap: 4px 14px; align-items: center; padding: 7px 10px; border-radius: 10px; }
.fx-row.tot { background: var(--soft); }
.fx-l { min-width: 0; }
.fx-l b { font-weight: 600; }
.fx-l .t-sub { white-space: normal; line-height: 1.35; }
.fx-track { position: relative; height: 24px; border-left: 1px solid var(--line-strong); }
.fx-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; min-width: 3px; }
.fx-bar.up, .rv-legend i.fx-up { background: var(--ok-fill); }
.fx-bar.down, .rv-legend i.fx-down { background: var(--bad-fill); }
.fx-bar.tot, .rv-legend i.fx-tot { background: var(--series-plan); }
/* шкала начинается не с нуля: у полос «было» и «стало» слева разрыв, ось слева — пунктиром */
.fx-wf.cut .fx-track { border-left-style: dashed; }
.fx-wf.cut .fx-bar.tot { border-radius: 0 4px 4px 0; -webkit-mask: linear-gradient(105deg, #000 0 10px, transparent 10px 15px, #000 15px); mask: linear-gradient(105deg, #000 0 10px, transparent 10px 15px, #000 15px); }
.fx-v { text-align: right; font-weight: 650; white-space: nowrap; }
.fx-v.up { color: var(--good-ink); }
.fx-v.down { color: var(--bad); }
table.t.fx-t td.lead .rp-tag { margin-left: 6px; }
@media (max-width: 760px) {
  .fx-row { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 6px; }
  .fx-track { grid-column: 1 / -1; order: 3; height: 16px; }
}
/* служебные записки одним списком: переключатель разделов над таблицей и пометка «ждёт вас» */
.seg.memo-seg { flex-wrap: wrap; max-width: 100%; margin-bottom: 14px; }
.seg.memo-seg a { white-space: nowrap; }
.seg.memo-seg .n { font-size: 11.5px; font-weight: 700; background: var(--cream); color: var(--olive-ink); padding: 0 6px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.memo-mode { margin: 0; }
.chip.wait { background: var(--warn-soft); color: var(--warn-ink); }
@media (max-width: 860px) { .seg.memo-seg a { flex: 1 1 auto; } }
/* общие расходы компании (цех, офис): таблица ввода */
table.t.shared-t input[data-money] { max-width: 150px; }
table.t.shared-t input.sh-name { width: 100%; min-width: 180px; }
table.t.shared-t select { max-width: 230px; }
.sh-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.sh-sum b { font-weight: 650; }
table.t.trade tr.rp-apart td { color: var(--muted); }
table.t.trade tr.rp-sum td { background: var(--soft); font-weight: 600; }
/* «Фудкост»: точки, которые не входят в фудкост сети (обращение № 23), — строками сразу под итогом сети, обычным шрифтом */
table.t tfoot tr.fc-apart td { font-weight: 400; background: none; border-top: 0; }
table.t tfoot tr.fc-apart-h td { font-weight: 600; background: none; color: var(--muted); font-size: 12.5px; padding-top: 12px; }
.lead-note.fc-apart-line { padding: 8px 14px; font-size: 13.5px; }
/* ячейки «к прошлому году» и «к обычному дню»: число есть всегда, цвет только усиливает */
table.t.trade td.hc-n3 { background: var(--bad-soft); color: var(--bad-ink); font-weight: 650; }
table.t.trade td.hc-n2 { background: var(--bad-tint); color: var(--bad); }
table.t.trade td.hc-n1 { color: var(--bad); }
table.t.trade td.hc-p1 { color: var(--good-ink); }
table.t.trade td.hc-p2 { background: var(--ok-soft); color: var(--ok-ink); font-weight: 650; }
table.t.trade td.hc-x { color: var(--faint); }
table.t.trade.rp-yy th, table.t.trade.rp-yy td, table.t.trade.rp-wd th, table.t.trade.rp-wd td { padding-left: 7px; padding-right: 7px; }
table.t.trade.rp-yy th .t-sub { font-weight: 400; }
/* столбцы «год назад — сейчас» рядом и второй цвет столбцов */
.rv-fill.plan, .rv-legend i.plan { background: var(--series-plan); }
.rv-col.duo .rv-fill { left: 8%; right: 52%; background: var(--series-plan); }
.rv-col.duo .rv-fill.cur { left: 48%; right: 8%; background: var(--series-fact); }
.rv-val.down { color: var(--bad); }
.rv-val.up { color: var(--good-ink); }
.rv-months.rp-weeks { height: 190px; }
@media (max-width: 860px) {
  .rp-cards { grid-template-columns: minmax(0, 1fr); }
  .rp-seg a .ico { display: none; }
  .rp-step { flex-basis: 46%; }
  .rp-step .v { font-size: 18px; }
}

/* ---------------------------------------------------------------- оборудование */
.as-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }

/* ---------------------------------------------------------------- встречи: список, карточка, протокол */
table.mt-list tr.mt-day td { background: var(--soft); font-weight: 650; font-size: 12.5px; color: var(--ink-2); padding: 7px 16px; }
.btn.copied { color: var(--ok); border-color: var(--ok-line); }
.mt-reply { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; border-color: var(--line-hover); background: var(--brand-tint); }
.mt-reply .grow { flex: 1; min-width: 200px; }
.mt-body { padding-bottom: 18px; }
.mt-sub { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px;
          display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt-sub .st { text-transform: none; letter-spacing: 0; font-weight: 500; white-space: normal; }
.mt-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.mt-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mt-num { color: var(--muted); min-width: 22px; font-variant-numeric: tabular-nums; }
.mt-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.mt-add input[name=text] { flex: 1 1 260px; width: auto; }
.mt-add select { width: auto; max-width: 200px; flex: 0 1 auto; }
.mt-add input[type=date] { width: auto; }
.mt-add input[name=assignee_name] { width: 160px; }
.mt-final { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 18px; padding-top: 14px;
            border-top: 1px solid var(--line-2); }
.mt-draft { border: 1px dashed var(--line-hover); background: var(--brand-tint); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.mt-draft-head { margin-bottom: 8px; }
.mt-draft .mt-sub { margin-top: 12px; }
.mt-ol { margin: 0; padding-left: 22px; }
.mt-ol li { margin: 3px 0; overflow-wrap: anywhere; }
.mt-rec { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mt-rec-head { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; }
.mt-rec-head b { overflow-wrap: anywhere; }
.mt-rec-head .grow { flex: 1; }
.mt-rec audio { width: 100%; margin-top: 8px; height: 38px; }
.mt-rec video { width: 100%; max-height: 420px; margin-top: 8px; border-radius: 8px; background: var(--room-tile); }
.mt-tr { margin-top: 6px; }
.mt-tr details > summary { cursor: pointer; color: var(--accent-ink); }
.mt-tr-text { max-height: 420px; overflow-y: auto; margin-top: 8px; padding: 12px 14px; background: var(--soft-2); border: 1px solid var(--line-2);
              border-radius: 8px; font-size: 13.5px; }
.mt-people { padding: 6px 20px 12px; }
.mt-person { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.mt-person:last-child { border-bottom: 0; }
.mt-person .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.avatar.mt-guest { background: var(--soft-3); color: var(--ink-2); }
.mt-link { display: flex; gap: 6px; }
.mt-link input { flex: 1; min-width: 0; font-size: 12.5px; }
@media (max-width: 560px) {
  .mt-add select, .mt-add input[type=date], .mt-add input[name=assignee_name] { flex: 1 1 140px; max-width: none; }
  .mt-item { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- видеокомната: отдельная страница без меню */
.room { min-height: 100vh; min-height: 100dvh; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--room-bg); }
.room-top { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 52px; }
.room-top .grow { flex: 1; }
.room-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.room-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-title span { font-size: 12px; color: var(--muted); }
.room-clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.room-rec { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 20px; background: var(--bad-soft); color: var(--bad-ink);
            font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.room-rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--bad-fill); animation: rec-blink 1.4s infinite; flex: none; }
@keyframes rec-blink { 50% { opacity: .25; } }
.room-lobby { flex: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px); gap: 28px; align-items: center; padding: 28px;
              max-width: 1180px; width: 100%; margin: 0 auto; overflow-y: auto; }
.lobby-view { position: relative; aspect-ratio: 16 / 9; background: var(--room-tile); border-radius: 16px; overflow: hidden; }
.lobby-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lobby-view video.flip, .fx-preview video.flip { transform: scaleX(-1); }   /* камера без эффектов — как в зеркале */
.lobby-off { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
             color: var(--room-tile-ink); opacity: .75; }
.lobby-off .ico { width: 42px; height: 42px; }
.lobby-ctl { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.lobby-level { width: 70px; height: 6px; border-radius: 3px; background: var(--room-line); overflow: hidden; }
.lobby-level i { display: block; height: 100%; width: 0; background: var(--room-talk); transition: width .1s; }
.lobby-side h1 { margin-bottom: 6px; overflow-wrap: anywhere; }
.lobby-side .btn.lg { width: 100%; justify-content: center; margin-top: 4px; }
.room-msg { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; overflow-y: auto; }
.room-msg .card { max-width: 520px; width: 100%; }
.room-msg h1 { margin-bottom: 10px; overflow-wrap: anywhere; }
.room [hidden] { display: none !important; }
.room-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.room-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--olive); animation: rec-blink 1.2s infinite; }
.room-dots i:nth-child(2) { animation-delay: .2s; }
.room-dots i:nth-child(3) { animation-delay: .4s; }
.room-stage { flex: 1; display: flex; min-height: 0; padding: 12px; gap: 12px; }
.tiles { flex: 1; display: grid; gap: 10px; min-height: 0; min-width: 0; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
         grid-auto-rows: minmax(0, 1fr); }
.tiles.n2, .tiles.n3, .tiles.n4 { --cols: 2; }
.tiles.n5, .tiles.n6, .tiles.n7, .tiles.n8, .tiles.n9 { --cols: 3; }
.tiles.n10, .tiles.n11, .tiles.n12 { --cols: 4; }
.tile { position: relative; background: var(--room-tile); border-radius: 14px; overflow: hidden; min-height: 0; cursor: pointer;
        outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.tile.talk { outline-color: var(--room-talk); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.tile.mirror video { transform: scaleX(-1); }
.tile.sharing video, .tile.big video { object-fit: contain; }
.tile.no-video video { visibility: hidden; }
.tile-ava { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: clamp(22px, 5vw, 46px);
            font-weight: 650; color: var(--room-tile-ink); }
.tile.no-video .tile-ava { display: flex; }
.tile-cap { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); display: inline-flex; align-items: center; gap: 6px;
            padding: 3px 9px; border-radius: 8px; background: var(--room-cap); color: var(--room-tile-ink); font-size: 12.5px; }
.tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-mic { display: inline-flex; color: var(--room-off); }
.tile-mic .ico { width: 14px; height: 14px; }
.tile-state { position: absolute; top: 8px; left: 10px; right: 10px; font-size: 12px; color: var(--room-tile-ink); opacity: .85; }
.tiles.focus { grid-template-columns: minmax(0, 1fr) 190px; grid-template-rows: repeat(var(--rows, 1), minmax(0, 118px)) minmax(0, 1fr); grid-auto-rows: auto; }
.tiles.focus .tile.big { grid-column: 1; grid-row: 1 / -1; }
/* два закреплённых докладчика рядом, остальные — полосой справа */
.tiles.focus2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 190px; }
.tiles.focus2.n2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tiles.focus2 .tile.b1 { grid-column: 1; grid-row: 1 / -1; }
.tiles.focus2 .tile.b2 { grid-column: 2; grid-row: 1 / -1; }
/* показ экрана — своей плиткой «Экран — имя»; плитка с камерой того, кто показывает, — первой в полосе (обращение № 21) */
.tile.screen video { object-fit: contain; }
.tiles.focus .tile.presenter { order: -1; }
.tile-pin { position: absolute; top: 8px; right: 8px; display: none; padding: 2px 8px; border-radius: 8px; background: var(--room-cap);
            color: var(--room-tile-ink); font-size: 11.5px; pointer-events: none; }
.tile.pinned .tile-pin { display: inline-block; }
.room-side { width: 300px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow-y: auto; padding: 0 0 8px; }
/* шапка списка: «Участники», число в кружке (как счётчики в левом меню) и крестик; «Пригласить» — строкой ниже во всю ширину;
   свободно 1–2 места — жёлтая строка, мест нет — красная (обращение № 20) */
.room-side-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--line-2); }
.room-side-head b { font-size: 15px; white-space: nowrap; }
.room-side-head .icon-btn { margin-left: auto; }
.room-count { flex: none; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--cream); color: var(--olive-ink); font-size: 11px;
              font-weight: 700; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default; }
.room-count:empty { display: none; }
.room-side-act { padding: 10px 14px 2px; }
.room-side-act .btn { width: 100%; justify-content: center; }
.room-seats { margin: 8px 14px 2px; padding: 7px 11px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12.5px;
              line-height: 1.4; white-space: pre-line; }
.room-seats.full { background: var(--bad-soft); color: var(--bad-ink); }
.rp { display: flex; align-items: center; gap: 9px; padding: 8px 14px; min-width: 0; }
.rp .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rp .grow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp .grow span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp .ico { width: 15px; height: 15px; color: var(--muted); flex: none; }
.rp .muted-ico { color: var(--bad); }
.rp.wait { background: var(--warn-soft); flex-wrap: wrap; }
.rp-head { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--warn-ink); padding: 10px 14px 4px;
           background: var(--warn-soft); }
.room-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--panel);
            border-top: 1px solid var(--line); flex-wrap: wrap; }
.room-bar .grow { flex: 1; min-width: 0; }
.rbtn { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; padding: 7px 10px 6px;
        border-radius: 12px; border: 1px solid transparent; background: var(--soft-3); color: var(--ink); font: inherit; font-size: 11.5px; cursor: pointer; }
.rbtn:hover { border-color: var(--line-strong); }
.rbtn:disabled { opacity: .45; cursor: not-allowed; }
.rbtn .ico { width: 20px; height: 20px; }
.rbtn .off { display: none; }
.rbtn.is-off { background: var(--bad-soft); color: var(--bad-ink); }
.rbtn.is-off .on { display: none; }
.rbtn.is-off .off { display: block; }
.rbtn.is-on { background: var(--pistachio); color: var(--pistachio-ink); }
.rbtn.is-rec { background: var(--bad-fill); color: #fff; }
.rbtn.leave { color: var(--bad); }
.rbtn.end { background: var(--bad-fill); color: #fff; }
.rbadge { position: absolute; top: 2px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad-fill);
          color: #fff; font-size: 11px; display: grid; place-items: center; }
.lobby-ctl .rbtn { min-width: 48px; width: 48px; height: 48px; border-radius: 50%; justify-content: center; background: var(--room-cap);
                   color: var(--room-tile-ink); padding: 0; }
.lobby-ctl .rbtn.is-off { background: var(--bad-fill); color: #fff; }
/* позвать сотрудников во встречу */
dialog.dlg-invite { width: min(560px, 94vw); }
.dlg-invite input[type=search] { width: 100%; }
.inv-list { margin-top: 10px; max-height: min(46vh, 420px); overflow-y: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.inv-list > p { padding: 12px 14px; margin: 0; }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); min-width: 0; }
.inv-row:last-child { border-bottom: 0; }
.inv-row:hover { background: var(--soft-3); }
.inv-row.is-in { cursor: default; opacity: .7; }
.inv-row input { flex: none; width: 18px; height: 18px; }
.inv-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.inv-row .grow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row .grow span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-state { flex: none; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: var(--soft-3); color: var(--muted); white-space: nowrap; }
.inv-state.in { background: var(--pistachio); color: var(--pistachio-ink); }
.dlg-invite .flash { margin: 10px 0 0; }
.inv-guest { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.inv-link { display: flex; gap: 8px; width: 100%; }
.inv-link input { flex: 1; min-width: 0; font-size: 13px; }
.inv-guest .hint { margin: 0; }
/* фон и эффекты камеры */
dialog.dlg-fx { width: min(560px, 94vw); }
.fx-preview { position: relative; aspect-ratio: 16 / 9; background: var(--room-tile); border-radius: 12px; overflow: hidden; }
.fx-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-off { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
          color: var(--room-tile-ink); font-size: 13px; }
.fx-off .ico { width: 34px; height: 34px; }
.fx-status { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; }
.fx-sec { margin-top: 14px; }
.fx-sec > b { display: block; font-size: 13px; margin-bottom: 7px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 18px; padding: 6px 12px; font: inherit;
           font-size: 13px; cursor: pointer; }
.fx-chip:hover { border-color: var(--line-strong); }
.fx-chip.on { background: var(--pistachio); color: var(--pistachio-ink); border-color: var(--olive); }
.fx-emoji .fx-chip[data-mask]:not([data-mask=""]) { font-size: 20px; padding: 2px 8px; line-height: 1.3; }
.fx-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fx-swatch { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; padding: 0;
             background-size: cover; background-position: center; overflow: hidden; }
.fx-swatch span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; background: rgba(0, 0, 0, .45); color: #fff;
                  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-swatch.on { border-color: var(--olive); box-shadow: 0 0 0 2px var(--pistachio); }
/* образцы фонов: логотип в правом верхнем углу — там же, где он будет в кадре */
.sw-madlen { background-color: #f5e6c5; background-image: url("brand/logo-full-olive.svg"), url("brand/pattern-light.svg");
             background-repeat: no-repeat, repeat; background-position: right 7% top 9%, 0 0; background-size: 24% auto, 70px; }
.sw-madlen-olive { background-repeat: no-repeat, repeat, no-repeat;
                   background-image: url("brand/logo-full.svg"), url("brand/pattern.svg"), linear-gradient(135deg, #8f9012, #545500);
                   background-position: right 7% top 9%, 0 0, 0 0; background-size: 24% auto, 70px, cover; }
.sw-madlen-dark { background-repeat: no-repeat, no-repeat, no-repeat;
                  background-image: url("brand/logo-full.svg"), radial-gradient(circle at 72% 30%, rgba(127, 128, 0, .5), transparent 60%), linear-gradient(135deg, #2f3018, #0f1008);
                  background-position: right 7% top 9%, 0 0, 0 0; background-size: 24% auto, cover, cover; }
.sw-madlen-warm { background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
                  background-image: url("brand/logo-full-olive.svg"), radial-gradient(circle at 22% 30%, rgba(255, 214, 140, .8), transparent 22%),
                    radial-gradient(circle at 58% 62%, rgba(255, 214, 140, .6), transparent 26%), linear-gradient(160deg, #fdf5e3, #e9d3a3);
                  background-position: right 7% top 9%, 0 0, 0 0, 0 0; background-size: 24% auto, cover, cover, cover; }
.sw-blurlogo { background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
               background-image: url("brand/logo-full.svg"), radial-gradient(ellipse at 50% 85%, rgba(60, 52, 44, .85), transparent 45%),
                 radial-gradient(circle at 18% 25%, rgba(235, 228, 210, .75), transparent 38%), linear-gradient(135deg, #a39d8a, #4d493e);
               background-position: right 7% top 9%, 0 0, 0 0, 0 0; background-size: 24% auto, cover, cover, cover; }
.sw-office { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), transparent 40%), linear-gradient(#fbf8f1, #e7dfcf); }
.sw-dark { background: radial-gradient(circle at 70% 25%, rgba(127, 128, 0, .45), transparent 55%), linear-gradient(135deg, #3a3b22, #141509); }
.sw-own { background-color: var(--soft-3); background-size: cover; }
@media (max-width: 520px) { .fx-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.room-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(560px, 92vw); z-index: 90; background: var(--ink);
              color: var(--panel); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow); text-align: center; }
/* браузер не дал включить звук собеседников (чаще всего iPhone): крупная кнопка над комнатой; любое нажатие включает звук.
   width: max-content — иначе на телефоне кнопка сжималась до половины экрана и вытягивалась в 3–4 строки */
.room-sound { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 91; display: inline-flex; align-items: center; gap: 10px;
              width: max-content; max-width: 92vw; padding: 13px 22px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit;
              font-size: 15px; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; }
.room-sound .ico { width: 22px; height: 22px; flex: none; }
/* подсказка поверх комнаты (встреча №12, 03.12.2026): на iPhone — «экран гаснет сам», «браузер не дал доступ к микрофону»
   с кнопкой «Попробовать снова»; если видна и кнопка «Включить звук» — подсказка под ней (точное место по высоте кнопки
   ставит meet.js, placeHint; правило ниже — запасное) */
.room-hint { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 92; width: min(560px, 94vw); padding: 12px 14px;
             border-radius: 14px; border: 1px solid var(--warn-line); background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
             font-size: 13.5px; line-height: 1.45; }
.room-hint p { margin: 0 0 10px; }
.room-hint .btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#soundBtn:not([hidden]) ~ .room-hint { top: 128px; }
.lobby-retry { margin: -4px 0 12px; }
/* в списке участников: «страница свёрнута — не слышно», «браузер не дал микрофон» — своей строкой под должностью, с переносом
   (в одну строку с должностью рядом с кнопкой «Отключить» надпись обрезалась многоточием) */
.rp .grow span.rp-warn { color: var(--bad-ink); white-space: normal; }
/* у собеседника не доходит звук или его микрофон отключило само устройство — надпись на плитке заметнее обычной */
.tile-state.warn { opacity: 1; right: auto; max-width: calc(100% - 20px); padding: 3px 9px; border-radius: 8px; background: var(--bad-soft);
                   color: var(--bad-ink); font-weight: 600; }
/* журнал связи на странице встречи (meet/view.html) */
.conn-log > summary { cursor: pointer; }
.conn-log .st.bad { margin-left: 6px; }
table.t.conn-t td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t.conn-t tr.conn-bad td { color: var(--bad-ink); }
/* с кнопкой «Материалы» у организатора в полосе 12 кнопок — на ноутбуке они ужимаются, чтобы остаться в одну строку */
@media (min-width: 861px) and (max-width: 1180px) {
  .room-bar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .rbtn { min-width: 60px; padding: 7px 6px 6px; }
}
@media (max-width: 860px) {
  .room-lobby { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; align-items: start; }
  .room-stage { padding: 8px; }
  .room-side { position: fixed; inset: 60px 8px 86px 8px; width: auto; z-index: 50; box-shadow: var(--shadow); }
  .room-bar { justify-content: center; gap: 6px; padding-left: 8px; padding-right: 8px; }
  .room-bar .grow { display: none; }
  .rbtn { min-width: 50px; padding: 9px 8px; }
  .rbtn span { display: none; }
  .tiles.n2 { --cols: 1; }
  .tiles.n5, .tiles.n6, .tiles.n7, .tiles.n8, .tiles.n9, .tiles.n10, .tiles.n11, .tiles.n12 { --cols: 2; }
  .tiles.focus { grid-template-columns: repeat(var(--rows, 1), minmax(104px, 1fr)); grid-template-rows: minmax(0, 1fr) 92px; overflow-x: auto; }
  .tiles.focus .tile.big { grid-column: 1 / -1; grid-row: 1; }
  .tiles.focus2 { grid-template-columns: repeat(var(--rows, 1), minmax(104px, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) 92px; }
  .tiles.focus2.n2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .tiles.focus2 .tile.b1 { grid-column: 1 / -1; grid-row: 1; }
  .tiles.focus2 .tile.b2 { grid-column: 1 / -1; grid-row: 2; }
  /* крупная плитка (показанный экран или докладчик) — не шире экрана телефона и стоит на месте, вбок листается только полоса
     под ней. Раньше она тянулась на всю ширину полосы: при показе экрана и 4 участниках (на ширине 320 — уже при 3) правый
     край экрана уходил за край телефона (проверка обращения № 21) */
  .tiles.focus .tile.big { position: sticky; left: 0; width: min(100%, calc(100vw - 16px)); justify-self: start; }
  /* маленькие плитки полосы (≈113×92): надпись мельче и не выше трёх строк, а «страница свёрнута — участника сейчас не
     слышно» — коротко: «свёрнута — не слышно» (data-short из meet.js). Длинная надпись закрывала имя (проверка 03.12.2026) */
  .tiles.focus .tile:not(.big) .tile-state.warn { font-size: 11px; line-height: 1.25; padding: 2px 7px; display: -webkit-box;
                                                  -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .tiles.focus .tile:not(.big) .tile-state[data-short] { font-size: 0; }
  .tiles.focus .tile:not(.big) .tile-state[data-short]::after { content: attr(data-short); font-size: 11px; }
  #backLink { display: none; }
}

/* =====================================================================================
   Тёмная тема. Включается кнопкой в шапке или в профиле (атрибут data-theme="dark" на <html>).
   Тона — тёплые тёмно-оливковые, под фирменные цвета Madlen: фон не чёрный и не синий,
   текст — кремовый, акценты — светлый оливковый. Меняются только переменные.
   ===================================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --olive: #8b8c12;
  --olive-deep: #777800;
  --olive-dark: #d3d57c;       /* здесь это текст на тёмно-оливковой плашке */
  --cream: #efe1bf;
  --cream-soft: #2a2a1c;
  --pistachio: #383a1b;
  --pistachio-soft: #2a2c18;
  --pistachio-ink: #e9ebb7;

  --bg: #16170f;
  --panel: #1f2016;
  --field: #181910;
  --ink: #ebe7d6;
  --ink-2: #cdc9b4;
  --muted: #a09e88;
  --line: #36372b;
  --line-2: #2b2c21;
  --line-strong: #47483a;
  --line-hover: #6c6e2c;
  --brand: #777800;
  --brand-2: #8b8c10;
  --brand-line: #44461f;
  --brand-tint: #272918;
  --accent-ink: #c9cb62;

  --soft: #25261b;
  --soft-2: #222318;
  --soft-3: #2e2f23;
  --hover: #2a2c1c;
  --chip-bg: #33342a;
  --chip-ink: #c5c2ac;
  --chip-ink-2: #8f8d79;
  --art: #5e6038;
  --faint: #73725f;

  --blue: #7fb2ee;  --blue-soft: #1c2a3d;  --blue-fill: #2f6fb8;  --blue-line: #2c4466;  --blue-tint: #1a2433;
  --ok: #5cc48c;    --ok-soft: #17301f;    --ok-fill: #1f8a52;    --ok-ink: #8fdcae;     --ok-line: #25503a;
  --good-ink: #7fd67f;
  --done-soft: #17302a;  --done-ink: #7fd3b0;
  --warn: #e3a94a;  --warn-soft: #382b12;  --warn-fill: #a86400;  --warn-ink: #f0c479;   --warn-line: #5a4418;
  --bad: #f0796f;   --bad-soft: #3b1d1a;   --bad-fill: #c23b32;   --bad-ink: #f5a59e;    --bad-line: #6b2f2a;   --bad-tint: #2b1a17;
  --info: #a79df2;  --info-soft: #26223f;  --info-fill: #5b4bc4;

  --side: #2a2b0c;
  --side-ink: #f4f1e2;
  --login-bg: #1f2016;
  --bg-glass: rgba(22, 23, 15, .92);
  --tint: rgba(255, 255, 255, .12);
  --series-fact: #6aa9f0;
  --series-plan: #a09e8f;
  --series-fcw: #f0a640;
  --series-real: #e07fb4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .28);
  --room-bg: #0f100a;
  --room-tile: #24251a;
  --room-tile-ink: #ebe7d6;
  --room-cap: rgba(0, 0, 0, .55);
  --room-line: rgba(255, 255, 255, .18);
  --room-talk: #c9cb62;
  --room-off: #ff9c92;
  --hero-a: #6c6d0c;
  --hero-b: #585900;
  --hero-c: #434400;
}
:root[data-theme="dark"] .viz-root { --surface-1: #1f2016; --text-primary: #ebe7d6; --text-secondary: #cdc9b4; --text-muted: #a09e88;
                                    --grid: #34352a; --axis: #5a5b4d; --series-fact: #6aa9f0; --series-plan: #a09e8f;
                                    --series-fcw: #f0a640; --series-real: #e07fb4; }
:root[data-theme="dark"] .meter { --m-fill: #7b7a68; }
:root[data-theme="dark"] .meter.good { --m-fill: #3fbf5f; --m-track: #1c3320; }
:root[data-theme="dark"] .meter.warn { --m-fill: #e3a23a; --m-track: #3a2d12; }
:root[data-theme="dark"] .meter.bad { --m-fill: #e5645b; --m-track: #3d1f1c; }
:root[data-theme="dark"] .hero { box-shadow: none; }
:root[data-theme="dark"] .login-brand { background: radial-gradient(1000px 700px at 28% 18%, #6c6d0c 0%, #585900 52%, #434400 100%); }
:root[data-theme="dark"] .login-wrap.single { background-color: #434400; }
:root[data-theme="dark"] .login { box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] ::placeholder { color: #77766a; opacity: 1; }
:root[data-theme="dark"] .ico.fire { color: #f08a5d; fill: #4a2415; }
:root[data-theme="dark"] .side .new:hover, :root[data-theme="dark"] .hero .btn.hero-main:hover { background: #fbf3dc; border-color: #fbf3dc; }
:root[data-theme="dark"] dialog { box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 1px solid var(--line); }
:root[data-theme="dark"] dialog::backdrop, :root[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] a.chip:hover { filter: brightness(1.12); }
:root[data-theme="dark"] .btn.ok:hover { filter: brightness(1.1); }
:root[data-theme="dark"] img.photo, :root[data-theme="dark"] .att-img img { filter: brightness(.92); }
/* печать — всегда светлая, какая бы тема ни стояла */
@media print {
  :root[data-theme="dark"] { color-scheme: light; --olive: #7f8000; --olive-deep: #6f7000; --olive-dark: #575800; --olive-ink: #2e2f08; --cream: #f5e6c5; --cream-soft: #fbf6e9; --pistachio: #e3e8c4; --pistachio-soft: #f3f5e3; --bg: #f6f5ee; --panel: #ffffff; --ink: #25261a; --ink-2: #4e503e; --muted: #6f715e; --line: #e4e2d5; --line-2: #efeee4; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-soft: var(--pistachio-soft); --blue: #2b68ad; --blue-soft: #e8f0fa; --ok: #1e8a52; --ok-soft: #e3f4ea; --warn: #a86400; --warn-soft: #fdf0d5; --bad: #c23b32; --bad-soft: #fce9e6; --info: #5b4bc4; --info-soft: #eeebfc; --side: #737400; --side-ink: #ffffff; --radius: 12px; --shadow: 0 1px 2px rgba(46, 47, 8, .06), 0 4px 16px rgba(46, 47, 8, .05); --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif; --tabbar-h: 60px; --field: #ffffff; --soft: #faf9f3; --soft-2: #fbfaf5; --soft-3: #f1efe6; --hover: #f7f8ec; --chip-bg: #eeede4; --chip-ink: #5f6152; --chip-ink-2: #8a8c7b; --done-soft: #dff3ec; --done-ink: #11724a; --line-strong: #d9d7c8; --line-hover: #cfd3a0; --brand-line: #e2e6c2; --brand-tint: #f8f9ea; --art: #b9bc8f; --faint: #b9bba6; --ok-ink: #155d36; --ok-line: #bfe5cd; --ok-fill: var(--ok); --good-ink: #006300; --bad-ink: #8f251e; --bad-line: #f1c6c1; --bad-tint: #fdf3f1; --bad-fill: var(--bad); --warn-ink: #7a4a00; --warn-line: #f0d8a6; --warn-fill: var(--warn); --blue-line: #c9dbf2; --blue-tint: #f5f9fe; --blue-fill: var(--blue); --info-fill: var(--info); --accent-ink: var(--olive-deep); --pistachio-ink: var(--olive-ink); --login-bg: #fffdf8; --bg-glass: rgba(246, 245, 238, .93); --tint: rgba(0, 0, 0, .08); --series-fact: #2a78d6; --series-plan: #898781; --hero-a: #8e8f10; --hero-b: #7f8000; --hero-c: #666700; }
}

/* =====================================================================================
   Шапка: кнопка темы и кнопка «показать меню». Левая панель прячется кнопкой в её углу
   (на компьютере; на телефоне она и так выезжает по кнопке «Меню»). Выбор запоминается в браузере.
   ===================================================================================== */
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2);
            display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.icon-btn:hover { background: var(--bg); }
.theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: none; }
.side .side-hide { position: absolute; top: 12px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 8px; border: 0;
                   background: transparent; color: var(--side-ink); opacity: .65; cursor: pointer; display: grid; place-items: center; padding: 0; }
.side .side-hide:hover { opacity: 1; background: rgba(255, 255, 255, .14); }
.side .side-hide .ico { width: 17px; height: 17px; }
.side-show { display: none; }
@media (min-width: 861px) {
  .side-off .layout { grid-template-columns: minmax(0, 1fr); }
  .side-off .side { display: none; }
  .side-off .side-show { display: grid; }
  .side-off .content { max-width: 1680px; }
}
@media (max-width: 860px) {
  .side .side-hide { display: none; }
}
.theme-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* >>> шапка, поиск, фото, выбор оформления */
/* =====================================================================================
   Шапка: поиск по всему порталу с подсказками, дата и время, сотрудник (ФИО над должностью, рядом фото).
   Разметка — templates/_top.html, поведение — static/app.js (блок «шапка»).
   ===================================================================================== */
.top2 { gap: 14px; }
.gsearch { flex: 1 1 420px; max-width: 560px; min-width: 0; position: relative; display: flex; align-items: center; gap: 8px; }
.gs-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 13px; border-radius: 12px;
          background: var(--bg); border: 1px solid var(--line); cursor: text; transition: border-color .15s, box-shadow .15s, background .15s; }
.gs-box:hover { border-color: var(--line-strong); }
.gsearch:focus-within .gs-box { background: var(--field); border-color: var(--olive); box-shadow: 0 0 0 3px var(--focus); }
.gs-box > .ico { color: var(--muted); width: 17px; height: 17px; }
.gs-box input, .gs-box input:focus { flex: 1; min-width: 0; width: auto; height: 100%; border: 0; border-radius: 0; background: transparent;
                                     padding: 0; box-shadow: none; outline: none; font-size: 14px; color: var(--ink); }
.gs-box input::-webkit-search-cancel-button { display: none; }
.gs-key { font: inherit; font-size: 11px; line-height: 1.5; color: var(--muted); background: var(--panel); border: 1px solid var(--line);
          border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; white-space: nowrap; flex: none; }
.gsearch:focus-within .gs-key, .gsearch.gs-has .gs-key { display: none; }
.gs-x { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 50%; display: grid;
        place-items: center; cursor: pointer; padding: 0; flex: none; }
.gs-x:hover { background: var(--soft-3); color: var(--ink); }
.gs-x .ico { width: 14px; height: 14px; }
.gs-x[hidden], .gs-pop[hidden] { display: none; }
.gs-cancel, .gs-open { display: none; }

/* подсказки под строкой поиска */
.gs-pop { position: absolute; top: calc(100% + 8px); left: 0; width: max(100%, 540px); max-width: min(700px, calc(100vw - 32px));
          max-height: min(72vh, 660px); overflow-y: auto; overscroll-behavior: contain; background: var(--panel); border: 1px solid var(--line);
          border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .18); z-index: 30; padding: 6px; }
.gs-h { display: flex; align-items: center; gap: 7px; padding: 10px 10px 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
        color: var(--muted); font-weight: 650; }
.gs-h .ico { width: 14px; height: 14px; }
.gs-h .n { margin-left: auto; font-weight: 500; letter-spacing: 0; text-transform: none; }
.gs-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 11px; padding: 7px 10px;
           border-radius: 9px; color: var(--ink); }
.gs-item:hover, .gs-item.on { background: var(--hover); text-decoration: none; }
.gs-item.on { box-shadow: inset 2px 0 0 var(--olive); }
.gs-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--soft-3); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.gs-ic .ico { width: 16px; height: 16px; }
.gs-item .avatar { width: 32px; height: 32px; }
.gs-tx { min-width: 0; }
.gs-t { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-s { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-tag { font-size: 11px; color: var(--chip-ink); background: var(--chip-bg); border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.gs-pop mark, .sr-list mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.gs-all { display: flex; align-items: center; gap: 8px; margin: 6px 4px 4px; padding: 10px 12px; border-radius: 10px; background: var(--soft);
          color: var(--accent-ink); font-weight: 600; }
.gs-all:hover, .gs-all.on { background: var(--brand-tint); text-decoration: none; }
.gs-all .gs-key { margin-left: auto; display: inline-block; }
.gs-empty { padding: 24px 16px; text-align: center; color: var(--muted); }
.gs-empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.gs-hint { padding: 12px 12px 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.gs-recent { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.gs-recent a { font-size: 12.5px; color: var(--ink-2); background: var(--soft-3); border-radius: 20px; padding: 4px 11px; }
.gs-recent a:hover { background: var(--pistachio); color: var(--pistachio-ink); text-decoration: none; }

/* дата и время */
.tclock { display: flex; align-items: center; gap: 11px; padding: 0 2px; color: var(--ink); line-height: 1; user-select: none; flex: none; }
.tc-time { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: .02em; display: inline-flex; align-items: baseline;
           font-variant-numeric: lining-nums tabular-nums; }
.tc-time i { font-style: normal; margin: 0 1px; position: relative; top: -2px; color: var(--olive); animation: tc-blink 2s steps(1) infinite; }
@keyframes tc-blink { 50% { opacity: .25; } }
.tc-day { display: flex; flex-direction: column; gap: 5px; padding-left: 11px; border-left: 1px solid var(--line-strong); font-size: 10.5px;
          text-transform: uppercase; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.tc-day span:first-child { color: var(--accent-ink); font-weight: 700; }

/* сотрудник: ФИО над должностью, рядом фото */
.tuser { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tu-link { display: flex; align-items: center; gap: 11px; padding: 4px 6px 4px 12px; border-radius: 12px; color: var(--ink); min-width: 0; }
.tu-link:hover { background: var(--bg); text-decoration: none; }
.tu-text { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; line-height: 1.25; }
.tu-text b { font-weight: 650; font-size: 13.5px; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-pos { font-size: 12px; color: var(--muted); max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-short { display: none; }
.avatar.tu-ava { width: 40px; height: 40px; font-size: 13px; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line-strong); }
@media (max-width: 1560px) { .tu-full { display: none; } .tu-short { display: inline; } }
@media (max-width: 1240px) { .tc-day { display: none; } .tu-text b, .tu-pos { max-width: 150px; } }
@media (max-width: 1100px) { .top2 { gap: 10px; } .gs-key { display: none; } .tu-text b, .tu-pos { max-width: 130px; } }
@media (max-width: 960px) { .tu-text { display: none; } .tu-link { padding: 4px; } }
@media (prefers-reduced-motion: reduce) { .tc-time i { animation: none; } }

/* фото вместо инициалов */
.avatar.has-photo, .cava.photo { background: var(--soft-3); overflow: hidden; padding: 0; }
.avatar img, .cava img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

@media (max-width: 860px) {
  .top2 { gap: 6px; }
  .top2 .gsearch { display: none; }
  .top2 .gs-open { display: grid; }
  .top2.gs-on .gsearch { display: flex; position: fixed; inset: 0 0 auto 0; height: 54px; padding: 0 10px; max-width: none; background: var(--panel);
                         border-bottom: 1px solid var(--line); z-index: 96; }
  .top2.gs-on .gs-cancel { display: block; border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-weight: 600;
                           padding: 8px 4px; cursor: pointer; flex: none; }
  .top2.gs-on .gs-pop { position: fixed; top: 54px; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: none; border: 0;
                        border-radius: 0; box-shadow: none; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .gs-key { display: none; }
  .gs-box input, .gs-box input:focus { font-size: 16px; padding: 0; }
  .gs-item { padding: 10px; }
  .tclock { padding: 0 2px; }
  .tc-time { font-size: 22px; }
  .tuser form { display: none; }
  .avatar.tu-ava { width: 34px; height: 34px; box-shadow: none; }
}

/* ---------- страница результатов поиска */
.sr-form { display: none; gap: 8px; margin-bottom: 14px; max-width: 760px; }      /* на компьютере запрос правят в шапке */
@media (max-width: 860px) { .sr-form { display: flex; } }
.sr-form .gs-box { height: 46px; background: var(--field); border-color: var(--line-strong); }
.sr-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sr-nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--panel);
            border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; }
.sr-nav a:hover { border-color: var(--line-hover); text-decoration: none; }
.sr-nav a b { color: var(--accent-ink); }
.sr-group { margin-bottom: 14px; scroll-margin-top: 76px; }
.sr-list { padding: 6px; }
.sr-list .gs-item { padding: 9px 10px; }
.sr-more { display: block; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 13px; }
.sr-tips { color: var(--muted); line-height: 1.6; margin: 0; padding-left: 18px; }

/* ---------- профиль: фото */
.pf-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.pf-ava { position: relative; width: 96px; height: 96px; flex: none; }
.pf-ava .avatar { width: 96px; height: 96px; font-size: 30px; }
.pf-ava-btn { position: absolute; right: -4px; bottom: -4px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--panel);
              background: var(--olive-deep); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pf-ava-btn:hover { filter: brightness(1.08); }
.pf-ava-btn .ico { width: 16px; height: 16px; }
.pf-who { min-width: 0; flex: 1 1 220px; }
.pf-who b { font-size: 18px; display: block; line-height: 1.25; }
.pf-who > span { color: var(--muted); }
.pf-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- имя сотрудника — ссылка на его профиль (people.py, макрос who) */
a.pname { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.pname:hover { color: var(--olive); text-decoration-color: currentColor; }
a.who-link { color: inherit; text-decoration: none; }
a.who-link:hover span:last-child { color: var(--olive); text-decoration: underline; }
a.ava-link { display: inline-flex; border-radius: 50%; flex: none; }
a.ava-link:hover .avatar { box-shadow: 0 0 0 2px var(--pistachio); }

/* ---------- профиль сотрудника для коллег */
.avatar.xl { width: 128px; height: 128px; font-size: 40px; }
.ppl-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.ppl-photo { position: relative; display: inline-flex; border-radius: 50%; flex: none; }
a.ppl-photo { cursor: zoom-in; }
.ppl-zoom { position: absolute; right: 2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
            background: var(--olive-deep); color: #fff; border: 2px solid var(--panel); }
.ppl-zoom .ico { width: 15px; height: 15px; }
.ppl-who { min-width: 0; flex: 1 1 260px; }
.ppl-who h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; }
.ppl-pos { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.ppl-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ppl-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.ppl-status.on { color: var(--good-ink); }
.ppl-status.on i { background: var(--good-ink); box-shadow: 0 0 0 3px var(--ok-fill); }
.ppl-status.off i { background: var(--bad); }
.ppl-act { margin-top: 14px; }
.ppl-admin { margin-top: 10px; font-size: 13px; }
.ppl-card .flash { margin: 16px 0 0; }
.ppl-mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ppl-mate { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-2);
            color: inherit; text-decoration: none; min-width: 0; }
.ppl-mate:hover { border-color: var(--line-strong); background: var(--soft); text-decoration: none; }
.ppl-mate > span { min-width: 0; display: flex; flex-direction: column; }
.ppl-mate b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppl-mate span span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .ppl-top { flex-direction: column; text-align: center; }
  .ppl-act { justify-content: center; }
  .avatar.xl { width: 112px; height: 112px; }
}
.crop-stage { position: relative; width: min(320px, 76vw); aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden;
              background: var(--soft-3); touch-action: none; cursor: grab; }
.crop-stage.drag { cursor: grabbing; }
.crop-stage canvas { width: 100%; height: 100%; display: block; }
.crop-stage::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; width: min(320px, 76vw); color: var(--muted); }
.crop-zoom input[type=range] { flex: 1; padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: var(--olive-deep); }
.crop-note { text-align: center; margin-top: 10px; }
.hint.bad { color: var(--bad-ink); }

/* ---------- профиль: выбор оформления */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.skin-card { border: 2px solid var(--line); border-radius: 14px; padding: 8px 8px 10px; background: var(--panel); cursor: pointer; text-align: left;
             font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 7px; transition: border-color .15s, transform .15s; }
.skin-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.skin-card.on { border-color: var(--olive); box-shadow: 0 0 0 3px var(--focus); }
.skin-prev { display: grid; grid-template-columns: 30% 1fr; height: 86px; border-radius: 9px; overflow: hidden; background: var(--bg);
             border: 1px solid var(--line); }
.sp-side { background: var(--side); display: flex; flex-direction: column; gap: 5px; padding: 9px 7px; }
.sp-side i { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.sp-side i:first-child { background: var(--cream); width: 72%; height: 7px; margin-bottom: 3px; }
.sp-main { padding: 9px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; height: 22px; display: flex; align-items: center;
           gap: 5px; padding: 0 6px; }
.sp-card i { display: block; height: 4px; border-radius: 2px; background: var(--muted); opacity: .45; flex: 1; }
.sp-card b { width: 12px; height: 12px; border-radius: 50%; background: var(--pistachio); flex: none; }
.sp-btn { align-self: flex-start; background: var(--olive-deep); border-radius: 5px; height: 14px; width: 46px; }
.sk-name { font-weight: 650; padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.sk-sub { font-size: 12px; color: var(--muted); padding: 0 4px; }
.sk-on { display: none; font-size: 11px; font-weight: 600; color: var(--pistachio-ink); background: var(--pistachio); border-radius: 20px; padding: 1px 8px; }
.skin-card.on .sk-on { display: inline-block; }
/* <<< шапка, поиск, фото, выбор оформления */

/* >>> оформления: этот кусок собирает docs/make_skins.py — руками не править */
/* Оформления на выбор сотрудника (атрибут data-skin на <html>, ставится из его профиля). Меняются только переменные;
   .skin-prev — образец оформления в профиле: тот же набор переменных, но только внутри образца. */
.skin-prev[data-skin="olive"] { --olive: #7f8000; --olive-deep: #6f7000; --olive-dark: #575800; --olive-ink: #2e2f08; --pistachio: #e3e8c4; --pistachio-soft: #f3f5e3; --pistachio-ink: #2e2f08; --side: #737400; --line-hover: #cfd3a0; --brand: #6f7000; --brand-2: #575800; --brand-line: #e2e6c2; --brand-tint: #f8f9ea; --accent-ink: #6f7000; --art: #b9bc8f; --hero-a: #8e8f10; --hero-b: #7f8000; --hero-c: #666700; --focus: rgba(127, 128, 0, .2); --room-talk: #c9cc3c; --bg: #f6f5ee; --panel: #ffffff; --field: #ffffff; --ink: #25261a; --ink-2: #4e503e; --muted: #6f715e; --line: #e4e2d5; --line-2: #efeee4; --line-strong: #d9d7c8; --soft: #faf9f3; --soft-2: #fbfaf5; --soft-3: #f1efe6; --hover: #f7f8ec; --chip-bg: #eeede4; --chip-ink: #5f6152; --chip-ink-2: #8a8c7b; --faint: #b9bba6; --cream-soft: #fbf6e9; --bg-glass: rgba(246, 245, 238, .93); --room-bg: #e9e8dd; --room-tile: #2b2c1e; --side-ink: #ffffff; }
:root[data-theme="dark"] .skin-prev[data-skin="olive"] { --olive: #8b8c12; --olive-deep: #777800; --olive-dark: #d3d57c; --pistachio: #383a1b; --pistachio-soft: #2a2c18; --pistachio-ink: #e9ebb7; --side: #2a2b0c; --line-hover: #6c6e2c; --brand: #777800; --brand-2: #8b8c10; --brand-line: #44461f; --brand-tint: #272918; --accent-ink: #c9cb62; --art: #5e6038; --hero-a: #6c6d0c; --hero-b: #585900; --hero-c: #434400; --room-talk: #c9cb62; --bg: #16170f; --panel: #1f2016; --field: #181910; --ink: #ebe7d6; --ink-2: #cdc9b4; --muted: #a09e88; --line: #36372b; --line-2: #2b2c21; --line-strong: #47483a; --soft: #25261b; --soft-2: #222318; --soft-3: #2e2f23; --hover: #2a2c1c; --chip-bg: #33342a; --chip-ink: #c5c2ac; --chip-ink-2: #8f8d79; --faint: #73725f; --cream-soft: #2a2a1c; --bg-glass: rgba(22, 23, 15, .92); --room-bg: #0f100a; --room-tile: #24251a; --side-ink: #f4f1e2; }
/* Шоколад */
:root[data-skin="choco"], .skin-prev[data-skin="choco"] { --olive: #a66a44; --olive-deep: #925c3a; --olive-dark: #73482d; --olive-ink: #3d2618; --pistachio: #f8decf; --pistachio-soft: #fdf0e9; --side: #733f1c; --line-hover: #eac6b1; --brand-line: #f6dccd; --brand-tint: #fff5f0; --art: #d0b09e; --hero-a: #b8774f; --hero-b: #a66a44; --hero-c: #865435; --focus: rgba(166, 106, 68, .2); --bg: #f9f3f0; --ink: #2c231d; --ink-2: #594b43; --muted: #7a6c63; --line: #eadfd9; --line-2: #f4ece7; --line-strong: #e0d4cd; --soft: #fdf8f5; --soft-2: #fdf9f7; --soft-3: #f5ede9; --hover: #fef5ef; --chip-bg: #f2ebe7; --chip-ink: #685d56; --chip-ink-2: #95877f; --faint: #c6b5ac; --bg-glass: rgba(249, 243, 240, .93); --room-bg: #eee5e0; }
:root[data-theme="dark"][data-skin="choco"], :root[data-theme="dark"] .skin-prev[data-skin="choco"] { --olive: #b4754d; --olive-deep: #9c633f; --olive-dark: #fbc09d; --pistachio: #473226; --pistachio-soft: #34271f; --pistachio-ink: #ffdfcd; --side: #372418; --line-hover: #885f46; --brand: #9c633f; --brand-2: #b4744d; --brand-line: #563d2d; --brand-tint: #30241e; --accent-ink: #f6b38a; --art: #715646; --hero-a: #8d5a3b; --hero-b: #75492d; --hero-c: #5a3721; --bg: #1b1511; --panel: #251d19; --field: #1d1612; --ink: #f1e4dc; --ink-2: #d5c5bb; --muted: #aa998f; --line: #3d342e; --line-2: #312924; --line-strong: #4f443e; --soft: #2b231e; --soft-2: #28201b; --soft-3: #352c26; --hover: #332720; --chip-bg: #39312d; --chip-ink: #cfbdb3; --chip-ink-2: #98887f; --faint: #7c6d65; --cream-soft: #312620; --bg-glass: rgba(27, 21, 17, .92); --room-bg: #130e0b; --room-tile: #2a221d; --side-ink: #faeee7; }
:root[data-theme="dark"][data-skin="choco"] .viz-root { --surface-1: #251d19; --text-primary: #f1e4dc; --text-secondary: #d5c5bb; --text-muted: #aa998f; --grid: #3a322d; --axis: #625751; }
@media print { :root[data-theme="dark"][data-skin="choco"] { --olive: #a66a44; --olive-deep: #925c3a; --olive-dark: #73482d; --olive-ink: #3d2618; --pistachio: #f8decf; --pistachio-soft: #fdf0e9; --pistachio-ink: var(--olive-ink); --side: #733f1c; --line-hover: #eac6b1; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-line: #f6dccd; --brand-tint: #fff5f0; --accent-ink: var(--olive-deep); --art: #d0b09e; --hero-a: #b8774f; --hero-b: #a66a44; --hero-c: #865435; --focus: rgba(166, 106, 68, .2); --bg: #f9f3f0; --panel: #ffffff; --field: #ffffff; --ink: #2c231d; --ink-2: #594b43; --muted: #7a6c63; --line: #eadfd9; --line-2: #f4ece7; --line-strong: #e0d4cd; --soft: #fdf8f5; --soft-2: #fdf9f7; --soft-3: #f5ede9; --hover: #fef5ef; --chip-bg: #f2ebe7; --chip-ink: #685d56; --chip-ink-2: #95877f; --faint: #c6b5ac; --cream-soft: #fbf6e9; --bg-glass: rgba(249, 243, 240, .93); --room-bg: #eee5e0; --room-tile: #2b2c1e; --side-ink: #ffffff; } }
/* Вишня */
:root[data-skin="berry"], .skin-prev[data-skin="berry"] { --olive: #b8556b; --olive-deep: #a24a5e; --olive-dark: #803949; --olive-ink: #441f27; --pistachio: #ffd9de; --pistachio-soft: #ffeef1; --side: #893147; --line-hover: #f7bcc5; --brand-line: #ffd6dc; --brand-tint: #fff5f6; --art: #dca8b0; --hero-a: #cc6279; --hero-b: #b8556b; --hero-c: #954456; --focus: rgba(184, 85, 107, .2); --bg: #f8f3f4; --ink: #2a2324; --ink-2: #564b4c; --muted: #786b6d; --line: #e8dfe0; --line-2: #f2ecec; --line-strong: #ddd3d5; --soft: #fcf8f8; --soft-2: #fcf9f9; --soft-3: #f3edee; --hover: #fdf4f6; --chip-bg: #f1ebec; --chip-ink: #665c5e; --chip-ink-2: #928788; --faint: #c3b5b7; --bg-glass: rgba(248, 243, 244, .93); --room-bg: #ede5e6; }
:root[data-theme="dark"][data-skin="berry"], :root[data-theme="dark"] .skin-prev[data-skin="berry"] { --olive: #c76076; --olive-deep: #ad5065; --olive-dark: #ffb8c4; --pistachio: #4d2c32; --pistachio-soft: #392327; --pistachio-ink: #ffdce1; --side: #3d1e24; --line-hover: #95525f; --brand: #ad5065; --brand-2: #c86076; --brand-line: #5e353d; --brand-tint: #342124; --accent-ink: #ffa7b7; --art: #7a4e56; --hero-a: #9c4a5c; --hero-b: #823a4a; --hero-c: #642b38; --bg: #1a1515; --panel: #231d1e; --field: #1c1617; --ink: #efe3e5; --ink-2: #d2c4c6; --muted: #a7999b; --line: #3b3435; --line-2: #30292a; --line-strong: #4d4445; --soft: #2a2324; --soft-2: #272021; --soft-3: #332c2d; --hover: #312729; --chip-bg: #383132; --chip-ink: #cbbdbf; --chip-ink-2: #95888a; --faint: #7a6d6f; --cream-soft: #2f2628; --bg-glass: rgba(26, 21, 21, .92); --room-bg: #120e0f; --room-tile: #292223; --side-ink: #f8eeef; }
:root[data-theme="dark"][data-skin="berry"] .viz-root { --surface-1: #231d1e; --text-primary: #efe3e5; --text-secondary: #d2c4c6; --text-muted: #a7999b; --grid: #393233; --axis: #605758; }
@media print { :root[data-theme="dark"][data-skin="berry"] { --olive: #b8556b; --olive-deep: #a24a5e; --olive-dark: #803949; --olive-ink: #441f27; --pistachio: #ffd9de; --pistachio-soft: #ffeef1; --pistachio-ink: var(--olive-ink); --side: #893147; --line-hover: #f7bcc5; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-line: #ffd6dc; --brand-tint: #fff5f6; --accent-ink: var(--olive-deep); --art: #dca8b0; --hero-a: #cc6279; --hero-b: #b8556b; --hero-c: #954456; --focus: rgba(184, 85, 107, .2); --bg: #f8f3f4; --panel: #ffffff; --field: #ffffff; --ink: #2a2324; --ink-2: #564b4c; --muted: #786b6d; --line: #e8dfe0; --line-2: #f2ecec; --line-strong: #ddd3d5; --soft: #fcf8f8; --soft-2: #fcf9f9; --soft-3: #f3edee; --hover: #fdf4f6; --chip-bg: #f1ebec; --chip-ink: #665c5e; --chip-ink-2: #928788; --faint: #c3b5b7; --cream-soft: #fbf6e9; --bg-glass: rgba(248, 243, 244, .93); --room-bg: #ede5e6; --room-tile: #2b2c1e; --side-ink: #ffffff; } }
/* Лагуна */
:root[data-skin="sea"], .skin-prev[data-skin="sea"] { --olive: #008b91; --olive-deep: #007a7f; --olive-dark: #006064; --olive-ink: #0a3335; --pistachio: #c8ecee; --pistachio-soft: #e6f7f8; --side: #007075; --line-hover: #a6d9dc; --brand-line: #c6eaec; --brand-tint: #ecfbfc; --art: #95c2c4; --hero-a: #129ba1; --hero-b: #008b91; --hero-c: #007075; --focus: rgba(0, 139, 145, .2); --bg: #f1f6f6; --ink: #1e2727; --ink-2: #445152; --muted: #647273; --line: #dae4e4; --line-2: #e8eff0; --line-strong: #ced9d9; --soft: #f5fafa; --soft-2: #f7fbfb; --soft-3: #eaf0f1; --hover: #f0f9f9; --chip-bg: #e7eeee; --chip-ink: #576262; --chip-ink-2: #808d8e; --faint: #adbcbd; --bg-glass: rgba(241, 246, 246, .93); --room-bg: #e1e9ea; }
:root[data-theme="dark"][data-skin="sea"], :root[data-theme="dark"] .skin-prev[data-skin="sea"] { --olive: #14989e; --olive-deep: #008388; --olive-dark: #85e0e5; --pistachio: #1d3d3f; --pistachio-soft: #1a2e2f; --pistachio-ink: #bef2f4; --side: #0e2e30; --line-hover: #307679; --brand: #008388; --brand-2: #12989e; --brand-line: #224a4d; --brand-tint: #192b2c; --accent-ink: #6bd8dd; --art: #3c6567; --hero-a: #0e767b; --hero-b: #006165; --hero-c: #004a4e; --bg: #111718; --panel: #192121; --field: #131a1a; --ink: #ddeaea; --ink-2: #bccccd; --muted: #90a1a1; --line: #2f3838; --line-2: #242d2d; --line-strong: #3f494a; --soft: #1e2727; --soft-2: #1b2424; --soft-3: #273030; --hover: #212d2e; --chip-bg: #2d3535; --chip-ink: #b4c5c6; --chip-ink-2: #808f90; --faint: #667475; --cream-soft: #212b2c; --bg-glass: rgba(17, 23, 24, .92); --room-bg: #0c1011; --room-tile: #1d2626; --side-ink: #e8f3f4; }
:root[data-theme="dark"][data-skin="sea"] .viz-root { --surface-1: #192121; --text-primary: #ddeaea; --text-secondary: #bccccd; --text-muted: #90a1a1; --grid: #2d3636; --axis: #525c5d; }
@media print { :root[data-theme="dark"][data-skin="sea"] { --olive: #008b91; --olive-deep: #007a7f; --olive-dark: #006064; --olive-ink: #0a3335; --pistachio: #c8ecee; --pistachio-soft: #e6f7f8; --pistachio-ink: var(--olive-ink); --side: #007075; --line-hover: #a6d9dc; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-line: #c6eaec; --brand-tint: #ecfbfc; --accent-ink: var(--olive-deep); --art: #95c2c4; --hero-a: #129ba1; --hero-b: #008b91; --hero-c: #007075; --focus: rgba(0, 139, 145, .2); --bg: #f1f6f6; --panel: #ffffff; --field: #ffffff; --ink: #1e2727; --ink-2: #445152; --muted: #647273; --line: #dae4e4; --line-2: #e8eff0; --line-strong: #ced9d9; --soft: #f5fafa; --soft-2: #f7fbfb; --soft-3: #eaf0f1; --hover: #f0f9f9; --chip-bg: #e7eeee; --chip-ink: #576262; --chip-ink-2: #808d8e; --faint: #adbcbd; --cream-soft: #fbf6e9; --bg-glass: rgba(241, 246, 246, .93); --room-bg: #e1e9ea; --room-tile: #2b2c1e; --side-ink: #ffffff; } }
/* Индиго */
:root[data-skin="sky"], .skin-prev[data-skin="sky"] { --olive: #4d78c9; --olive-deep: #4269b1; --olive-dark: #33528c; --olive-ink: #1c2c4a; --pistachio: #d6e5ff; --pistachio-soft: #edf3ff; --side: #345ba3; --line-hover: #b5cffe; --brand-line: #d3e3ff; --brand-tint: #f4f8ff; --art: #a1b9e2; --hero-a: #5886de; --hero-b: #4d78c9; --hero-c: #3d60a3; --focus: rgba(77, 120, 201, .2); --bg: #f3f5f9; --ink: #21252b; --ink-2: #494e58; --muted: #6a6f79; --line: #dee2e9; --line-2: #ebeef3; --line-strong: #d2d7df; --soft: #f7f9fc; --soft-2: #f8fafd; --soft-3: #eceff4; --hover: #f3f7fd; --chip-bg: #eaedf2; --chip-ink: #5b6068; --chip-ink-2: #858a94; --faint: #b3b9c4; --bg-glass: rgba(243, 245, 249, .93); --room-bg: #e4e8ed; }
:root[data-theme="dark"][data-skin="sky"], :root[data-theme="dark"] .skin-prev[data-skin="sky"] { --olive: #5684d9; --olive-deep: #4870bd; --olive-dark: #b5cfff; --pistachio: #293752; --pistachio-soft: #202a3c; --pistachio-ink: #dae7ff; --side: #1b2942; --line-hover: #4b69a0; --brand: #4870bd; --brand-2: #5683d9; --brand-line: #314364; --brand-tint: #1f2737; --accent-ink: #a4c4ff; --art: #495d80; --hero-a: #4266aa; --hero-b: #34538e; --hero-c: #263f6e; --bg: #14161a; --panel: #1c1f24; --field: #16181d; --ink: #e2e7f0; --ink-2: #c2c9d4; --muted: #979da9; --line: #32363c; --line-2: #282b31; --line-strong: #43474e; --soft: #22252b; --soft-2: #1f2228; --soft-3: #2a2e34; --hover: #262b33; --chip-bg: #303338; --chip-ink: #bbc1cd; --chip-ink-2: #868c97; --faint: #6b717b; --cream-soft: #252930; --bg-glass: rgba(20, 22, 26, .92); --room-bg: #0e0f13; --room-tile: #21242a; --side-ink: #ecf1f9; }
:root[data-theme="dark"][data-skin="sky"] .viz-root { --surface-1: #1c1f24; --text-primary: #e2e7f0; --text-secondary: #c2c9d4; --text-muted: #979da9; --grid: #31343a; --axis: #565a61; }
@media print { :root[data-theme="dark"][data-skin="sky"] { --olive: #4d78c9; --olive-deep: #4269b1; --olive-dark: #33528c; --olive-ink: #1c2c4a; --pistachio: #d6e5ff; --pistachio-soft: #edf3ff; --pistachio-ink: var(--olive-ink); --side: #345ba3; --line-hover: #b5cffe; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-line: #d3e3ff; --brand-tint: #f4f8ff; --accent-ink: var(--olive-deep); --art: #a1b9e2; --hero-a: #5886de; --hero-b: #4d78c9; --hero-c: #3d60a3; --focus: rgba(77, 120, 201, .2); --bg: #f3f5f9; --panel: #ffffff; --field: #ffffff; --ink: #21252b; --ink-2: #494e58; --muted: #6a6f79; --line: #dee2e9; --line-2: #ebeef3; --line-strong: #d2d7df; --soft: #f7f9fc; --soft-2: #f8fafd; --soft-3: #eceff4; --hover: #f3f7fd; --chip-bg: #eaedf2; --chip-ink: #5b6068; --chip-ink-2: #858a94; --faint: #b3b9c4; --cream-soft: #fbf6e9; --bg-glass: rgba(243, 245, 249, .93); --room-bg: #e4e8ed; --room-tile: #2b2c1e; --side-ink: #ffffff; } }
/* Графит */
:root[data-skin="graphite"], .skin-prev[data-skin="graphite"] { --olive: #99741c; --olive-deep: #866517; --olive-dark: #6a4f10; --olive-ink: #382a0c; --pistachio: #f1e2c6; --pistachio-soft: #faf2e4; --side: #3c4653; --line-hover: #e0cca3; --brand-line: #efe0c4; --brand-tint: #fdf7eb; --art: #c8b692; --hero-a: #525e6e; --hero-b: #46515f; --hero-c: #313a46; --focus: rgba(153, 116, 28, .2); --bg: #f4f5f6; --ink: #232527; --ink-2: #4c4e52; --muted: #6d6f73; --line: #e0e2e4; --line-2: #eceeef; --line-strong: #d4d6d9; --soft: #f8f9fa; --soft-2: #f9fafb; --soft-3: #eeeff1; --hover: #f5f7f9; --chip-bg: #ebedee; --chip-ink: #5d5f62; --chip-ink-2: #888a8d; --faint: #b6b9bd; --bg-glass: rgba(244, 245, 246, .93); --room-bg: #e6e7ea; }
:root[data-theme="dark"][data-skin="graphite"], :root[data-theme="dark"] .skin-prev[data-skin="graphite"] { --olive: #a67f27; --olive-deep: #8f6c1a; --olive-dark: #ecca84; --pistachio: #42361d; --pistachio-soft: #312919; --pistachio-ink: #f9e4bb; --side: #25292e; --line-hover: #7e6632; --brand: #8f6c1a; --brand-2: #a67f26; --brand-line: #504122; --brand-tint: #2d2619; --accent-ink: #e6be6c; --art: #6a5b3b; --hero-a: #5f6976; --hero-b: #4d5661; --hero-c: #3a414a; --bg: #151618; --panel: #1e1f21; --field: #17181a; --ink: #e4e7ea; --ink-2: #c6c9cc; --muted: #9a9da1; --line: #343638; --line-2: #2a2b2d; --line-strong: #454749; --soft: #242527; --soft-2: #212224; --soft-3: #2c2e30; --hover: #282b2d; --chip-bg: #323335; --chip-ink: #bec1c5; --chip-ink-2: #898c90; --faint: #6e7174; --cream-soft: #27292c; --bg-glass: rgba(21, 22, 24, .92); --room-bg: #0f0f10; --room-tile: #232426; --side-ink: #eff1f4; }
:root[data-theme="dark"][data-skin="graphite"] .viz-root { --surface-1: #1e1f21; --text-primary: #e4e7ea; --text-secondary: #c6c9cc; --text-muted: #9a9da1; --grid: #323436; --axis: #585a5c; }
@media print { :root[data-theme="dark"][data-skin="graphite"] { --olive: #99741c; --olive-deep: #866517; --olive-dark: #6a4f10; --olive-ink: #382a0c; --pistachio: #f1e2c6; --pistachio-soft: #faf2e4; --pistachio-ink: var(--olive-ink); --side: #3c4653; --line-hover: #e0cca3; --brand: var(--olive-deep); --brand-2: var(--olive-dark); --brand-line: #efe0c4; --brand-tint: #fdf7eb; --accent-ink: var(--olive-deep); --art: #c8b692; --hero-a: #525e6e; --hero-b: #46515f; --hero-c: #313a46; --focus: rgba(153, 116, 28, .2); --bg: #f4f5f6; --panel: #ffffff; --field: #ffffff; --ink: #232527; --ink-2: #4c4e52; --muted: #6d6f73; --line: #e0e2e4; --line-2: #eceeef; --line-strong: #d4d6d9; --soft: #f8f9fa; --soft-2: #f9fafb; --soft-3: #eeeff1; --hover: #f5f7f9; --chip-bg: #ebedee; --chip-ink: #5d5f62; --chip-ink-2: #888a8d; --faint: #b6b9bd; --cream-soft: #fbf6e9; --bg-glass: rgba(244, 245, 246, .93); --room-bg: #e6e7ea; --room-tile: #2b2c1e; --side-ink: #ffffff; } }
/* <<< оформления */

/* Публичные страницы о правилах (legal.py): политика обработки персональных данных, правила пользования; подпись внизу входа */
.login-col { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-col .login { width: 100%; }
.legal-foot { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.legal-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal-foot a:hover { color: var(--ink); }
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 22px 16px 34px; display: flex; flex-direction: column; gap: 18px; }
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-size: 21px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legal-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.legal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 30px; line-height: 1.6; overflow-wrap: break-word; }
.legal h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; margin: 0 0 10px; }
.legal h2 { font-size: 17px; margin: 26px 0 8px; }
.legal p, .legal ul { margin: 8px 0; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal-lead { color: var(--ink-2); font-size: 15.5px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal-table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.legal-table td:first-child { width: 22%; font-weight: 600; color: var(--ink); }
.legal-table td:nth-child(2) { width: 42%; }
.legal-ed { margin-top: 26px !important; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  .legal { padding: 18px 16px; }
  .legal h1 { font-size: 25px; }
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .legal-table td { display: block; border: 0; padding: 2px 0; }
  .legal-table td:first-child, .legal-table td:nth-child(2) { width: auto; }
  .legal-table td:first-child { font-weight: 600; }
}

/* ---------- окно просмотра файлов (static/viewer.js, filepreview.py): поверх страницы, закрывается «×», Esc, «Назад» ---------- */
html.fv-open, html.fv-open body { overflow: hidden; }
.fv { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(20, 20, 16, .94); color: #f4f2ea; }
.fv[hidden] { display: none; }
.fv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); min-height: 56px; flex: none; }
.fv-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-count { color: rgba(244, 242, 234, .75); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fv-count[hidden], .fv-btn[hidden], .fv-nav[hidden] { display: none; }
.fv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: inherit; font: inherit;
  font-size: 14px; cursor: pointer; text-decoration: none; flex: none; }
.fv-btn:hover { background: rgba(255, 255, 255, .18); text-decoration: none; color: inherit; }
.fv-btn:focus-visible, .fv-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fv-btn .ico { width: 18px; height: 18px; }
.fv-step { padding: 0; font-size: 24px; line-height: 1; }
.fv-x { padding: 0; }
.fv-x .ico { width: 22px; height: 22px; }
.fv-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 0 14px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.fv-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; border-radius: 4px; background: #fff; }
.fv.zoom .fv-body { display: block; }
.fv.zoom .fv-img { max-width: none; max-height: none; cursor: zoom-out; }
.fv-frame { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }
.fv-media { max-width: 100%; max-height: 100%; border-radius: 6px; }
audio.fv-media { width: min(560px, 100%); }
.fv-nav { position: absolute; top: 50%; margin-top: -32px; width: 46px; height: 64px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }
.fv-nav:hover { background: rgba(255, 255, 255, .24); }
.fv-prev { left: 12px; }
.fv-next { right: 12px; }
.fv-doc { align-self: stretch; width: min(1040px, 100%); margin: 0 auto; background: var(--panel); color: var(--ink); border-radius: 12px;
  padding: 18px 22px; overflow: auto; font-size: 14px; line-height: 1.5; }
.fv-doc-in > :first-child { margin-top: 0; }
.fv-doc h3, .fv-doc h4, .fv-doc h5, .fv-doc h6 { margin: 18px 0 8px; line-height: 1.3; text-transform: none; letter-spacing: normal; color: var(--ink); }
.fv-doc h3 { font-size: 19px; }
.fv-doc h4 { font-size: 16px; }
.fv-doc h5, .fv-doc h6 { font-size: 14.5px; }
.fv-doc p { margin: 0 0 8px; }
.fv-note { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.fv-wait, .fv-more, .fv-empty { color: var(--muted); font-size: 13px; }
.fv-li { padding-left: 16px; position: relative; }
.fv-li::before { content: "•"; position: absolute; left: 3px; }
.fv-tw { overflow-x: auto; margin: 8px 0 14px; }
.fv-t { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fv-t td, .fv-t th { border: 1px solid var(--line); padding: 4px 8px; vertical-align: top; max-width: 380px; overflow-wrap: anywhere; }
.fv-t th { background: var(--soft); font-weight: 600; text-align: left; }
.fv-sheet { margin: 22px 0 6px; font-size: 15px; }
.fv-doc-in > .fv-sheet:first-child { margin-top: 0; }
.fv-slide { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.fv-slide-n { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.fv-slide-n + p { font-weight: 650; font-size: 16px; }
.fv-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin: 0; }
.fv-card { background: var(--panel); color: var(--ink); border-radius: 14px; padding: 24px 22px; max-width: 420px; width: 100%; text-align: center; }
.fv-card > .ico { width: 36px; height: 36px; color: var(--muted); }
.fv-card b { display: block; margin: 8px 0 4px; overflow-wrap: anywhere; }
.fv-card p { color: var(--ink-2); margin: 0 0 16px; }
/* PDF на телефоне — страницы рисует PDF.js (static/vendor/pdfjs): лента страниц на всю область, внизу «−  стр. 3 из 12 · 100%  +» */
.fv.pdf .fv-body { padding: 0; align-items: stretch; justify-content: stretch; overflow: hidden; }
.fv-pdf { position: relative; flex: 1; min-width: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 8px 8px calc(76px + env(safe-area-inset-bottom)); }
.fv-pages { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: min-content; }
.fv-page { flex: none; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.fv-page canvas { display: block; }
.fv-pdf-ctl { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex;
  align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(20, 20, 16, .86); box-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.fv-zb { width: 42px; height: 42px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit;
  font-size: 24px; line-height: 1; cursor: pointer; }
.fv-zb:hover { background: rgba(255, 255, 255, .22); }
.fv-zb:disabled { opacity: .35; cursor: default; }
.fv-zb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fv-pdf-info { color: #f4f2ea; font-size: 13px; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-docs-have { display: flex; flex-direction: column; gap: 2px; }
.rbadge.soft { background: var(--room-cap, rgba(0, 0, 0, .55)); color: var(--room-tile-ink, #fff); }
.dlg-files { width: min(560px, calc(100vw - 32px)); }
.files-list { display: flex; flex-direction: column; gap: 6px; max-height: min(52vh, 420px); overflow-y: auto; }
.files-row { display: flex; align-items: center; gap: 8px; }
.files-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.files-open:hover { border-color: var(--line-hover); background: var(--soft); }
.files-open b { font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.files-open span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .fv-bar { padding-left: 8px; padding-right: 8px; gap: 6px; }
  .fv-btn span { display: none; }
  .fv-btn { padding: 0 10px; }
  .fv-body { padding: 0 6px 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .fv-doc { padding: 14px; border-radius: 10px; font-size: 13.5px; }
  .fv-nav { width: 38px; height: 54px; margin-top: -27px; font-size: 30px; background: rgba(0, 0, 0, .35); }
  .fv-prev { left: 4px; }
  .fv-next { right: 4px; }
}

/* ---------- «Агрегаторы» (aggregators.py): сводка, отказы и отмены, комиссия и выплаты ---------- */
table.t.agg-t tr.sum td { font-weight: 650; background: var(--soft); }
table.t.agg-t tbody tr.sum:hover td { background: var(--soft); }
table.t.agg-t td.agg-items { max-width: 340px; color: var(--ink-2); line-height: 1.35; }
table.t.agg-bars td { white-space: nowrap; }
table.t.agg-bars .ch-meter.wide { width: 120px; }
.sec-title { margin: 22px 0 10px; font-size: 17px; }
.agg-two { margin-bottom: 16px; }
@media (max-width: 860px) {
  table.t.agg-t td.agg-items { max-width: none; }
  table.t.agg-bars .ch-meter.wide { width: 70px; }
}

/* фильтры, поиск и сортировка в таблицах отчётов (static/tablefilter.js, таблицы с data-tf) */
.tf-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.tf-bar .tf-search { flex: 1 1 200px; min-width: 0; max-width: 320px; }
.tf-bar .tf-select { flex: 0 1 auto; max-width: 260px; min-width: 0; }
.tf-bar .tf-count { font-size: 12.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.tf-bar .tf-rows { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tf-bar .tf-rows .tf-select { width: auto; }
table[data-tf] th.tf-sortable { cursor: pointer; user-select: none; }
table[data-tf] th.tf-sortable:hover { color: var(--ink); }
table[data-tf] th.tf-asc::after { content: " ▲"; font-size: 10px; }
table[data-tf] th.tf-desc::after { content: " ▼"; font-size: 10px; }
@media (max-width: 640px) {
  .tf-bar { padding: 8px 10px; }
  .tf-bar .tf-search, .tf-bar .tf-select { flex: 1 1 100%; max-width: none; }
  .tf-bar .tf-rows .tf-select { flex: 0 1 auto; }
  .tf-bar .tf-count { margin-left: 0; }
}

/* ---------------- Ревизии: акт недостачи (audit.py) ---------------- */
.al-locs { display: flex; flex-wrap: wrap; gap: 6px 16px; max-height: 230px; overflow: auto; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.al-locs .check { font-size: 13px; }
.al-locs .check.on { font-weight: 600; }
table.audit-lines tr.is-off td { color: var(--muted); }
table.audit-lines tr.is-off td b { font-weight: 500; }
table.audit-lines tr.sep-row td { background: var(--tint); padding-top: 6px; padding-bottom: 6px; }
table.audit-lines tfoot td, tr.sum-row td { border-top: 2px solid var(--line); }
table.audit-lines input[type=checkbox] { width: 18px; height: 18px; }
.stats.al-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.al-stats .v { font-size: 24px; }
@media (max-width: 900px) { .stats.al-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats.al-stats .v { font-size: 20px; } }
@media (max-width: 640px) {
  .al-locs { max-height: 280px; }
  table.audit-lines input[name^="m"], table.audit-lines input[name^="n"] { max-width: none !important; width: 100%; }
}

/* ---------------- четыре карточки с цифрами в ряд (разбор по техкарте, закупка всех точек) ---------------- */
.stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.s4 .v { font-size: 24px; }
@media (max-width: 900px) { .stats.s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats.s4 .v { font-size: 20px; } }

/* ---------------- «Открытие касс»: ответ точки «почему поздно» прямо в строке ---------------- */
.op-reason { display: flex; gap: 6px; margin-top: 4px; align-items: center; width: 100%; }
.op-reason input { min-width: 0; flex: 1; }
/* «Открытие и закрытие касс»: ответ по открытию и по закрытию в одной ячейке — друг под другом */
.op-why-item + .op-why-item { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
table.op-day td.op-why { min-width: 220px; }
table.op-day td .t-sub { white-space: normal; max-width: 190px; }
@media (min-width: 861px) { table.op-day td.r .t-sub { margin-left: auto; } }
/* «Предложения и ошибки» (feedback.py) */
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-kinds .chip-btn { cursor: pointer; }
.fb-kinds input { margin: 0 4px 0 0; }
.fb-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
#fbDictate.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.fb-thumbs, .fb-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fb-thumbs img { height: 72px; border-radius: 6px; border: 1px solid var(--line-2); }
.fb-shots img { max-width: 100%; max-height: 360px; border-radius: 8px; border: 1px solid var(--line-2); }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 860px) { table.t.stack.stack-grid td.op-why { grid-column: 1 / -1; align-items: stretch; } }

/* Отчёт «Посещаемость и меню» (menu_story.py): таблица «по месяцам» — как лист «Месяцы» в файле Ильи: два года рядом */
table.t.trade.menu-months th.c { text-align: center; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
table.t.trade.menu-months thead tr:first-child th { vertical-align: bottom; }
table.t.trade.menu-months td, table.t.trade.menu-months th { white-space: nowrap; }table.t.trade.menu-wide td.mw { min-width: 210px; max-width: 320px; }
table.t.trade.menu-wide th, table.t.trade.menu-wide td { padding-left: 8px; padding-right: 8px; }
table.t.trade.menu-wide td.r .t-sub { white-space: nowrap; }table.t.trade.menu-wide th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.t.trade.menu-wide .rp-tag { white-space: nowrap; }
/* ---------------------------------------------------------------- выравнивание во всех таблицах портала
   Илья 22.11.2026: «выравнивание в текстах во всех таблицах… криво стоят: то справа внизу, то слева — сделай, чтобы
   везде было по центру; и строки заголовков выровнены по низу». Правило одно на все таблицы и стоит в конце файла, чтобы
   перекрыть прежние частные (числа справа, шапка по низу, ячейки по верху):
   * по высоте — всё посередине строки: и шапка (в том числе закреплённая строка заголовков), и ячейки;
   * по ширине — по центру; слева остаются только названия: первый столбец и ячейка с названием позиции (.t-title),
     как уже было договорено для «Не продаётся на точках» и отчётов по продажам.
   Не трогаются: формы ввода строк (.lines), тексты документов (.legal-table), просмотр файлов Excel (.fv-t); на телефоне
   — таблицы-карточки (memos, stack, tlist): у них своя раскладка «подпись — значение». */
table.t th, table.t td, table.t.trade th, table.t.dead-t th, table.t.trade.menu-wide th,
table.t.trade.menu-months thead tr:first-child th, table.plan th, table.plan td { vertical-align: middle; }
@media (min-width: 861px) {
  table.t th, table.t td, table.t th.right, table.t td.right, table.t.trade td.r, table.t.trade th.r, table.t.dead-t .act,
  table.plan th, table.plan td, table.plan td.u, table.plan.cf-grid th, table.plan.cf-grid tr.cat td,
  table.plan.cf-grid.tl-grid th, table.plan.cf-grid.tl-grid td { text-align: center; }
  table.t th:first-child, table.t td:first-child, table.t th.l, table.t td.l, table.t td.lead, table.t td.mw,
  table.t td:has(.t-title), table.t.memos th:nth-child(2), table.t.rpt th:first-child, table.t.rpt td:first-child,
  table.plan .name, table.plan.cf-grid th.name, table.plan.cf-grid tr.cat td.name,
  table.plan.cf-grid tr.cat td[colspan] { text-align: left; }
  table.t td .btns, table.t td .rp-gaps { justify-content: center; }
  table.t td:first-child .btns { justify-content: flex-start; }
}
@media (max-width: 860px) {
  /* на телефоне — те же правила для таблиц, которые остаются таблицами и листаются вбок */
  table.t:not(.memos):not(.stack):not(.tlist) th, table.t:not(.memos):not(.stack):not(.tlist) td,
  table.t.trade:not(.stack) td.r, table.t.trade:not(.stack) th.r, table.plan th, table.plan td,
  table.plan.cf-grid th, table.plan.cf-grid tr.cat td, table.plan.cf-grid.tl-grid th, table.plan.cf-grid.tl-grid td { text-align: center; }
  table.t:not(.memos):not(.stack):not(.tlist) th:first-child, table.t:not(.memos):not(.stack):not(.tlist) td:first-child,
  table.t:not(.memos):not(.stack):not(.tlist) td:has(.t-title), table.t:not(.stack) td.lead, table.t:not(.stack) td.mw,
  table.plan .name, table.plan.cf-grid th.name, table.plan.cf-grid tr.cat td.name,
  table.plan.cf-grid tr.cat td[colspan] { text-align: left; }
}
/* =====================================================================================
   26.11.2026 — обращения «Предложений и ошибок» № 6, 7, 8
   ===================================================================================== */
/* «Сегодня»: другой день — «← Вчера», «→», «Сегодня» (обращение № 7 генерального директора) */
.day-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* диктовка в задачах (№ 8): микрофон в чате задачи и у описания горит красным, пока слушает; подсказка — под полем */
.chat-input .dict.on, #taskDictate.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.dict-hint { margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* нижняя панель на телефоне (№ 6): пока открыта клавиатура — прячется, чтобы не висеть над полем ввода; где она должна
   стоять, следит app.js (fixTabbar) — Safari iOS 26.0 оставлял её посреди экрана */
@media (max-width: 860px) { .tabbar.kb-hide { visibility: hidden; pointer-events: none; } }
/* записка по счёту (№ 10): кнопка «Заполнить по счёту» над формой; поля, заполненные по счёту, подсвечены, пока их не поправят */
.inv-read { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border: 1px dashed var(--line-hover, var(--line));
            border-radius: 12px; background: var(--panel); }
.inv-read .hint { flex: 1 1 260px; margin: 0; }
.inv-read .hint.inv-good { color: var(--good-ink); }
.inv-read .hint.inv-warn { color: var(--warn); }
.inv-read .hint.inv-bad { color: var(--bad); }
.inv-filled { background: var(--accent-soft, rgba(127, 128, 0, .12)) !important; }
/* Заставка при запуске приложения со значка (обращение № 13) — стили вместе с разметкой в templates/_launch.html:
   её показывают и главная (base.html), и страница запуска /start, у которой своих стилей портала нет. */

/* =====================================================================================
   27.11.2026 — «Команда» (team.py): сегодня на работе, события, графики, заявки на графики; «Отзывы 2ГИС» (gis.py)
   ===================================================================================== */
.team-fresh { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.team-unit { margin-bottom: 10px; padding: 0; }
.team-unit > summary.team-unit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; list-style: none; }
.team-unit > summary.team-unit-head::-webkit-details-marker { display: none; }
.team-unit[open] > summary.team-unit-head { border-bottom: 1px solid var(--line-2); }
.team-unit .grow { flex: 1 1 220px; }
table.t.team-grid th, table.t.team-grid td { padding: 4px 3px; font-size: 11.5px; min-width: 30px; white-space: nowrap; }
table.t.team-grid th span { font-weight: 400; color: var(--muted); }
table.t.team-grid th.who, table.t.team-grid td.who { position: sticky; left: 0; z-index: 1; background: var(--card, var(--panel)); min-width: 190px;
  max-width: 240px; white-space: normal; padding: 6px 10px; font-size: 12.5px; text-align: left; }
table.t.team-grid th.we, table.t.team-grid td.we { background: var(--soft-2, var(--soft)); }
table.t.team-grid th.today, table.t.team-grid td.today { box-shadow: inset 1px 0 0 var(--olive), inset -1px 0 0 var(--olive); }
table.t.team-grid td.off { color: var(--muted); }
table.t.team-grid td.chg { background: var(--warn-soft); color: var(--ink); font-weight: 600; }
table.t.team-grid td.repl { box-shadow: inset 0 -3px 0 var(--blue); }
.team-mark { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; }
.team-mark.chg { background: var(--warn-soft); border: 1px solid var(--warn); }
.team-mark.repl { background: var(--panel); box-shadow: inset 0 -3px 0 var(--blue); border: 1px solid var(--line); }
tr.team-sub td { background: var(--soft); padding-top: 6px; padding-bottom: 10px; }

/* сортировка щелчком по заголовку во всех таблицах портала (tablefilter.js, plain; Илья 27.11.2026) */
table.t th.tf-sortable { cursor: pointer; user-select: none; }
table.t th.tf-sortable:hover { color: var(--ink); }
table.t th.tf-asc::after { content: " ▲"; font-size: 10px; }
table.t th.tf-desc::after { content: " ▼"; font-size: 10px; }

/* Широкие таблицы — на всю ширину экрана (static/widepage.js, Илья 29.11.2026: «Структура» обрезана справа, хотя справа пусто).
   Пояснения над таблицей остаются удобной для чтения ширины. */
.content.wide, .side-off .content.wide { max-width: none; }
.content.wide .lead-note { max-width: 1600px; }
