/* Страницы сервиса ДДС. П9 (решение владельца 08.11): вид по макетам «ДДС ИЗБА — дизайн 2».
   Шрифт Onest (с izbalux.com, лицензия SIL OFL 1.1) лежит в /static/fonts: внешних шрифтов нет, CSP 'self'.
   Вес только 400 и 500 (500 — заголовок страницы и имя в шапке панели). Теней и градиентов нет.
   Углы: поля и кнопки 8 px, блоки 12 px. Золотая кнопка одна на экран (главное действие). */
@font-face{font-family:'Onest';src:url(/static/fonts/Onest-Regular.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Onest';src:url(/static/fonts/Onest-Medium.woff2) format('woff2');font-weight:500;font-style:normal;font-display:swap}
:root{--ground:#F4F2ED;--line:#E7E3DB;--line-in:#EFECE6;--field:#D3CEC4;--band:#FBFAF7;--ink:#1C1C1F;--muted:#5F5F66;
--in:#0B6B4F;--in-bg:#EEF5F0;--out:#8A3B12;--out-bg:#F8EFE7;--bad:#A8200D;--bad-bg:#FBEDEA;--cream:#FFFAEC;--gold:#FDBE1F;
--gold-2:var(--gold-light);--soft:#8A8A90;--ctl:40px;color-scheme:light;
--dot-g:#3FB37F;--dot-y:var(--gold);--dot-r:#F05A44;--dot-n:#8E8E95}
*{box-sizing:border-box}
html,body{margin:0}
[hidden]{display:none !important}
body{background:var(--ground);color:var(--ink);font:15px/1.5 'Onest',system-ui,sans-serif;-webkit-text-size-adjust:100%}
h1,h2,h3,th,b,strong{font-weight:400}
p{margin:8px 0}
input,select,button,textarea{font:inherit;color:inherit;margin:0}
input,select{height:var(--ctl);width:100%;min-width:0;border:1px solid var(--field);border-radius:8px;background:#fff;padding:0 12px}
select{padding:0 8px 0 10px}
input[type=checkbox],input[type=radio]{width:18px;height:18px;padding:0;margin:0;vertical-align:middle;accent-color:var(--ink);flex:0 0 auto}
input:focus,select:focus{outline:none;border-color:var(--ink)}
input:disabled,select:disabled{background:var(--ground);color:var(--muted)}
/* Список с подсказкой «Выберите…» (required, пустой вариант выбран): текст серый, как подсказка поля; варианты обычные */
select:invalid{color:var(--muted)}
select:invalid option{color:var(--ink)}
button{height:var(--ctl);border:1px solid var(--field);border-radius:8px;background:#fff;padding:0 16px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
button svg{flex:0 0 auto}
button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
button:disabled{cursor:default;opacity:.6}
button.main{background:var(--gold);border-color:var(--gold);color:var(--ink);min-width:12em;height:44px;margin-top:14px}
button.main:hover:not(:disabled){background:var(--gold-2);border-color:var(--gold-2)}
button.dark{background:var(--ink);border-color:var(--ink);color:#fff}
button.link{display:inline;border:0;border-radius:0;background:none;padding:0;height:auto;text-decoration:underline;
  text-underline-offset:3px;text-decoration-color:var(--field);text-align:left;white-space:normal}
button.add{border:0;background:none;padding:0;height:40px;color:var(--in);gap:6px}
.sec-out button.add{color:var(--out)}
button.x{border:0;background:none;padding:0;width:32px;height:var(--ctl);color:var(--soft)}
button.x:hover{color:var(--bad)}
button.icon{border:0;background:none;padding:0;width:36px;height:36px;color:var(--muted)}
button.icon:hover{color:var(--ink);background:var(--ground)}
button.mon,button.trm{border:0;background:none;padding:0;height:22px;color:var(--muted);font-size:13px;text-decoration:underline;text-underline-offset:3px}
a{color:inherit;text-decoration-color:var(--field);text-underline-offset:3px}
a:hover{color:var(--muted)}
/* ---------------------------------------------------------------- шапка и вкладки
   П9: шапка и вкладки неподвижны сверху только от 900 px; уже — прокручиваются вместе со страницей (на телефоне
   они занимали ~140 px). --hdr-h (их высоту) ставит app.js: панель отчёта встаёт под шапку. */
.hdr{position:relative;z-index:10}
.top{background:var(--ink);color:var(--on-ink)}
.top .in{max-width:1248px;margin:0 auto;min-height:52px;padding:8px 24px;display:flex;flex-wrap:wrap;gap:4px 16px;align-items:center}
.brand{letter-spacing:.04em;white-space:nowrap}
.brand span{color:var(--gold)}
.top .who{color:var(--on-ink-muted);font-size:14px;margin-left:auto;min-width:0}
.top button.link{color:var(--on-ink-muted);font-size:14px;text-decoration-color:currentColor}
/* П12-2: «Связь» — точка цвета и слово рядом с именем; окошко здоровья — под кнопкой (компьютер) или снизу
   (телефон). «нет связи с сервисом» — браузер сам, когда опрос не удался. */
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--dot-n)}
.dot-green{background:var(--dot-g)}.dot-yellow{background:var(--dot-y)}.dot-red{background:var(--dot-r)}.dot-grey{background:var(--dot-n)}
.top button.conn{height:28px;border:0;border-radius:6px;background:none;padding:0 6px;gap:7px;color:var(--on-ink-muted);font-size:14px}
.top button.conn:hover,.top button.conn[aria-expanded=true]{color:var(--on-ink);background:rgba(255,255,255,.08)}
.conn-lost{font-size:13px;color:#FFB4A8;white-space:nowrap}
.conn-lost a{color:inherit}
.conn-pop{position:fixed;z-index:30;width:400px;max-width:calc(100vw - 16px);max-height:min(70vh,560px);overflow-y:auto;
background:#fff;border:1px solid var(--line);border-radius:10px;padding:4px 0 8px;color:var(--ink)}
.conn-pop .cp-h{display:flex;align-items:center;gap:8px;padding:8px 8px 4px 14px;font-size:14px}
.conn-pop .cp-h span.t{flex:1 1 auto}
.conn-pop .cp-h button.x{width:28px;height:28px}
.conn-pop .cp-s{padding:6px 14px 2px;font-size:12px;color:var(--muted);border-top:1px solid var(--line-in);margin-top:4px}
.conn-pop .cp-s:first-of-type{border-top:0}
.conn-pop .cp-i{display:grid;grid-template-columns:9px minmax(0,1fr);gap:0 8px;padding:3px 14px;font-size:13px;line-height:1.4}
.conn-pop .cp-i .dot{margin-top:5px}
.conn-pop .cp-i .dot.none{background:none}
.conn-pop .cp-l{color:var(--muted)}
.conn-pop .cp-t{overflow-wrap:anywhere}
.conn-pop .cp-e{padding:6px 14px;font-size:13px}
.conn-back{position:fixed;inset:0;z-index:29;background:rgba(28,28,31,.45)}
.conn-pop.sheet{left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;max-height:80vh;max-height:80dvh;border-radius:12px 12px 0 0;border-bottom:0}
.changed-mark{grid-column:1/-1;margin:4px 0 0;font-size:13px;color:var(--bad)}
.tabs{background:#fff;border-bottom:1px solid var(--line)}
.tabs .in{max-width:1248px;margin:0 auto;display:flex;flex-wrap:wrap;gap:0 4px;padding:0 12px}
.tabs a{display:flex;align-items:center;text-decoration:none;padding:14px 12px 12px;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs a:hover{color:var(--ink)}
.tabs a[aria-current=page]{color:var(--ink);border-bottom-color:var(--gold)}
.cnt{display:inline-block;margin-left:6px;padding:0 6px;border-radius:6px;background:var(--ground);font-size:12px;line-height:18px;color:var(--muted)}
/* Меню «Отчёты ▾», «Настройки ▾» в строке вкладок. Кнопка выглядит как вкладка; на странице из меню — как текущая
   вкладка, рядом имя страницы. Список под кнопкой, на телефоне — на всю ширину. */
.menu{position:relative}
.tabs button.menu-btn{height:auto;border:0;border-radius:0;border-bottom:2px solid transparent;background:none;padding:14px 12px 12px;color:var(--muted);gap:6px}
.tabs button.menu-btn:hover{color:var(--ink)}
.tabs button.menu-btn.cur{color:var(--ink);border-bottom-color:var(--gold)}
.tabs button.menu-btn[aria-expanded=true] .chev{transform:rotate(180deg)}
.menu-cur{font-size:13px;color:var(--muted)}
.menu-list{position:absolute;left:0;top:100%;z-index:12;min-width:14em;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--line);border-radius:10px}
.menu-list[hidden]{display:none}
.tabs .menu-list a{padding:9px 12px;border:0;border-radius:6px;color:var(--ink)}
.tabs .menu-list a:hover{background:var(--ground)}
.tabs .menu-list a[aria-current=page]{background:var(--cream)}
@media (min-width:900px){
  .hdr{position:sticky;top:0}
  html{scroll-padding-top:var(--hdr-h,0px)}
}
@media (max-width:599px){
  .top .in{padding:8px 12px;gap:2px 10px;flex-wrap:nowrap}
  .top .who{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .top .who .role{display:none}
  .top button.conn{padding:0 4px;gap:5px}
  .top button.link{flex:0 0 auto}
  .tabs .in{position:relative;padding:0 4px}
  .tabs a,.tabs button.menu-btn{padding:12px 10px 10px}
  .menu{position:static}.menu-list{right:0;min-width:0}
}
/* ---------------------------------------------------------------- страница */
main{max-width:808px;margin:0 auto;padding:24px 24px 56px}
main.wide{max-width:1248px}
.head{padding:0 0 4px}
h1{font-size:24px;font-weight:500;margin:0 0 6px;line-height:1.25}
.muted{color:var(--muted)}
.small{font-size:13px}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.nowrap{white-space:nowrap}
.v-in{color:var(--in)}
.bad{color:var(--bad)}
.ok{color:var(--in)}
.hidden{display:none}
.block{display:block}
.field{display:flex;flex-direction:column;gap:6px;margin:10px 0;max-width:22em}
.field label,.flbl{font-size:13px;color:var(--muted)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;max-width:44em}
.grid2 .field{max-width:none}
/* Блок: белый, рамка 1 px, угол 12 px; заголовок — строка с нижней линией. Приход и расход — цвет заголовка. */
.sec{background:#fff;border:1px solid var(--line);border-radius:12px;margin-top:14px;overflow:hidden}
.sec-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line-in);font-size:16px}
.sec-in .sec-h{color:var(--in)}
.sec-out .sec-h{color:var(--out)}
.sec-b{padding:12px 16px 16px}
.sec-flush > .sec-b{padding:0}
.total{display:flex;justify-content:space-between;gap:12px;padding:12px 16px;background:var(--cream);font-variant-numeric:tabular-nums}
.expl{margin:10px 0 0;padding:10px 12px;border-radius:8px;background:var(--cream);font-size:13px;color:var(--muted)}
/* Строка отчёта дня: сумма, слово, третье поле, убрать; под ней — месяц и статья (ТЗ 9).
   До 600 px (решение владельца 08.11): сверху сумма, слово и ×, третье поле — второй строкой на всю ширину;
   третий заголовок не показан (поле подписано подсказкой). От 600 px — всё в одну строку. */
.row{display:grid;grid-template-columns:6.4em minmax(0,1fr) 32px;gap:6px;margin-bottom:2px;align-items:center}
.row-x{display:flex;flex-wrap:wrap;gap:0 12px;align-items:center;margin:2px 0 10px;font-size:13px;color:var(--muted);min-height:22px}
.row-x select{height:30px;width:auto;font-size:13px;padding:0 6px}
.rowh{margin:0 0 4px;font-size:12px;color:var(--muted)}
@media (min-width:600px){.row{grid-template-columns:9em minmax(0,1fr) 11em 32px}}
@media (max-width:599px){button.main{width:100%;height:48px}.row>:nth-child(3){grid-column:1/-1;grid-row:2}.rowh>:nth-child(3){display:none}}
.chk{margin:12px 0 0;padding:10px 12px;border-radius:8px;background:var(--band);font-size:14px}
.chk.good{background:var(--in-bg);color:var(--in)}
.chk.bad{background:var(--bad-bg);color:var(--bad)}
.msg{margin:10px 0 0;font-size:14px;color:var(--in)}
.msg.bad{color:var(--bad)}
.msg:empty{display:none}
.notice{margin:10px 0 0;padding:10px 12px;border-radius:8px;background:var(--cream);font-size:14px}
.notice:empty{display:none}
.offline{background:var(--bad-bg);color:var(--bad);padding:8px 16px;font-size:14px}
.offline[hidden]{display:none}
/* ---------------------------------------------------------------- таблицы */
table{border-collapse:collapse;width:100%}
td,th{border-bottom:1px solid var(--line-in);padding:10px 16px;text-align:left;vertical-align:top;font-size:14px}
th{color:var(--muted);font-size:12px;background:var(--band);border-bottom-color:var(--line);vertical-align:bottom}
td.num,th.num{text-align:right}
tbody tr:last-child td{border-bottom:0}
tr.grp td{background:var(--band);color:var(--muted);font-size:13px;padding:8px 16px}
tr.g-in td{background:var(--in-bg);color:var(--in)}
tr.g-out td{background:var(--out-bg);color:var(--out)}
tr.tot td{background:var(--cream)}
tr.short td{background:var(--bad-bg)}
tr.off td{color:var(--soft)}
.tag{display:inline-block;margin:0 4px 2px 0;padding:1px 7px;border-radius:6px;background:var(--ground);font-size:12px;color:var(--muted);white-space:nowrap}
.code{color:var(--muted);font-variant-numeric:tabular-nums;margin-right:6px}
.item{padding:12px 0;border-bottom:1px solid var(--line-in)}
.item:last-child{border-bottom:0}
.item .line{display:flex;justify-content:space-between;gap:12px;padding:2px 0 8px;font-size:14px}
.item .line > span:first-child{min-width:0;overflow-wrap:anywhere}
.pick{display:flex;flex-wrap:wrap;gap:8px}
.pick select{flex:1 1 14em}
.pick select.m{flex:0 0 10em}
.pick select.termpick{flex:0 0 13em}
.pick .termhint{flex:1 1 100%;margin:0}
.scroll{overflow-x:auto;max-width:100%}
td.act{width:2em;padding:0 4px;text-align:right;white-space:nowrap;vertical-align:middle}
td.act button.link{padding:8px 4px}
.check-list{display:flex;flex-wrap:wrap;gap:4px 16px;margin:4px 0}
.check-list label,.cb{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--ink)}
.cell-in{color:var(--in)}
.ob-label{flex:1 1 100%}
.pick input.ob{flex:1 1 10em}
/* ---------------------------------------------------------------- отчёт ДДС */
.rep td,.rep th{padding:7px 10px;font-size:13px}
.rep th.num{white-space:normal;vertical-align:bottom}
.rep td.lbl{min-width:12em;max-width:17em}
.rep td.code{white-space:nowrap;color:var(--muted)}
.rep tr.total-row td{background:var(--band)}
.rep td.num .muted{color:#B4AFA5}
.rep button.link{font-variant-numeric:tabular-nums;color:var(--ink)}
/* Отчёт ДДС, П7б-4: нажатая ячейка и панель её строк. От 900 px панель справа на всю высоту окна, страница
   сдвигается влево на ширину панели (таблица видна и прокручивается сама); до 900 px — окно снизу на 80 % высоты,
   фон затемнён. Теней нет: подсветка ячейки — рамка. */
.rep tr td.cur{background:var(--cream);outline:2px solid var(--gold);outline-offset:-2px}
/* П7б-4б: столбец «Статья» закреплён при прокрутке вбок. Фон непрозрачный: белый по умолчанию (:where — без веса,
   строки-группы и итоги ставят свой фон), сам столбец над соседними ячейками. */
.rep tr > td:first-child,.rep tr > th:first-child{position:sticky;left:0;z-index:1}
:where(.rep tr > td:first-child,.rep tr > th:first-child){background:#fff}
.rep tr > th:first-child{background:var(--band)}
/* ---------------------------------------------------------------- панель (отчёт, слова, люди) */
.backdrop{position:fixed;inset:0;z-index:20;background:rgba(28,28,31,.45)}
.backdrop[hidden],.panel[hidden]{display:none}
.panel{position:fixed;z-index:21;display:flex;flex-direction:column;background:#fff;border:0 solid var(--line)}
.panel-h{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;padding:12px 8px 12px 20px;border-bottom:1px solid var(--line-in)}
.panel-h h2{font-size:17px;font-weight:500;line-height:1.3;margin:0;padding-top:7px;outline:none;overflow-wrap:anywhere}
.panel-h button.x{grid-column:2;grid-row:1;align-self:start;width:36px;height:36px;color:var(--muted)}
.panel-h p{grid-column:1/-1;margin:4px 0 0}
.panel-h p:empty{display:none}
.panel-b{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 20px}
.item.moved .pick,.item.moved .objp{display:none}
.moved-to{padding:4px 8px;border-radius:6px;background:var(--cream);font-size:13px}
/* Форма в панели: поля одной колонкой, кнопки рядом. */
.pform{display:flex;flex-direction:column;gap:14px;padding-top:16px}
.pform .field{margin:0;max-width:none}
.pform .check-list{flex-direction:column;align-items:flex-start;gap:10px;margin:0}
.pform .btns{display:flex;gap:8px;flex-wrap:wrap}
.pform .btns button{flex:1 1 auto}
.pform .btns button.main{margin-top:0;min-width:0}
.pform .part{border-top:1px solid var(--line-in);padding-top:14px;display:flex;flex-direction:column;gap:10px}
@media (min-width:900px){
  :root{--panel-w:clamp(360px,33.333vw,520px)}
  .panel{top:var(--hdr-h,0px);right:0;bottom:0;width:var(--panel-w);border-left-width:1px}
  body.panel-open main{margin-right:var(--panel-w)}
}
@media (max-width:899.98px){
  :root{--ctl:44px}
  .panel{left:0;right:0;bottom:0;height:80vh;height:80dvh;border-top-width:1px;border-radius:12px 12px 0 0}
  /* поле от 16 px: телефон не увеличивает страницу при вводе */
  input,select,textarea{font-size:16px}
  button.icon{width:44px;height:44px}
}
@media (max-width:599px){
  main{padding:16px 12px 40px}
  h1{font-size:22px}
  .sec-h{padding:12px 14px}
  .sec-b{padding:12px 14px 14px}
}
/* ---------------------------------------------------------------- панель инструментов (Слова) */
.tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px}
.seg{display:inline-flex;border:1px solid var(--field);border-radius:8px;overflow:hidden;background:#fff;max-width:100%}
.seg button,.seg label{border:0;border-radius:0;height:calc(var(--ctl) - 2px);padding:0 14px;background:#fff;color:var(--muted);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;position:relative;white-space:nowrap;font-size:15px}
.seg button + button,.seg label + label{border-left:1px solid var(--field)}
.seg button[aria-pressed=true],.seg label:has(input:checked){background:var(--ink);color:#fff}
.seg label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}
.seg label:has(input:focus-visible){outline:2px solid var(--gold);outline-offset:-2px}
.search{position:relative;flex:1 1 220px;min-width:180px}
.search svg{position:absolute;left:12px;top:50%;margin-top:-8px;color:var(--muted);pointer-events:none}
.search input{padding-left:36px}
.tools button.main{margin-top:0;min-width:0}
@media (max-width:599px){
  .tools .seg{display:flex;width:100%}
  .seg button,.seg label{flex:1 1 auto;white-space:normal;height:auto;min-height:calc(var(--ctl) - 2px);padding:4px 10px;line-height:1.25;text-align:center}
  .tools button.main{flex:1 1 auto}
  .tools .search{flex:1 1 100%}
}
/* ---------------------------------------------------------------- Слова (таблица) */
tr.sel td{background:var(--cream)}
.wtab td{vertical-align:middle}
.wtab .w-on{width:90px}
.wtab .w-ed{width:56px;padding:4px 10px;text-align:right}
@media (max-width:699px){
  .wtab thead{display:none}
  .wtab tr:not(.grp){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;border-bottom:1px solid var(--line-in)}
  .wtab tbody tr:last-child{border-bottom:0}
  .wtab tr:not(.grp) td{border:0;padding:0 12px}
  .wtab tr:not(.grp) td.w-word{grid-column:1;grid-row:1;padding-top:10px}
  .wtab tr:not(.grp) td.w-artc{grid-column:1;grid-row:2;font-size:13px;padding-bottom:2px}
  .wtab tr:not(.grp) td.w-ask{grid-column:1;grid-row:3;padding-bottom:9px}
  .wtab tr:not(.grp) td.w-on{grid-column:2;grid-row:1/4;width:auto;padding:0 4px}
  .wtab tr:not(.grp) td.w-ed{grid-column:3;grid-row:1/4;width:auto;padding:0 4px 0 0}
  .wtab tr:not(.grp) td.empty{grid-column:1/-1;padding:10px 12px}
  .wtab .w-row-act{width:22px;height:22px}
}
/* ---------------------------------------------------------------- заголовок с кнопкой справа (Люди) */
.head-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 16px;flex-wrap:wrap}
.head-row p{margin:0}
.head-row button.main{margin-top:0;min-width:0}
.pform .row-list{flex-direction:row;flex-wrap:wrap;gap:8px 16px}
/* ---------------------------------------------------------------- Люди (таблица) */
.ptab td{vertical-align:middle}
.ptab .p-ed{width:56px;padding:4px 10px;text-align:right}
@media (max-width:799px){
  .ptab thead{display:none}
  .ptab tr{display:grid;grid-template-columns:minmax(0,1fr) auto;border-bottom:1px solid var(--line-in);padding:10px 0}
  .ptab tbody tr:last-child{border-bottom:0}
  .ptab tr td{border:0;padding:1px 12px}
  .ptab tr td.p-name,.ptab tr td.p-role,.ptab tr td.p-accs,.ptab tr td.p-act,.ptab tr td.p-seen{grid-column:1}
  .ptab tr td.p-ed{grid-column:2;grid-row:1/6;width:auto;padding:0 4px 0 0;align-self:center}
}
/* ---------------------------------------------------------------- Начальные остатки (таблица) */
.otab td{vertical-align:middle}
.otab .o-sum{width:200px}
.otab input.ob{text-align:right;font-variant-numeric:tabular-nums}
.otab .o-act{width:140px;text-align:right}
.otab tr.chg td{background:var(--cream)}
.otab tr.grp td{padding:8px 16px}
@media (max-width:599px){
  .otab thead{display:none}
  .otab tr:not(.grp){display:grid;grid-template-columns:minmax(0,1fr) 9.5em;align-items:center;gap:4px 8px;padding:10px 12px;border-bottom:1px solid var(--line-in)}
  .otab tr:not(.grp) td{border:0;padding:0;width:auto;background:none}
  .otab tr.chg{background:var(--cream)}
  .otab td.o-name{grid-column:1;grid-row:1}
  .otab td.o-sum{grid-column:2;grid-row:1}
  .otab td.o-who{grid-column:1;grid-row:2}
  .otab td.o-act{grid-column:2;grid-row:2}
  .otab td.o-act button{width:100%}
}
/* ---------------------------------------------------------------- кнопки рядом */
.btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.btns button.main{margin-top:0}
/* ---------------------------------------------------------------- Внести: от 1024 px форма слева (~440 px), записи справа */
body[data-page=enter] main{max-width:1168px}
.enter-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0 20px;align-items:start}
@media (min-width:1024px){
  .enter-grid{grid-template-columns:minmax(0,440px) minmax(0,1fr)}
  .enter-grid > .sec{margin-top:0}
}
@media (max-width:1023.98px){body[data-page=enter] main{max-width:808px}}
#form .field{max-width:none}
#form .grid2{max-width:none}
#form .sec-b{padding:8px 20px 20px}
.grid-sw{display:grid;grid-template-columns:150px minmax(0,1fr);gap:0 12px}
#objbox:empty{display:none}
#objbox #lobjtxt{margin:34px 0 0}
.seg-full{display:flex;width:100%}
.seg-full label{flex:1 1 0}
#form .btns button.main{flex:1 1 auto;height:48px}
#records td{vertical-align:top}
#records td.nowrap{color:var(--muted);font-variant-numeric:tabular-nums}
#records td.act button.x{height:28px}
@media (max-width:599px){
  .grid-sw{grid-template-columns:7.5em minmax(0,1fr)}
  #form .sec-b{padding:8px 14px 16px}
  #records td{padding:10px 8px}
  #records td:first-child{padding-left:14px}
}
/* ---------------------------------------------------------------- Отчёт за день: прошлые отчёты */
.past{display:flex;justify-content:space-between;align-items:baseline;gap:4px 12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line-in);font-size:14px}
.past:last-child{border-bottom:0}
.past .pv{color:var(--muted);font-variant-numeric:tabular-nums;text-align:right}
.past.short{background:var(--bad-bg);margin:0 -16px;padding:10px 16px}
#past .sec-b{padding-top:0;padding-bottom:4px}
@media (max-width:599px){.past.short{margin:0 -14px;padding:10px 14px}}
/* ---------------------------------------------------------------- фильтры в ряд (Кассы по дням, Отчёт ДДС) */
.filters{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end;margin:12px 0 4px}
.filters .field{margin:0;flex:0 1 240px;min-width:0}
.filters .fchk{height:var(--ctl)}
@media (max-width:599px){.filters .field{flex:1 1 140px}}
/* ---------------------------------------------------------------- Кассы по дням */
.dtab td{padding:10px 16px}
.dtab tr.no td{color:var(--soft)}
.dtab td:first-child{width:90px}
@media (max-width:599px){.dtab td,.dtab th{padding:10px 10px}}
/* ---------------------------------------------------------------- Отчёт ДДС */
.rhead{align-items:baseline;justify-content:flex-start}
.rhead h1{margin:0}
.rhead .xlsx{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:14px}
.rep button.link{white-space:nowrap}
#report{margin-top:12px}
/* ---------------------------------------------------------------- Без статьи */
.uitem{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,480px);gap:8px 16px;align-items:center}
.uitem .line{padding-bottom:2px}
.uitem .pick select.artpick{flex:1 1 300px}
.uitem .pick select.m{flex:0 0 150px}
#bank-changed .uitem{grid-template-columns:minmax(0,1fr)}
@media (max-width:799px){.uitem{grid-template-columns:minmax(0,1fr)}}
.uitem .pick select.termpick{flex:0 0 190px}
@media (max-width:599px){.uitem .pick select.artpick{flex:1 1 100%}.uitem .pick select.m{flex:1 1 100%}}
/* ---------------------------------------------------------------- Вход */
main.login{max-width:432px;padding-top:56px}
main.login h1{margin-bottom:4px}
main.login .field{max-width:none}
main.login button.main{width:100%;height:48px}
body[data-page=unassigned] main{max-width:1048px}
.rep tr.grp td{padding:7px 10px;font-size:13px}
main.login .sec-b{padding:20px}
/* ---------------------------------------------------------------- Движения (П10, П10-2)
   П10-2 (владелец 08.11: «крупные плашки не нужны»): фильтры — строка мелких элементов 32 px, 14 px, без подписей над
   полями; «Ещё фильтры» — вторая такая же строка. Итоги — обычная строка текста, справа порядок строк и Excel.
   До 700 px строка таблицы складывается в две-три строки текста без рамки на каждую строку (только линия-разделитель). */
body[data-page=movements] .mhead{padding:0}
body[data-page=movements] .mhead h1{margin:0}
.mf{margin-top:10px}
.mf-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.mf-row + .mf-row{margin-top:6px}
.mf-row[hidden]{display:none}
.mf select,.mf input,.mf button,.mf .seg label{height:32px;font-size:14px}
.mf select{width:auto;max-width:15em;padding:0 6px 0 8px}

.mf button{padding:0 9px;gap:6px}
.mf .seg label{height:30px;min-height:0;padding:0 8px}
.mf .seg{flex:0 0 auto}
.msearch{position:relative;flex:1 1 200px;min-width:120px}
.msearch svg{position:absolute;left:9px;top:50%;margin-top:-8px;color:var(--muted);pointer-events:none}
.mf .msearch input{padding-left:30px}
button.mf-more[aria-expanded=true] .chev{transform:rotate(180deg)}
button.mf-more .cnt{margin-left:0;background:var(--ink);color:#fff}
button.mf-reset{border-color:transparent;background:none;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
button.mf-reset:disabled{text-decoration:none}
.msel{position:relative}
button.msel-btn{max-width:16em;justify-content:space-between;border-color:var(--field)}
button.msel-btn span{overflow:hidden;text-overflow:ellipsis}
button.msel-btn[aria-expanded=true] .chev{transform:rotate(180deg)}
.msel-list{position:absolute;left:0;top:calc(100% + 4px);z-index:12;min-width:100%;width:max-content;max-width:calc(100vw - 24px);
  max-height:60vh;overflow-y:auto;padding:6px;background:#fff;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column}
.msel-list .cb{padding:6px 8px;border-radius:6px;min-height:34px;font-size:14px}
.msel-list .cb:hover{background:var(--ground)}
.msel-g{padding:8px 8px 2px;font-size:12px;color:var(--muted)}
.mbar{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:baseline;justify-content:space-between;margin-top:10px;font-size:14px}
.mtot{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 0}
.mt-i{white-space:nowrap}
.mt-sep{color:var(--soft);white-space:pre}
.mt-note{margin-left:8px;font-size:13px;white-space:normal}
.mright{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;margin-left:auto}
/* П10-3: «Скачать в Excel» — небольшая кнопка со значком (рамка 1 px, 32 px) */
a.xbtn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid var(--field);border-radius:8px;
  background:#fff;color:var(--ink);font-size:14px;text-decoration:none;white-space:nowrap}
a.xbtn:hover{border-color:var(--ink);color:var(--ink)}
.mbar{align-items:center}
/* П10-3: сортировка щелчком по заголовку «Дата» и «Сумма», стрелка у активного столбца */
.mtab th button.th-sort{height:auto;border:0;border-radius:0;background:none;padding:0;font-size:12px;color:var(--muted);gap:4px}
.mtab th button.th-sort:hover,.mtab th button.th-sort.on{color:var(--ink)}
.mtab th.num button.th-sort{margin-left:auto}
.mtab th .arr{display:inline-block;min-width:.8em;font-size:13px}
/* П10-3: кнопка периода и окно-календарь */
.mf button.mrange{gap:6px;font-variant-numeric:tabular-nums}
.mf button.mrange svg{color:var(--muted)}
.mcal{position:absolute;z-index:30;display:flex;gap:0;background:#fff;border:1px solid var(--line);border-radius:12px;font-size:14px}
.mcal[hidden],.mcal-back[hidden]{display:none}
.mcal-back{z-index:29}
.cal-quick{display:flex;flex-direction:column;gap:2px;padding:10px 8px;border-right:1px solid var(--line-in);min-width:9.5em}
.cal-quick button{height:32px;border:0;justify-content:flex-start;padding:0 10px;font-size:14px;background:none;border-radius:6px}
.cal-quick button:hover:not(:disabled){background:var(--ground)}
.cal-quick button.on{background:var(--cream)}
.cal-main{padding:10px 14px 12px;width:288px}
.cal-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.cal-h span{font-weight:500}
button.cal-nav{width:32px;height:32px;padding:0;border:0;font-size:20px;line-height:1;background:none;border-radius:6px}
button.cal-nav:hover:not(:disabled){background:var(--ground)}
button.cal-nav:disabled{opacity:.3;cursor:default}
.cal-since{margin:6px 0 0;font-size:12px;color:var(--muted)}
.cal-g{display:grid;grid-template-columns:repeat(7,1fr);gap:2px 0}
.cal-w{text-align:center;font-size:12px;color:var(--muted);padding:2px 0}
button.cal-d{height:34px;padding:0;border:0;border-radius:0;background:none;font-size:14px;font-variant-numeric:tabular-nums}
button.cal-d:hover:not(:disabled):not(.a):not(.b){background:var(--ground)}
button.cal-d.in{background:var(--cream)}
button.cal-d.a,button.cal-d.b{background:var(--ink);color:#fff;border-radius:8px}
button.cal-d.now:not(.a):not(.b){text-decoration:underline;text-underline-offset:3px}
button.cal-d:disabled{color:#B4AFA5;opacity:1}
.cal-in{display:flex;align-items:center;gap:6px;margin-top:10px}
.cal-in input{height:32px;font-size:14px;padding:0 8px;font-variant-numeric:tabular-nums}
.cal-err{margin:6px 0 0;font-size:13px;color:var(--bad);min-height:0}
.cal-err:empty{display:none}
.cal-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.cal-btns button{height:32px;font-size:14px;padding:0 14px}
.mcal.sheet{position:fixed;left:0;right:0;bottom:0;top:auto;flex-direction:column;border-radius:12px 12px 0 0;max-height:90vh;max-height:90dvh;overflow-y:auto}
.mcal.sheet .cal-quick{flex-direction:row;flex-wrap:wrap;border-right:0;border-bottom:1px solid var(--line-in);min-width:0;padding:10px 12px}
.mcal.sheet .cal-quick button{border:1px solid var(--field);height:36px}
.mcal.sheet .cal-main{width:auto;padding:10px 12px 16px}
.mcal.sheet button.cal-d{height:40px}
.mcal.sheet .cal-in input{height:40px;font-size:16px}
.mcal.sheet .cal-btns button{height:44px;flex:1 1 0}
#movements{margin-top:8px}
.mtab td{vertical-align:top}
.mtab tbody tr[data-line]{cursor:pointer}
.mtab tbody tr[data-line]:hover td{background:var(--band)}
.mtab tbody tr[data-line]:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.mtab tr.sel td,.mtab tr.sel:hover td{background:var(--cream)}
.mtab .m-date{white-space:nowrap;font-variant-numeric:tabular-nums;width:4.5em}
.mtab .m-acc{white-space:nowrap}
.mtab .m-desc{overflow-wrap:anywhere;min-width:12em}
.mtab .m-art{min-width:10em;max-width:18em}
.mtab .m-za{white-space:nowrap}
.mtab .m-sum{white-space:nowrap}
.mmore{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-top:10px}
.kvs{display:flex;flex-direction:column;padding-top:12px}
.kv{display:grid;grid-template-columns:10em minmax(0,1fr);gap:4px 12px;padding:6px 0;border-bottom:1px solid var(--line-in);font-size:14px}
.kv > span:last-child{overflow-wrap:anywhere}
#mpanel .part{border-top:0;padding-top:14px;display:flex;flex-direction:column;gap:10px}
@media (max-width:899.98px){
  /* телефон: поле от 16 px — иначе браузер увеличивает страницу при вводе; высота 36 px */
  .mf select,.mf input,.mf button{height:36px}
  .mf .seg label{height:34px}
  .mf select,.mf input{font-size:16px}
}
@media (max-width:699px){
  .msearch{flex:1 1 100%}
  .mf select{flex:1 1 9em;max-width:none}
  .msel{flex:1 1 9em;min-width:0}
  button.msel-btn{width:100%;max-width:none}
  .mf button.mrange{flex:1 1 auto}
  /* «Произвольный период» на телефоне — на всю строку, иначе подпись обрезается (П10-3) */
  .mf select#mper.wide{flex:1 1 100%}
  .mf .seg{flex:1 1 auto;display:flex}
  .mf .seg label{flex:1 1 auto;padding:0 8px;white-space:nowrap;font-size:14px;line-height:1}
  .mf-more{flex:1 1 auto}
  /* телефон: из заголовка таблицы остаются только «Дата» и «Сумма» — ими сортируют (П10-3) */
  .mtab thead{display:block;background:var(--band);border-bottom:1px solid var(--line)}
  .mtab thead tr{display:flex;justify-content:space-between;padding:6px 14px}
  .mtab thead th{display:none;border:0;padding:0;background:none;width:auto}
  .mtab thead th.m-date,.mtab thead th.m-sum{display:block}
  .mtab th button.th-sort{height:32px;font-size:13px}
  .mtab tbody tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:0 8px;border-bottom:1px solid var(--line-in);padding:9px 14px}
  .mtab tbody tr:last-child{border-bottom:0}
  .mtab tbody td{border:0;padding:0;width:auto;min-width:0;max-width:none;font-size:14px}
  .mtab td.m-date{grid-column:1;grid-row:1;color:var(--muted);font-size:13px}
  .mtab td.m-acc{grid-column:2;grid-row:1;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis}
  .mtab td.m-sum{grid-column:3;grid-row:1/3;align-self:start}
  .mtab td.m-desc{grid-column:1/3;grid-row:2;padding-top:2px}
  .mtab td.m-art{grid-column:1/-1;grid-row:3;font-size:13px;color:var(--muted)}
  .mtab td.m-za{grid-column:1/-1;grid-row:4}
  .mtab td.m-za:empty{display:none}
  .mtab td.m-empty{grid-column:1/-1}
  .kv{grid-template-columns:minmax(0,1fr)}
}
/* ---------------------------------------------------------------- П13-1: Зарплаты и постоянные расходы
   П13-1в (макет «Зарплаты и постоянные расходы», решение владельца 08.11): основа — 375 px, затем от 768 px.
   Ячейка таблицы — текст (поле без рамки на всю ячейку); в режиме ввода — рамка 2 px --gold. Строки 32 px.
   Цвета только из tokens.css и :root выше; теней нет, линии 1 px. */
.fx{display:flex;flex-direction:column;gap:12px}
.fx .msg{margin:0}
.fx-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.fx-head h1{font-size:var(--text-xl);margin:0;position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.fx-tabs{display:flex;gap:6px;overflow-x:auto;max-width:100%;font-size:14px}
.fx-tabs button{height:auto;padding:5px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:14px;line-height:1.5}
.fx-tabs button[aria-selected=true]{background:var(--ink);border-color:var(--ink);color:var(--on-ink)}
.fx-tabs .t-long{display:none}
.fx-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
.fx-mon{display:flex;align-items:center;justify-content:space-between;gap:4px;flex:1 1 100%}
.fx-mon button{width:var(--touch-min);height:var(--touch-min);padding:0;border:1px solid var(--field);border-radius:8px;background:#fff;color:var(--ink)}
.fx-mon .lbl{min-width:128px;text-align:center;font-size:var(--text-base);font-weight:500}
a.fx-xlsx{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--ink)}
.fx-warn{margin:0;padding:8px 12px;font-size:14px}
.fx-note{margin:0;font-size:13px;color:var(--muted)}
.fx-sum{background:#fff;border:1px solid var(--line);border-radius:12px;padding:4px 16px;max-width:560px}
.fx-sr{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-in)}
.fx-sr:last-child{border-bottom:0}
.fx-sr.b{font-weight:500}
.tag-off{font-size:12px;color:var(--soft);white-space:nowrap}
/* таблица (от 768 px; уже — список и окно снизу) */
.fx-box{background:#fff;border:1px solid var(--line);border-radius:12px;overflow-x:auto}
table.fxt{min-width:860px;border-collapse:collapse}
.fxt th,.fxt td{padding:0;border-bottom:1px solid var(--line-in);vertical-align:middle;font-size:14px;line-height:1.5}
.fxt thead th{height:36px;padding:0 12px;color:var(--muted);font-size:13px;font-weight:400;background:none;border-bottom-color:var(--line)}
.fxt tbody tr{height:32px}
.fxt th.n,.fxt td.n{width:40px;padding:0 8px;text-align:right;color:var(--soft);font-variant-numeric:tabular-nums}
.fxt .c-kind{width:220px}.fxt .c-m{width:120px}.fxt .c-b{width:130px}.fxt .c-x{width:36px;text-align:center}
.fxt td.cell{position:relative}
.fxt td.cell:hover{background:var(--band)}
.fxt td.cell input,.fxt td.cell select{display:block;width:100%;height:31px;border:0;border-radius:0;background:transparent;padding:0 12px;font-size:14px;color:var(--ink)}
.fxt td.cell input:focus,.fxt td.cell select:focus{outline:2px solid var(--gold);outline-offset:-2px;background:#fff}
.fxt td.cell input:disabled,.fxt td.cell select:disabled{background:var(--ground);color:var(--muted)}
.fxt input.num{text-align:right;font-variant-numeric:tabular-nums}
.fxt input::placeholder,.fx-sheet input::placeholder{color:var(--soft);opacity:1}
.fxt select{appearance:none;-webkit-appearance:none;padding-right:28px;cursor:pointer}
.fxt td.cell select.none,.fx-sheet .fr select.none{color:var(--out)}
.fxt tr.add .caret{visibility:hidden}
.fxt tr.add:hover .caret,.fxt tr.add:focus-within .caret{visibility:visible}
.fxt select option{color:var(--ink)}
.fxt .caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--soft);pointer-events:none;font-size:14px}
.fxt td.c-name .tag-off{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none}
.fxt tbody tr.grp{height:28px}
.fxt tr.grp td{height:28px;padding:0 12px;background:var(--band);color:var(--muted);font-size:13px}
.fxt tr.grp td:first-child{padding:0}
.fxt tr.add td.n{text-align:center}
.fxt tr.add.last td{border-bottom-color:var(--line)}
.fxt tr.empty td{height:44px;padding:0 12px;color:var(--muted)}
.fxt tr.empty button{height:32px;margin-left:8px}
.fxt tr.tot td{height:36px;padding:0 12px;background:var(--band);font-weight:500;border-bottom:0}
.fxt tr.tot td.num{font-variant-numeric:tabular-nums}
.fxt button.more{width:36px;height:31px;border:0;border-radius:0;background:none;padding:0;color:var(--soft)}
.fxt button.more:hover{color:var(--ink)}
.fxt tr.fx-unsaved td{height:auto;padding:4px 12px 6px 48px;background:var(--bad-bg)}
.fx-menu{position:fixed;z-index:30;min-width:13em;padding:6px;background:#fff;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column}
.fx-menu button{height:36px;border:0;border-radius:6px;background:none;justify-content:flex-start;padding:0 12px;font-size:14px}
.fx-menu button:hover,.fx-menu button:focus-visible{background:var(--ground)}
.fx-menu button.bad{color:var(--bad)}
/* окно из 6 месяцев (аренда, постоянные расходы) */
.fx-win{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;font-size:14px;color:var(--muted)}
.fx-win .wc{display:flex;align-items:center;gap:4px;color:var(--ink)}
.fx-win .wc > span{padding:0 4px}
.fx-win button{width:var(--touch-min);height:var(--touch-min);padding:0;border:1px solid var(--field);border-radius:8px;background:#fff;color:var(--ink)}
.fxt th.c-mon{width:120px}
.fxt thead th.cur{color:var(--ink);border-bottom:2px solid var(--gold)}
/* аренда: квартиры × месяцы */
table.fxt.rent{min-width:900px}
.fxt td.r-apt{padding:0 12px;white-space:nowrap}
.fxt .r-note{font-size:12px;color:var(--soft)}
.fxt .r-note.q{color:var(--out)}
.fxt td.r-add select{color:var(--soft);padding-right:12px}
/* постоянные расходы: строки × месяцы и панель (на телефоне — окно снизу, от 768 px — справа от таблицы) */
.fx-note-w{max-width:860px}
.fx-split{display:flex;flex-direction:column;gap:16px}
.fx-split > .fx-box{min-width:0}
table.fxt.obs{min-width:760px}
.fxt.obs th.c-mon{width:92px;padding:0 10px}
.fxt.obs tbody tr[data-obrow]{height:44px}
.fxt.obs tr.tail td{background:var(--cream)}
.fxt.obs td.cell input{padding:0 10px}
.fxt.obs tr[data-obrow] td.cell input{height:43px}
.fxt td.o-name{padding:0 12px;line-height:1.25}
.fxt td.o-name button.link{color:var(--ink);text-decoration:none;font-size:14px;line-height:1.25}
.fxt td.o-name button.link:hover{color:var(--muted)}
.fxt .o-sub{font-size:12px;color:var(--muted)}
.fx-pback{z-index:20}
.fx-panel{position:fixed;left:0;right:0;bottom:0;z-index:21;max-height:90vh;max-height:90dvh;overflow-y:auto;background:#fff;
  border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0}
.fx-panel .ph{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 8px 8px 16px;border-bottom:1px solid var(--line);font-weight:500}
.fx-panel .ph button.x{width:var(--touch-min);height:var(--touch-min);color:var(--muted)}
.fx-panel .pb{padding:4px 16px 16px;font-size:14px}
.fx-panel .pr{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:var(--touch-min);border-bottom:1px solid var(--line-in);position:relative}
.fx-panel .pr > span:first-child{color:var(--muted);flex:0 0 auto}
.fx-panel .pr .pv{text-align:right;overflow-wrap:anywhere}
.fx-panel .pr.in{border-bottom:0}
.fx-panel .pr.in.last{border-bottom:1px solid var(--line-in)}
.fx-panel .pr input,.fx-panel .pr select{flex:1 1 auto;min-width:0;width:auto;height:42px;border:0;border-radius:0;background:transparent;padding:0;text-align:right;font-size:16px;color:var(--ink)}
.fx-panel .pr select{appearance:none;-webkit-appearance:none;text-align-last:right;padding-right:16px;cursor:pointer}
.fx-panel .pr select option{text-align:left}
.fx-panel .pr .caret{position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--soft);pointer-events:none}
.fx-panel .pr:focus-within{outline:2px solid var(--gold);outline-offset:-2px;border-radius:8px}
.fx-panel .pr input:focus,.fx-panel .pr select:focus{outline:none}
.fx-panel .pr input:disabled,.fx-panel .pr select:disabled{color:var(--muted)}
.fx-panel .ps{padding:8px 0 4px;color:var(--muted);font-size:13px}
.fx-panel .pdel{padding-top:10px}
.fx-panel .pdel button.link{font-size:13px;color:var(--bad);min-height:var(--touch-min)}
.fx-panel .pnote{margin:10px 0 0;font-size:12px;color:var(--muted)}
.fx-panel .fx-unsaved{margin:8px 0 0}
/* телефон: список «Сотрудник — оклад» и окно снизу */
.fx-list{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.fx-list .lh{display:flex;justify-content:space-between;padding:6px 12px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line)}
.fx-list .lg{padding:4px 12px;background:var(--band);font-size:13px;color:var(--muted);border-bottom:1px solid var(--line-in)}
.fx-list button.pl{display:flex;width:100%;justify-content:space-between;align-items:center;gap:12px;min-height:var(--touch-min);height:auto;
  padding:4px 12px;border:0;border-bottom:1px solid var(--line-in);border-radius:0;background:#fff;text-align:left;white-space:normal;font-size:15px}
.fx-list .pl-it:last-of-type button.pl{border-bottom-color:var(--line-in)}
.fx-list button.pl.add{color:var(--soft)}
.fx-list button.pl:last-child{border-bottom:0}
.fx-list .pl .nm{line-height:1.2;min-width:0;overflow-wrap:anywhere}
.fx-list .pl .k{display:block;font-size:12px;color:var(--muted)}
.fx-list .pl .k.none{color:var(--out)}
.fx-list .pl-empty{padding:10px 12px;color:var(--muted);border-bottom:1px solid var(--line-in)}
.fx-list .pl-empty button{margin-top:8px;width:100%}
.fx-list .fx-unsaved{margin:0;padding:4px 12px 6px;background:var(--bad-bg)}
.fx-back{z-index:20}
.fx-sheet{position:fixed;left:0;right:0;bottom:0;z-index:21;max-height:90vh;max-height:90dvh;overflow-y:auto;background:#fff;
  border-radius:12px 12px 0 0;padding:8px 16px 20px}
.fx-sheet .grab{width:36px;height:4px;border-radius:2px;background:var(--field);margin:0 auto 8px}
.fx-sheet .sh{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:6px;font-weight:500}
.fx-sheet .sh button.x{width:var(--touch-min);height:var(--touch-min);color:var(--muted)}
.fx-sheet .fr{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:var(--touch-min);border-bottom:1px solid var(--line-in);padding:0 8px;margin:0 -8px;border-radius:8px}
.fx-sheet .fr > span{color:var(--muted);flex:0 0 auto}
.fx-sheet .fr:focus-within{outline:2px solid var(--gold);outline-offset:-2px}
.fx-sheet .fr input,.fx-sheet .fr select{flex:1 1 auto;min-width:0;width:auto;height:42px;border:0;background:transparent;padding:0;text-align:right;font-size:16px}
.fx-sheet .fr select{text-align-last:right}
.fx-sheet .fr input.num{font-variant-numeric:tabular-nums}
.fx-sheet .fr input:focus,.fx-sheet .fr select:focus{outline:none}
.fx-sheet .sh-note{margin:0;padding-top:10px;font-size:12px;color:var(--muted)}
.fx-sheet .sh-act{display:flex;flex-wrap:wrap;gap:8px 20px;padding-top:12px;font-size:14px}
.fx-sheet .sh-act button.link{min-height:var(--touch-min)}
.fx-sheet .btns button.main{width:100%}
.fx-sheet .fx-unsaved{margin:8px 0 0}
@media (min-width:768px){
  .fx{gap:16px}
  .fx-head h1{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
  .fx-tabs{gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
  .fx-tabs button{border:0;border-radius:0;padding:6px 14px}
  .fx-tabs button + button{border-left:1px solid var(--line)}
  .fx-tabs .t-long{display:inline}
  .fx-tabs .t-short{display:none}
  .fx-mon{flex:0 0 auto;justify-content:flex-start}
  .fx-mon button{width:32px;height:32px}
  .fx-win button{width:28px;height:28px}
  .fx-split{flex-direction:row;flex-wrap:wrap;align-items:flex-start}
  .fx-split > .fx-box{flex:999 1 560px}
  .fx-pback{display:none}
  .fx-panel{position:static;flex:1 1 344px;max-width:360px;max-height:none;overflow:visible;border-bottom:1px solid var(--line);border-radius:12px}
  .fx-panel .ph{padding:12px 16px}
  .fx-panel .ph button.x{width:28px;height:28px}
  .fx-panel .pb{padding:4px 16px 12px}
  .fx-panel .pr{min-height:0;padding:8px 0}
  .fx-panel .pr.in{padding:6px 0}
  .fx-panel .pr input,.fx-panel .pr select{height:22px;font-size:14px}
}
/* журнал правок */
.fxtab td,.fxtab th{padding:6px 10px;font-size:14px;vertical-align:middle}
/* ---------------------------------------------------------------- П13-2 (8а): Квартиры — пары id PMS и модуля бронирования
   Одна таблица с группами по зданию, как «Начальные остатки»: без плашек; «сопоставьте» — строка с кремовым фоном. */
.a-filter{display:flex;align-items:center;gap:8px;white-space:nowrap}
.a-filter select{width:auto;min-width:12em}
.atab td{vertical-align:middle}
.atab .a-num{width:72px;font-variant-numeric:tabular-nums}
.atab .a-sale{width:200px}
.atab .a-show{width:120px}
.atab .a-show label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.atab tr.need td{background:var(--cream)}
.atab .a-pick{display:inline-flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.atab .a-pick select{width:auto;min-width:11em;max-width:16em}
.atab .a-pick input{width:7em}
.atab button.a-ok{height:32px;margin-left:6px}
.a-extra td:first-child{width:40%}
@media (max-width:699px){
  .atab thead{display:none}
  .atab tr:not(.grp){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:10px 12px;border-bottom:1px solid var(--line-in)}
  .atab tbody tr:last-child{border-bottom:0}
  .atab tr:not(.grp) td{border:0;padding:0;width:auto;background:none}
  .atab tr.need{background:var(--cream)}
  .atab td.a-num{grid-column:1;grid-row:1}
  .atab td.a-pms{grid-column:1;grid-row:2;font-size:13px;color:var(--muted)}
  .atab td.a-rs-c{grid-column:1/-1;grid-row:3}
  .atab td.a-sale{grid-column:1/-1;grid-row:4;font-size:13px}
  .atab td.a-show{grid-column:2;grid-row:1/3;align-self:center}
  .atab .a-show .a-lbl{font-size:13px}
  .a-extra tr:not(.grp){grid-template-columns:minmax(0,1fr)}
  .a-extra td:first-child{width:auto}
  .head-row .a-filter{width:100%}
}
.a-need-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:10px}
.a-need-row .notice{margin:0}
.a-bulk-list{margin:0;padding:0;list-style:none;max-height:260px;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(13em,1fr));gap:2px 16px}
