/* public/ui-g.css — новый вид BelstCRM «Г» (утверждён владельцем 29.10.2026), пакет Г0: оболочка.
   Всё — только под html.ui-g: прежний вид не меняется. Строит панель и шапку public/ui-g.js.
   Размеры и цвета — токенами (задание claude/interfeys/zadanie-svodnomu-chatu-interfeys-g.md, §5):
   «Просторно» — по умолчанию, «Компактно» — html.density-compact (личная настройка «Плотность»). */

/* Шрифт Inter — файлами в пакете (лицензия SIL OFL 1.1 — public/fonts/Inter-OFL.txt), без интернета. */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------------------ токены */
html.ui-g {
  --g-bg: #F3F6F9; --g-surface: #FFFFFF; --g-surface2: #F7FAFC; --g-ink: #0B2B44; --g-muted: #4A6175; --g-line: #DCE5EC;
  --g-brand: #1F6699; --g-brand2: #17507A; --g-on-brand: #FFFFFF; --g-pale: #E3F1F8; --g-pale-ink: #17507A;
  --g-accent: #C2410C; --g-on-accent: #FFFFFF;
  --g-ok: #1E7A46; --g-ok-bg: #E3F4EA; --g-warn: #8A5A00; --g-warn-bg: #FFF1CC; --g-bad: #B42318; --g-bad-bg: #FDE8E6;
  --g-side: #0B2B44; --g-side-ink: #D3E1EC; --g-side-mute: #8FA9BF; --g-side-hover: #123A59; --g-side-on: #1F6699;
  --g-pad: 28px; --g-gap: 22px; --g-row: 56px; --g-item: 44px; --g-fs: 15px; --g-card: 18px;
  --g-ctl: 44px; --g-ctl-sm: 36px; --g-tab: 40px; --g-search: 48px;
  --g-side-w: 264px; --g-tabbar-h: 0px;
  --g-font: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  /* прежние переменные программы — в цветах «Г», чтобы разделы до своих пакетов (Г1–Г6) не спорили с оболочкой */
  --bg: var(--g-bg); --surface: var(--g-surface); --text: var(--g-ink); --muted: var(--g-muted); --border: var(--g-line);
  --primary: var(--g-brand); --primary-dark: var(--g-brand2); --accent-btn: var(--g-brand); --accent-btn-hover: var(--g-brand2);
}
html.ui-g[data-theme="dark"] {
  --g-bg: #08131D; --g-surface: #0F2131; --g-surface2: #0C1B28; --g-ink: #E6EEF5; --g-muted: #9DB2C4; --g-line: #203747;
  --g-brand: #5AA9E6; --g-brand2: #8CC4EE; --g-on-brand: #06121C; --g-pale: #12314A; --g-pale-ink: #A9D3F2;
  --g-accent: #F2914F; --g-on-accent: #1A0A00;
  --g-ok: #6FD49A; --g-ok-bg: #10301F; --g-warn: #F0C25A; --g-warn-bg: #33270A; --g-bad: #F4867B; --g-bad-bg: #3A1714;
  --g-side: #050E16; --g-side-hover: #0F2131; --g-side-on: #1F6699;
  --bg: var(--g-bg); --surface: var(--g-surface); --text: var(--g-ink); --muted: var(--g-muted); --border: var(--g-line);
  --primary: var(--g-brand); --primary-dark: var(--g-brand2);
}
html.ui-g.density-compact { --g-pad: 18px; --g-gap: 14px; --g-row: 42px; --g-item: 36px; --g-fs: 14px; --g-card: 14px; }

html.ui-g body { font-family: var(--g-font); background: var(--g-bg); color: var(--g-ink); font-feature-settings: 'cv11' 1; }
html.ui-g button, html.ui-g input, html.ui-g select, html.ui-g textarea { font-family: inherit; }

/* ------------------------------------------------------------ раскладка */
html.ui-g #app-shell { padding-left: var(--g-side-w); }
html.ui-g .g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ боковая панель */
.g-side { display: none; }
html.ui-g .g-side {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: var(--g-side-w);
  display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 12px;
  background: var(--g-side); color: var(--g-side-ink); overflow: hidden;
}
html.ui-g .g-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; min-height: 52px; padding: 0 10px; margin-bottom: 6px; border-radius: 10px; color: #FFFFFF; text-decoration: none; }
/* 07.11.2026 (вариант Б): настоящий знак belst.by + значок «CRM»; ссылка на сайт, ↗ — при наведении */
html.ui-g .g-brand { gap: 10px; }
html.ui-g .g-brand-mk { display: block; flex: 0 0 auto; width: auto; height: 40px; }
html.ui-g .g-brand:hover { background: var(--g-side-hover); }
html.ui-g .g-brand:focus-visible { outline: 2px solid #8CC4EE; outline-offset: -2px; }
html.ui-g .g-brand-t { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; color: #FFFFFF; }
html.ui-g .g-brand-by { color: #8CC4EE; }
html.ui-g .g-brand-crm { flex: 0 0 auto; padding: 4px 6px 3px; border-radius: 6px; background: #1F6699; color: #DDEEFB; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .08em; }
html.ui-g .g-brand-ext { margin-left: auto; color: var(--g-side-mute); font-size: 14px; opacity: 0; transition: opacity .15s; }
html.ui-g .g-brand:hover .g-brand-ext, html.ui-g .g-brand:focus-visible .g-brand-ext { opacity: 1; }
html.ui-g.g-mini .g-brand { justify-content: center; padding: 0; }
html.ui-g.g-mini .g-brand-crm, html.ui-g.g-mini .g-brand-ext { display: none; }

/* меню переехало в панель: сбрасываем всё, что было у строки меню в шапке */
html.ui-g .g-side .topbar-nav.g-nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; flex-wrap: nowrap; background: none; }
html.ui-g .g-side .g-scroll { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: #2B4A63 transparent; }
html.ui-g .g-side .g-group { display: flex; flex-direction: column; gap: 2px; }
html.ui-g .g-side .g-group[hidden], html.ui-g .g-side .g-h[hidden] { display: none; }
html.ui-g .g-side .g-h { margin: 14px 12px 6px; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--g-side-mute); white-space: nowrap; }
html.ui-g .g-side .g-foot-nav { flex: 0 0 auto; margin-top: 4px; padding-top: 8px; border-top: 1px solid #1B3B55; }

html.ui-g .g-side button.g-item,
html.ui-g .g-side .topbar-nav button.g-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: var(--g-item); height: var(--g-item); padding: 0 12px; margin: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--g-side-ink);
  font: 500 14px/1.2 var(--g-font); text-align: left; white-space: nowrap; cursor: pointer; box-shadow: none;
}
html.ui-g .g-side button.g-item::before { display: none !important; }
html.ui-g .g-side button.g-item[hidden]:not(.g-keep) { display: none; }
html.ui-g .g-side button.g-item:hover:not(:disabled) { background: var(--g-side-hover); color: #FFFFFF; border: 0; }

/* 01.11.2026 (замечание владельца 22:15, снимок меню): при наведении пункт меню становился почти белым, а текст
   оставался белым — пропадал. Общее правило кнопок (style.css «button:hover:not(...)» — светлый фон #eef6fd)
   перебивало правило панели. Теперь в панели при наведении — тёмно-синий фон панели и белый текст и значок. */
html.ui-g #g-side button.g-item:hover:not(:disabled),
html.ui-g #g-side .g-pair > #btn-chat-win:hover:not(:disabled) { background: var(--g-side-hover); background-color: var(--g-side-hover); color: #FFFFFF; border-color: transparent; filter: none; }
html.ui-g #g-side button.g-item:hover:not(:disabled) :is(.g-lbl, .g-ico, svg) { color: #FFFFFF; }
html.ui-g #g-side button.g-item.active:hover:not(:disabled) { background-color: var(--g-side-on, var(--g-brand)); }
html.ui-g .g-side button.g-item:focus-visible { outline: 2px solid #8CC4EE; outline-offset: -2px; }
html.ui-g .g-side button.g-item.active,
html.ui-g .g-side button.g-item[aria-current="page"],
html.ui-g .g-side button.g-item.is-current { background: var(--g-side-on); color: #FFFFFF; border: 0; }
html.ui-g .g-side .g-ico { flex: 0 0 20px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
html.ui-g .g-side .g-lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.ui-g .g-side .g-item .nav-count,
html.ui-g .g-side .g-item .orders-badge,
html.ui-g .g-side .g-item .ch-nav-count,
html.ui-g .g-side #btn-chat .ch-nav-count {
  flex: 0 0 auto; margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border: 0; border-radius: 10px;
  background: var(--g-accent); color: var(--g-on-accent); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: none;
}
html.ui-g .g-side .g-item .nav-count[hidden], html.ui-g .g-side .g-item .orders-badge[hidden], html.ui-g .g-side .g-item .ch-nav-count[hidden] { display: none; }
html.ui-g .g-side .g-item .nav-count + .nav-count { margin-left: 4px; background: #5B7A93; color: #FFFFFF; }
html.ui-g .g-side .g-item.leads-pulse { animation: none; }
html.ui-g .g-side .g-item.leads-pulse .orders-badge { animation: gPulse 1.2s ease-in-out infinite; }
@keyframes gPulse { 50% { box-shadow: 0 0 0 4px rgba(194, 65, 12, .35); } }
@media (prefers-reduced-motion: reduce) { html.ui-g .g-side .g-item.leads-pulse .orders-badge { animation: none; } }

/* «Чат» и «⧉ в отдельном окне» — одна строка */
html.ui-g .g-side .g-pair { display: flex; align-items: center; gap: 2px; }
html.ui-g .g-side .g-pair > #btn-chat { flex: 1 1 auto; min-width: 0; }
html.ui-g .g-side .g-pair > #btn-chat[hidden] { display: none; }
html.ui-g .g-side .g-pair > #btn-chat-win { flex: 0 0 36px; width: 36px; min-height: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--g-side-mute); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
html.ui-g .g-side .g-pair > #btn-chat-win:hover { background: var(--g-side-hover); color: #FFFFFF; }
html.ui-g .g-side .g-pair > #btn-chat-win[hidden] { display: none; }

html.ui-g .g-foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
html.ui-g .g-side button.g-collapse { color: var(--g-side-mute); }
html.ui-g .g-motto { margin: 10px 12px 2px; font-size: 12px; line-height: 1.45; color: var(--g-side-mute); }
html.ui-g .g-motto span { display: block; }

/* свёрнута до значков: html.g-mini ставит ui-g.js — по настройке «Свёрнуто» или сама на экране уже 1360
   (ноутбук 1280, 1024): там «Развернуть» открывает панель поверх страницы (g-peek), не сдвигая её. */
html.ui-g.g-collapsed, html.ui-g.g-narrow { --g-side-w: 80px; }
html.ui-g .g-side { transition: width .16s ease, box-shadow .16s ease; }
@media (prefers-reduced-motion: reduce) { html.ui-g .g-side { transition: none !important; } }
html.ui-g.g-mini .g-side .g-lbl, html.ui-g.g-mini .g-brand-t, html.ui-g.g-mini .g-motto, html.ui-g.g-mini .g-side .g-pair > #btn-chat-win { display: none; }
html.ui-g.g-mini .g-side .g-h { height: 1px; margin: 10px 14px; padding: 0; overflow: hidden; color: transparent; background: #24435C; }
html.ui-g.g-mini .g-side button.g-item { justify-content: center; width: 56px; padding: 0; margin: 0 auto; }
html.ui-g.g-mini .g-brand { justify-content: center; padding: 0; width: 56px; margin: 0 auto 6px; }
html.ui-g.g-mini .g-side .g-item .nav-count,
html.ui-g.g-mini .g-side .g-item .orders-badge,
html.ui-g.g-mini .g-side .g-item .ch-nav-count { position: absolute; top: 1px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; line-height: 18px; margin: 0; }
html.ui-g.g-mini .g-side .g-item .nav-count + .nav-count { display: none; }
html.ui-g.g-peek .g-side { width: 264px; box-shadow: 12px 0 32px rgba(5, 14, 22, .32); }

/* ------------------------------------------------------------ шапка */
html.ui-g .topbar.tb2 { background: var(--g-surface); border-bottom: 1px solid var(--g-line); box-shadow: none; z-index: 30; }
html.ui-g .tb2 > .tb-row1 { display: flex; flex-wrap: nowrap; align-items: center; gap: 16px; min-height: 76px; padding: 14px var(--g-pad); }
html.ui-g .tb2 .brand-logo-link, html.ui-g .tb2 .brand-sep, html.ui-g .tb2 .tb-row1 > .motto { display: none; }
html.ui-g .tb2 > .tb-row1 > .topbar-actions { flex: 0 0 auto; padding: 0; margin: 0; border: 0; gap: 8px; }
html.ui-g .tb2 > .tb-row1 > .topbar-actions:not(:has(> :not([hidden]))) { display: none; }
html.ui-g #btn-back-top { display: inline-flex; align-items: center; gap: 6px; min-height: var(--g-ctl); height: var(--g-ctl); padding: 0 16px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-surface); color: var(--g-ink); font: 500 14px/1.2 var(--g-font); white-space: nowrap; }
html.ui-g #btn-back-top:hover { border-color: var(--g-brand); }
html.ui-g #btn-back-top[hidden] { display: none; }

html.ui-g .g-search { position: relative; flex: 1 1 360px; min-width: 240px; max-width: 680px; margin: 0; }
html.ui-g .tb2 .acc-who { max-width: 190px; min-width: 0; }
html.ui-g .tb2 .acc-name, html.ui-g .tb2 .acc-pos { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui-g .g-search input[type="search"] {
  display: block; width: 100%; height: var(--g-search); min-height: var(--g-search); margin: 0; padding: 0 84px 0 48px;
  border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface2); color: var(--g-ink);
  font: 400 15px/1.2 var(--g-font); box-shadow: none;
}
html.ui-g .g-search input[type="search"]::placeholder { color: var(--g-muted); opacity: 1; }
html.ui-g .g-search input[type="search"]:focus { outline: none; border-color: var(--g-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-brand) 22%, transparent); background: var(--g-surface); }
html.ui-g .g-search-drop { position: absolute; left: 15px; top: 50%; width: 22px; height: 22px; margin-top: -11px; pointer-events: none; display: flex; }
html.ui-g .g-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 4px 8px; border: 1px solid var(--g-line); border-radius: 6px; background: var(--g-surface); color: var(--g-muted); font: 600 12px/1 var(--g-font); pointer-events: none; }
html.ui-g .g-search input[type="search"]:focus ~ .g-kbd { display: none; }
html.ui-g .g-q-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; padding: 6px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); box-shadow: 0 12px 32px rgba(11, 43, 68, .16); }
html.ui-g .g-q-list[hidden] { display: none; }
html.ui-g .g-q-opt { display: flex; align-items: center; gap: 12px; min-height: var(--g-ctl); padding: 0 12px; border-radius: 10px; color: var(--g-ink); font-size: 14px; cursor: pointer; }
html.ui-g .g-q-opt .g-ico { flex: 0 0 18px; display: inline-flex; color: var(--g-muted); }
html.ui-g .g-q-opt.on, html.ui-g .g-q-opt:hover { background: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g .g-q-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html.ui-g .tb2 #clock { margin-left: auto; flex: 0 0 auto; }
html.ui-g .tb2 .topbar-account { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 10px; padding: 0 0 0 16px; border-left: 1px solid var(--g-line); }
html.ui-g .g-ava { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--g-brand); color: var(--g-on-brand); font: 600 14px/1 var(--g-font); letter-spacing: .02em; }
html.ui-g .tb2 .acc-who { line-height: 1.25; text-align: left; }
html.ui-g .tb2 .acc-name { font-size: 14px; font-weight: 600; color: var(--g-ink); }
html.ui-g .tb2 .acc-pos { font-size: 12px; color: var(--g-muted); }
html.ui-g .tb2 #btn-logout { min-height: var(--g-ctl-sm); height: var(--g-ctl-sm); padding: 0 12px; border: 1px solid var(--g-line); border-radius: 10px; background: var(--g-surface); color: var(--g-ink); font: 500 13px/1 var(--g-font); }
html.ui-g .tb2 #btn-logout:hover { border-color: var(--g-brand); }
@media (max-width: 1279px) { html.ui-g .tb2 .acc-who { display: none; } }

/* ------------------------------------------------------------ телефон: шторка и нижние вкладки */
.g-tabbar, .g-backdrop { display: none; }
@media (max-width: 760px) {
  html.ui-g, html.ui-g.g-collapsed { --g-side-w: 0px; --g-pad: 14px; --g-tabbar-h: 64px; }
  html.ui-g .g-side { width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; z-index: 1900; box-shadow: none; }
  html.ui-g.g-drawer .g-side { transform: none; box-shadow: 12px 0 32px rgba(0, 0, 0, .3); }
  html.ui-g .g-side .g-lbl, html.ui-g .g-brand-t, html.ui-g .g-motto { display: block; }
  html.ui-g.g-mini .g-side .g-brand { justify-content: flex-start; padding: 0 10px; }
  html.ui-g.g-mini .g-side .g-brand-crm { display: inline-block; }
  html.ui-g .g-side button.g-collapse { display: none; }
  html.ui-g .g-backdrop { position: fixed; inset: 0; z-index: 1890; background: rgba(5, 14, 22, .45); }
  html.ui-g:not(.g-drawer) .g-backdrop { display: none; }
  html.ui-g.g-drawer .g-backdrop { display: block; }

  html.ui-g .g-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1700; display: flex; align-items: stretch;
    height: calc(var(--g-tabbar-h) + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: var(--g-surface); border-top: 1px solid var(--g-line);
  }
  html.ui-g .g-tab { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; height: 100%; padding: 6px 2px; margin: 0; border: 0; border-radius: 0; background: none; color: var(--g-muted); font: 500 12px/1.1 var(--g-font); }
  html.ui-g .g-tab .g-ico { display: inline-flex; }
  html.ui-g .g-tab-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.ui-g .g-tab.active { color: var(--g-brand); font-weight: 600; }
  html.ui-g .g-tab-cnt { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--g-accent); color: var(--g-on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  html.ui-g .g-tab-cnt[hidden] { display: none; }
  html.ui-g #app-shell { padding-bottom: calc(var(--g-tabbar-h) + env(safe-area-inset-bottom, 0px)); }

  html.ui-g .tb2 > .tb-row1 { flex-wrap: wrap; gap: 10px; min-height: 0; padding: 10px var(--g-pad); }
  html.ui-g .g-search { order: 10; flex: 1 1 100%; max-width: none; }
  html.ui-g .g-kbd { display: none; }
  html.ui-g .tb2 #clock { margin-left: 0; }
  html.ui-g .tb2 .topbar-account { margin-left: auto; padding-left: 0; border-left: 0; }
  html.ui-g .g-ava { flex-basis: 36px; width: 36px; height: 36px; font-size: 13px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { html.ui-g .g-side { transition: none; } }
@media print { html.ui-g .g-side, html.ui-g .g-tabbar, html.ui-g .g-backdrop { display: none !important; } html.ui-g #app-shell { padding: 0; } }

/* ------------------------------------------------------------ счётчики: срочное — оранжевым, справочное — спокойным */
html.ui-g .g-side .g-item .nav-count { background: #2B4A63; color: #E6EEF5; }
html.ui-g .g-side .g-item .nav-count[data-count="tenders"], html.ui-g .g-side .g-item .nav-count[data-count="igWaiting"], html.ui-g .g-side .g-item .g-auto-count { background: var(--g-accent); color: var(--g-on-accent); }
html.ui-g .g-side .g-item .nav-count + .nav-count { margin-left: 4px; background: #2B4A63; color: #E6EEF5; }

/* ------------------------------------------------------------ тестовая копия: полоса и метка — правее панели */
html.ui-g .test-copy-bar { margin-left: var(--g-side-w); }
html.ui-g .test-copy-tag { left: calc(var(--g-side-w) + 12px); }
@media (max-width: 760px) { html.ui-g .test-copy-tag { bottom: calc(var(--g-tabbar-h) + 12px); } }

/* ------------------------------------------------------------ правки к прежним правилам шапки телефона (КИ-2) */
html.ui-g .g-side #btn-catalog, html.ui-g .g-side #btn-structure { font-size: 14px; min-width: 0; padding: 0 12px; justify-content: flex-start; }
html.ui-g.g-mini .g-side #btn-catalog, html.ui-g.g-mini .g-side #btn-structure { padding: 0; justify-content: center; }
html.ui-g .g-side #btn-catalog::before, html.ui-g .g-side #btn-structure::before { content: none; display: none; }
html.ui-g .g-mbrand { display: none; }
@media (max-width: 760px) {
  html.ui-g .g-mbrand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--g-ink); font: 700 18px/1 var(--g-font); letter-spacing: -0.02em; text-decoration: none; }
  html.ui-g .g-mbrand .g-brand-mk { height: 30px; }
  html.ui-g .g-mbrand .g-brand-t { font-size: 19px; font-weight: 800; color: var(--g-ink); }
  html.ui-g .g-mbrand .g-brand-by { color: var(--g-brand); }
  html.ui-g .g-mbrand .g-brand-crm { padding: 3px 5px 2px; border-radius: 5px; background: var(--g-pale); color: var(--g-pale-ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; } /* №261116-КИ-8: было 10 px, шкала Г — от 11 */
  html.ui-g .g-mbrand .g-brand-ext { display: none; }
}

/* «Назад» на экране уже 1600 и на телефоне: только стрелка (полная подпись — во всплывающей подсказке и для экранного диктора) */
@media (max-width: 1599px) {
  html.ui-g #btn-back-top { width: var(--g-ctl); padding: 0; justify-content: center; font-size: 0; }
  html.ui-g #btn-back-top::before { content: "←"; font-size: 18px; font-weight: 600; }
}

/* ------------------------------------------------------------ колокольчик уведомлений */
html.ui-g .g-bell { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--g-ctl); min-width: var(--g-ctl); height: var(--g-ctl); min-height: var(--g-ctl); padding: 0; margin: 0 0 0 auto; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-surface); color: var(--g-ink); }
html.ui-g .g-bell:hover:not(:disabled) { border-color: var(--g-brand); }
html.ui-g .g-bell:disabled { color: var(--g-muted); opacity: 1; cursor: default; }
html.ui-g .g-bell[aria-pressed="true"] { background: var(--g-pale); border-color: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g .g-bell-cnt { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--g-accent); color: var(--g-on-accent); font: 700 11px/18px var(--g-font); text-align: center; }
html.ui-g .g-bell-cnt[hidden] { display: none; }
html.ui-g .g-bell ~ #clock { margin-left: 0; }
@media (max-width: 900px) { html.ui-g .g-bell { display: none; } html.ui-g .g-bell ~ #clock { margin-left: auto; } }

/* ------------------------------------------------------------ Капля и стопка уведомлений (Р7: Капля ничего не закрывает)
   На компьютере Капля — в правом нижнем углу, стопка уведомлений — над ней, в своей полосе справа;
   внизу страницы — запас под Каплю, чтобы последняя строка и кнопки поднимались выше неё. */
/* Место под Каплю оставляем всегда (а не когда она появится): иначе стопка и низ страницы прыгают после загрузки (Р13). */
@media (min-width: 901px) {
  html.ui-g .notice-stack { bottom: 104px; max-height: calc(100vh - var(--g-head-bottom, 112px) - 124px); }
  html.ui-g #app-shell { padding-bottom: 88px; }
}
@media (max-width: 760px) {
  html.ui-g #app-shell { padding-bottom: calc(var(--g-tabbar-h) + 84px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 760px) {
  /* плашка уведомлений и другие нижние полосы — над вкладками, а не под ними */
  html.ui-g .notice-stack { bottom: calc(var(--g-tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------ нижние полосы программы — в пределах рабочей области (правее панели, над вкладками телефона) */
html.ui-g .om-dock { left: calc(var(--g-side-w) + 16px); max-width: calc(100vw - var(--g-side-w) - 32px); }
html.ui-g .stc-bar, html.ui-g .win-dock { left: calc(50% + var(--g-side-w) / 2); }
@media (max-width: 760px) {
  html.ui-g .om-dock, html.ui-g .win-dock { bottom: calc(var(--g-tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); }
  html.ui-g .stc-bar { bottom: calc(var(--g-tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  html.ui-g .ch-pops { bottom: calc(var(--g-tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
}

/* пока разделы «приходят» после входа (до 1,5 с) — список не показываем, чтобы пункты не прыгали */
html.ui-g.g-wait .g-side .g-scroll, html.ui-g.g-wait .g-tabbar .g-tab { visibility: hidden; }

/* =====================================================================================
   Г0.1 (30.10.2026) — РОВНО ВНУТРИ РАЗДЕЛОВ. Замечание владельца 30.10: «неровно, много таких же неровностей
   в настройках» (снимок «Финансов»: переключатель 40, списки 39, поля 37, кнопки 38 и 32 в одном ряду).
   Одна высота для всех элементов управления содержимого — как в задании §5: кнопка и поле 44, малая 36,
   вкладка 40; в таблицах — 36. Прежние переменные программы (--btn-h, --ctl-h, --tab-h) — те же значения,
   поэтому все места, где они уже используются, выравниваются сами. Оболочка (панель, шапка) — выше по файлу.
   ===================================================================================== */
html.ui-g { --g-ctl: 44px; --g-ctl-sm: 36px; --g-tab: 40px; --btn-h: var(--g-ctl); --btn-h-sm: var(--g-ctl-sm); --tab-h: var(--g-tab); --ctl-h: var(--g-ctl); }

/* поля ввода и списки — ровно 44 (раньше 37 и 39); :not(#g-x) — чтобы перебить старые правила с id */
html.ui-g :is(input[type="text"], input[type="password"], input:not([type]), input[type="number"], input[type="search"], input[type="date"], input[type="email"], input[type="datetime-local"], input[type="tel"], input[type="month"], input[type="time"], input[type="url"], select):not([multiple]):not([size]):not(#g-x) {
  height: var(--g-ctl); min-height: 0; padding-top: 0; padding-bottom: 0; box-sizing: border-box; line-height: normal;
}
/* обычные кнопки — 44, малые — 36; подпись по центру, в одну строку */
html.ui-g :is(#app, .modal-overlay, .modal-box, .om-box, .staff-drawer, .help-panel, .asst-win, .ch-ov, .ctx-overlay, .settings-page) :is(button, a.ghost, a.btn-link, .btn-link):not(:where(.small, .link-small, .kba-btn, .hn-row, .hn-x, .notice-close, .help-close, .lightbox-close, .ss-x, .tc-row, .home-sec, .home-tile, .ls-tile, .set-mi, .tab-btn, .o-tab, .ap-tab, .cl-kind-tab, .vs-btn, .td-tab, .sg-tab, .cs-tab, .td-sb-btn, .st-toggle, .st-eye, .st-more-btn, .st-stat, .to-edge, .to-top, .kba-tree *, .switch *, .fin-seg *, .fin-tabs *, .kb-tabs *, .view-switch *, .om-header *, .modal-head *, .asst-head *, .orders-list *, .lead-card *, .notice-stack *, td *, th *, [role="tab"], .hg-kpi, .hg-tab, .hg-what-b, .hg-dl-row)) {
  min-height: var(--g-ctl); box-sizing: border-box; padding-top: 0; padding-bottom: 0;
}
html.ui-g :is(#app, .modal-overlay, .modal-box, .om-box, .staff-drawer, .help-panel, .settings-page) :is(button.small, .ghost.small, button.link-small, button.outline.small):not(:where(td *, th *, .hn-row, .hn-x, .notice-close, .om-header *, .modal-head *)) {
  min-height: var(--g-ctl-sm); box-sizing: border-box; padding-top: 0; padding-bottom: 0;
}
/* малая кнопка рядом с полем или обычной кнопкой — той же высоты, что соседи (Р2: один ряд — одна высота) */
html.ui-g :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, button:not(.small):not(.link-small)) ~ :is(button.small, button.link-small, .ghost.small):not(:where(td *, th *, .notice-close, .hn-x)),
html.ui-g :is(button.small, button.link-small, .ghost.small):not(:where(td *, th *, .notice-close, .hn-x)):has(~ :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, button:not(.small):not(.link-small))) {
  min-height: var(--g-ctl); height: var(--g-ctl);
}
/* в таблицах — всё 36 */
html.ui-g :is(td, th) :is(input[type="text"], input:not([type]), input[type="number"], input[type="search"], input[type="date"], input[type="email"], input[type="tel"], select):not([multiple]):not(#g-x) { height: var(--g-ctl-sm); }
html.ui-g :is(td, th) :is(button, a.ghost):not(:where(.st-toggle, .st-eye, .hn-x, .notice-close, .kba-tree *)) { min-height: var(--g-ctl-sm); box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
/* вкладки — 40 */
html.ui-g :is(.tab-btn, .o-tab, .ap-tab, .cl-kind-tab, .td-tab, .sg-tab, .cs-tab, .kb-tabs button, .fin-tabs button, [role="tab"]):not(.topbar *):not(.g-side *) { min-height: var(--g-tab); box-sizing: border-box; }
/* переключатели в рамке («БСТ | Астрал Бел | Группа», «Список | Плитки») — снаружи 44, кнопки внутри — во всю высоту */
html.ui-g :is(.fin-seg, .view-switch) { height: var(--g-ctl); box-sizing: border-box; align-items: stretch; }
html.ui-g :is(.fin-seg, .view-switch) > button { height: auto; min-height: 0; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; margin: 0; }
/* подписи «Год», «Период», флажки — по центру ряда; поле в ряду не тянет за собой нижний отступ */
html.ui-g :is(.fin-bar, .list-toolbar, .clients-toolbar, .td-toolbar, .st-toolbar, .stock-actions, .of-actions, .of-filters, .set-row, .ss-inline) :is(input, select) { margin-bottom: 0; }
html.ui-g .fin-bar label { min-height: var(--g-ctl); margin: 0; }
/* «Список | Плитки» и переключатель организаций «Офиса» — кнопки во всю высоту рамки 44 */
html.ui-g .vs-btn { height: auto; min-height: var(--g-ctl); }
html.ui-g :is(.view-switch, .fin-seg) .vs-btn { min-height: 0; height: auto; }
/* поле в одном ряду с кнопкой — без нижнего отступа (он нужен только полям в столбик), иначе оно выше кнопки на 6 точек */
html.ui-g :is(div, form, span, p, nav, section, li):has(> :is(button, a.ghost)):has(> :is(input, select)) > :is(input, select) { margin-bottom: 0; }
html.ui-g :is(div, form, span, p, nav, section, li):has(> :is(button, a.ghost)):has(> label > :is(input, select)) > label > :is(input, select) { margin-bottom: 0; }
html.ui-g :is(div, form, span, p, nav, section, li):has(> :is(input, select) ~ :is(input, select)) > :is(input, select) { margin-bottom: 0; }
/* в ряду с полями под подписью кнопка встаёт по низу — на одну линию с полем */
html.ui-g :is(div, form):has(> label > :is(input, select)):has(> :is(button, a.ghost)) { align-items: flex-end; }
/* заголовок окна заявки: «Свернуть» и «✕» — малые, 36 */
html.ui-g :is(.om-header, .modal-head) :is(button, .om-minimize, .om-close) { min-height: var(--g-ctl-sm); height: var(--g-ctl-sm); box-sizing: border-box; padding-top: 0; padding-bottom: 0; }

/* часы в шапке — постоянной высоты при любом состоянии дня (замечание Сводного чата 29.10: шапка «прыгала»
   между «Рабочее время · до …» и «Рабочий день окончен», а с ней — вся страница и сверка снимков Р15) */
html.ui-g .tb2 #clock { display: flex; align-items: center; gap: 10px; height: var(--g-ctl); margin-top: 0; margin-bottom: 0; }
html.ui-g .tb2 #clock .clock-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: var(--g-ctl); }
html.ui-g .tb2 #clock .clock-date { font-size: 13px; line-height: 18px; height: 18px; }
html.ui-g .tb2 #clock .clock-status { display: block; box-sizing: border-box; height: 20px; margin: 0; padding: 0 8px; font-size: 12px; line-height: 20px; border: 0; border-radius: 10px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* поиск в шапке — свои 48 (общее правило полей выше его не трогает) */
html.ui-g .tb2 .tb-row1 .g-search input[type="search"]:not(#g-x) { height: var(--g-search); min-height: var(--g-search); padding: 0 84px 0 48px; }
/* формы в несколько столбцов: подпись над полем может быть в 1 или 2 строки — поля всё равно на одной линии (по низу) */
html.ui-g :is(label.of-f, [class*="grid"] > label, [class*="form"] > label, [class*="-row"] > label, [class*="fields"] > label):has(> :is(input:not([type="checkbox"]):not([type="radio"]), select)) { display: flex; flex-direction: column; justify-content: flex-end; }
html.ui-g :is(label.of-f, [class*="grid"] > label, [class*="form"] > label, [class*="-row"] > label, [class*="fields"] > label) > :is(input, select) { margin-bottom: 0; }
/* кнопка в ряду таких полей — той же высоты и по низу («Из ЕГР», «+ Добавить») */
html.ui-g :is(div, form):has(> label > :is(input, select)) > :is(button, a.ghost):not(:where(.hn-x, .notice-close)) { min-height: var(--g-ctl); height: var(--g-ctl); align-self: flex-end; }
html.ui-g :is([class*="grid"], [class*="form"]) > :is(button, a.ghost):not(:where(.hn-x, .notice-close)) { align-self: end; }
/* малая кнопка-фильтр рядом со списком («Все» | «всё / накладная…») — той же высоты */
html.ui-g :is(div, span, nav):has(> select) > :is(button.small, .ghost.small) { min-height: var(--g-ctl); height: var(--g-ctl); }
/* «Офис»: поле-обёртка .of-f с кнопкой вместо поля («Из ЕГР») — кнопка высотой поля, по низу */
html.ui-g .of-f:not(.of-check) { display: flex; flex-direction: column; justify-content: flex-end; }
html.ui-g .of-f.of-check { align-self: end; min-height: var(--g-ctl); align-items: center; }
html.ui-g .of-f > :is(button, a.ghost) { min-height: var(--g-ctl); height: var(--g-ctl); }
/* группы кнопок-фильтров .seg («Ждут | Внесено | Все») — высотой поля, если рядом поле или список */
html.ui-g :is(div, span, nav):has(> .seg):has(> :is(select, input)) > .seg > :is(button, a) { min-height: var(--g-ctl); height: var(--g-ctl); }
html.ui-g :has(> .of-f) { align-items: end; }
html.ui-g :is(div, span, nav):has(> .seg):has(> label > :is(select, input)) > .seg > :is(button, a) { min-height: var(--g-ctl); height: var(--g-ctl); }
html.ui-g :is(div, span, nav):has(> .seg):has(> label > :is(select, input)) { align-items: flex-end; }
/* «Инструкция»: поиск и «↑ В начало / ↓ В конец» в шапке панели — одной высоты 36 */
html.ui-g .help-panel :is(#help-q):not(#g-x) { height: var(--g-ctl-sm); }
html.ui-g .help-panel .help-jump :is(button, a) { min-height: var(--g-ctl-sm); height: var(--g-ctl-sm); }
/* подпись-обёртка поля в ряду — без нижнего отступа (у обычного label он 4 px — поле ниже соседей на 4) */
html.ui-g :is(label.of-f, [class*="grid"] > label, [class*="form"] > label, [class*="-row"] > label, [class*="fields"] > label, [class*="filter"] > label, [class*="bar"] > label, [class*="toolbar"] > label, [class*="actions"] > label):has(> :is(input:not([type="checkbox"]):not([type="radio"]), select)) { margin-bottom: 0; }
html.ui-g :is([class*="filter"], [class*="bar"], [class*="toolbar"], [class*="actions"]) > label > :is(input, select) { margin-bottom: 0; }

/* =====================================================================================
   Г1 (31.10.2026) — ГЛАВНАЯ «МОИ ДЕЛА» (холст «Г · Главная»). Рисует public/ui-g-home.js.
   Прежняя главная в новом виде: заставка, «Разделы программы» (их заменила боковая панель), «Мои напоминания»,
   «Ждут решения» и карточка «Офиса» — внутри «Моих дел»; объявления, новости, дни рождения и праздники остаются ниже.
   ===================================================================================== */
#home-view .hg { display: none; }
html.ui-g #home-view.hg-on > .home-hero,
html.ui-g #home-view.hg-on .home-main > .home-h:has(+ #home-sections),
html.ui-g #home-view.hg-on #home-sections,
html.ui-g #home-view.hg-on #home-notices-card,
html.ui-g #home-view.hg-on #home-approvals-card,
html.ui-g #home-view.hg-on #home-office-card { display: none !important; }
html.ui-g #home-view.hg-on { display: block; }
html.ui-g #home-view.hg-on[hidden] { display: none; }
html.ui-g #home-view .hg { display: flex; flex-direction: column; gap: var(--g-gap); margin-bottom: var(--g-gap); color: var(--g-ink); }
html.ui-g .hg-loading { margin: 0; color: var(--g-muted); }

html.ui-g .hg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
html.ui-g .hg-date { margin: 0 0 4px; color: var(--g-muted); font-size: 14px; }
html.ui-g .hg-hello { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--g-ink); }
html.ui-g .hg-sum { color: var(--g-muted); font-size: 14px; }

/* карточки показателей */
html.ui-g .hg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--g-gap); }
html.ui-g #home-view .hg-kpi { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 0; height: auto; padding: 18px 20px; margin: 0;
  border: 1px solid var(--g-line); border-radius: var(--g-card); background: var(--g-surface); color: var(--g-ink); text-align: left; font: inherit; cursor: pointer; box-shadow: none; }
html.ui-g #home-view .hg-kpi:hover { border-color: var(--g-brand); filter: none; }
html.ui-g #home-view .hg-kpi:focus-visible { outline: 3px solid color-mix(in srgb, var(--g-brand) 40%, transparent); outline-offset: 2px; }
html.ui-g .hg-kpi-l { color: var(--g-muted); font-size: 13px; font-weight: 500; line-height: 1.3; }
html.ui-g .hg-kpi-v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
html.ui-g .hg-kpi-s { font-size: 13px; color: var(--g-muted); line-height: 1.3; }
html.ui-g .hg-kpi-s.hg-warn { color: var(--g-warn); font-weight: 600; }
html.ui-g .hg-kpi-s.hg-bad { color: var(--g-bad); font-weight: 600; }
html.ui-g .hg-kpi-s.hg-ok { color: var(--g-ok); }

/* «Мои дела» и правая колонка */
html.ui-g .hg-main { display: flex; flex-wrap: wrap; gap: var(--g-gap); align-items: flex-start; }
html.ui-g .hg-card { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: var(--g-card); }
html.ui-g .hg-tasks { min-width: 0; overflow: hidden; }
html.ui-g .hg-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--g-gap); }
html.ui-g .hg-card h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--g-ink); }
html.ui-g .hg-tasks-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; padding: 14px 16px; border-bottom: 1px solid var(--g-line); }
html.ui-g .hg-tasks-bar h2 { margin: 0 12px 0 4px; }
html.ui-g .hg-tabs { display: flex; flex-wrap: wrap; gap: 4px; order: 3; flex: 1 1 100%; }
html.ui-g #home-view .hg-tab { display: inline-flex; align-items: center; gap: 8px; min-height: var(--g-tab); height: var(--g-tab); padding: 0 14px; margin: 0; border: 0; border-radius: 999px; background: transparent; color: var(--g-muted); font: 600 14px/1 var(--g-font); box-shadow: none; }
html.ui-g #home-view .hg-tab:hover { background: var(--g-surface2); color: var(--g-ink); filter: none; }
html.ui-g #home-view .hg-tab.on { background: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g .hg-tab-n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--g-surface2); color: var(--g-muted); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
html.ui-g .hg-tab.on .hg-tab-n { background: var(--g-surface); color: var(--g-pale-ink); }
html.ui-g #home-view .hg-xls { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; height: var(--g-ctl-sm); min-height: var(--g-ctl-sm); padding: 0 14px; box-sizing: border-box; border: 1px solid var(--g-line); border-radius: 10px; color: var(--g-ink); font: 500 13px/1 var(--g-font); text-decoration: none; }
html.ui-g #home-view .hg-xls:hover { border-color: var(--g-brand); }
html.ui-g .hg-twrap { overflow-x: auto; }
html.ui-g .hg-table { width: 100%; border-collapse: collapse; font-size: var(--g-fs); }
html.ui-g .hg-table th { padding: 12px 16px; border-bottom: 1px solid var(--g-line); color: var(--g-muted); font: 600 12px/1 var(--g-font); text-align: left; white-space: nowrap; background: none; }
html.ui-g .hg-table th.hg-th-act { text-align: right; }
html.ui-g .hg-table td { height: var(--g-row); padding: 8px 16px; border-bottom: 1px solid var(--g-line); vertical-align: middle; }
html.ui-g .hg-table tbody tr:last-child td { border-bottom: 0; }
html.ui-g .hg-table tbody tr:hover td { background: var(--g-surface2); }
html.ui-g .hg-sec { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--g-pale); color: var(--g-pale-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
html.ui-g .hg-what { min-width: 260px; }
html.ui-g #home-view .hg-what-b { display: block; min-height: 0; height: auto; padding: 0; margin: 0; border: 0; background: none; color: var(--g-ink); font: 600 var(--g-fs)/1.35 var(--g-font); text-align: left; cursor: pointer; box-shadow: none; }
html.ui-g #home-view .hg-what-b:hover { color: var(--g-brand); text-decoration: underline; filter: none; }
html.ui-g .hg-meta { display: block; margin-top: 2px; color: var(--g-muted); font-size: 13px; line-height: 1.35; }
html.ui-g .hg-due { white-space: nowrap; color: var(--g-muted); font-variant-numeric: tabular-nums; }
html.ui-g .hg-due.late { color: var(--g-bad); font-weight: 700; }
html.ui-g .hg-due.today { color: var(--g-ink); font-weight: 600; }
html.ui-g .hg-act { text-align: right; white-space: nowrap; }
html.ui-g .hg-empty { margin: 0; padding: 18px; color: var(--g-muted); font-size: 14px; }
html.ui-g .hg-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 18px; }
html.ui-g #home-view .hg-dl-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 0; height: auto; padding: 12px 18px; margin: 0; border: 0; border-top: 1px solid var(--g-line); border-radius: 0; background: none; color: var(--g-ink); text-align: left; font: inherit; cursor: pointer; box-shadow: none; }
html.ui-g #home-view .hg-dl-row:hover { background: var(--g-surface2); filter: none; }
html.ui-g .hg-dl-date { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g .hg-dl-date.bad { background: var(--g-bad-bg); color: var(--g-bad); }
html.ui-g .hg-dl-date b { font-size: 18px; line-height: 1.1; }
html.ui-g .hg-dl-date span { font-size: 11px; font-weight: 600; }
html.ui-g .hg-dl-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html.ui-g .hg-dl-t b { font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
html.ui-g .hg-dl-t span { color: var(--g-muted); font-size: 13px; line-height: 1.35; }
html.ui-g .hg-hint { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
html.ui-g .hg-hint-h { display: flex; align-items: center; gap: 10px; }
html.ui-g .hg-hint-h h2 { font-size: 17px; }
html.ui-g .hg-bubble { margin: 0; padding: 14px; border-radius: 14px 14px 14px 4px; background: var(--g-pale); color: var(--g-ink); font-size: 14px; line-height: 1.5; }
html.ui-g .hg-hint-btns { display: flex; flex-wrap: wrap; gap: 8px; }
html.ui-g .hg-company-h { margin: 6px 0 0; font-size: 18px; font-weight: 600; color: var(--g-ink); }
/* 07.11.2026 (вариант В): две независимые колонки — новости под «Мои дела», дни рождения под «Каплей».
   Колонки не тянут друг друга по высоте, поэтому пустой полосы под короткой таблицей дел больше нет. */
html.ui-g .hg { container-type: inline-size; }
html.ui-g .hg-left { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--g-gap); }
html.ui-g .hg-left > .hg-tasks { flex: none; }
html.ui-g .hg-left > .hg-company-h { margin: 8px 0 0; }
html.ui-g #home-view .hg-news .home-main { padding: 0; margin: 0; }
html.ui-g #home-view .hg-news .home-important { margin: 0 0 14px; }
html.ui-g #home-view .hg-side-more .home-side { padding-top: 0; }
html.ui-g #home-view .home-grid.hg-moved { display: none; }
/* «Сроки на 2 недели» компактно: название — до 2 строк, заказчик и сумма — до 2 строк; полностью — в подсказке */
html.ui-g .hg-dl-t b, html.ui-g .hg-dl-t span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html.ui-g #home-view .hg-dl-row { padding: 10px 16px; gap: 12px; }
/* Узко (колонки встают друг под друга): дела → сроки → Капля → новости → дни рождения */
@container (max-width: 880px) {
  html.ui-g .hg-main { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  html.ui-g .hg-left, html.ui-g .hg-side { display: contents; }
  html.ui-g .hg-tasks { order: 1; }
  html.ui-g .hg-dl { order: 2; }
  html.ui-g .hg-hint { order: 3; }
  html.ui-g .hg-left > .hg-company-h { order: 4; }
  html.ui-g .hg-news { order: 5; }
  html.ui-g .hg-side-more { order: 6; }
}
@media (max-width: 760px) {
  html.ui-g .hg-hello { font-size: 22px; }
  html.ui-g .hg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html.ui-g #home-view .hg-kpi { padding: 14px; }
  html.ui-g .hg-kpi-v { font-size: 26px; }
  html.ui-g .hg-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  html.ui-g .hg-tasks-bar h2 { flex: 1 1 auto; }
  /* таблица дел на телефоне — карточками: раздел и срок сверху, что сделать, кнопка */
  html.ui-g .hg-table thead { display: none; }
  html.ui-g .hg-table, html.ui-g .hg-table tbody { display: block; }
  html.ui-g .hg-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--g-line); }
  html.ui-g .hg-table td { display: block; height: auto; padding: 0; border: 0; }
  html.ui-g .hg-table td.hg-what { grid-column: 1 / -1; min-width: 0; }
  html.ui-g .hg-table td.hg-act { grid-column: 1 / -1; text-align: left; }
  html.ui-g .hg-table td.hg-due { text-align: right; }
}

/* «+ Создать» в шапке */
html.ui-g .g-create { position: relative; flex: 0 0 auto; }
html.ui-g .tb2 #g-create { min-height: var(--g-ctl); height: var(--g-ctl); padding: 0 16px; border-radius: 12px; font: 600 14px/1 var(--g-font); white-space: nowrap; }
html.ui-g .g-create ~ .g-bell { margin-left: 0; }
html.ui-g .g-create { margin-left: auto; }
html.ui-g .g-create-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 260px; padding: 6px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); box-shadow: 0 12px 32px rgba(11, 43, 68, .16); }
html.ui-g .g-create-menu[hidden] { display: none; }
html.ui-g .tb2 .g-create-i { display: flex; align-items: center; width: 100%; min-height: var(--g-ctl); height: var(--g-ctl); padding: 0 12px; margin: 0; border: 0; border-radius: 10px; background: none; color: var(--g-ink); font: 500 14px/1.2 var(--g-font); text-align: left; white-space: nowrap; }
html.ui-g .tb2 .g-create-i:hover, html.ui-g .tb2 .g-create-i:focus-visible { background: var(--g-pale); color: var(--g-pale-ink); outline: none; filter: none; }
html.ui-g .g-create-none { margin: 8px; }
@media (max-width: 1279px) { html.ui-g .tb2 #g-create { padding: 0 12px; } }
@media (max-width: 760px) { html.ui-g .g-create { margin-left: 0; } html.ui-g .tb2 #g-create { font-size: 0; width: var(--g-ctl); padding: 0; } html.ui-g .tb2 #g-create::before { content: "+"; font-size: 22px; font-weight: 500; } html.ui-g .g-create-menu { right: auto; left: 0; } }

/* тёмная тема: на светло-синей основной кнопке — тёмный текст (белый на #5AA9E6 — контраст 2,6, мало) */
html.ui-g[data-theme="dark"] :is(button.primary, a.primary, .g-create #g-create) { color: var(--g-on-brand); }

/* 2026-11-01a: Instagram — оба счётчика (ждут утверждения, к выкладке) оранжевые, как у Заявок; на свёрнутой
   панели виден тот, что есть (если «ждут» нет — показываем «к выкладке»). */
html.ui-g .g-side #btn-instagram .nav-count + .nav-count { background: var(--g-accent); color: var(--g-on-accent); }
html.ui-g.g-mini .g-side #btn-instagram .nav-count[hidden] + .nav-count:not([hidden]) { display: inline-block; }
/* 2026-11-01a (проверка ровности Р8): у длинного имени сотрудника шапка вылезала за край на 2 px, и страница листалась вбок —
   теперь блок «кто вошёл» может сжаться, имя и должность обрезаются с «…» (полное — во всплывающей подсказке). */
html.ui-g .tb2 .topbar-account { flex: 0 1 auto; min-width: 0; }
html.ui-g .tb2 .acc-who { flex: 0 1 auto; }

/* =====================================================================================
   Г0.2 (31.10.2026) — замечание владельца 14:35 по «Складу»: «склады не пролистываются, надписи посъезжали».
   ===================================================================================== */
/* шапка: на экране уже 1600 имя и должность не помещались вместе с «+ Создать» — «Выйти» уезжал за край.
   Остаются кружок с инициалами (полное имя — в подсказке) и «Выйти». */
@media (min-width: 761px) and (max-width: 1599px) { html.ui-g .tb2 .acc-who { display: none; } html.ui-g .tb2 .topbar-account { padding-left: 12px; } }
/* телефон: в разделах (не на главной) рядом с логотипом есть «←», а с Г1 ещё и «+» — кружок и «Выйти» уезжали
   на вторую строку. В разделах логотип без «CRM», промежутки 8 — всё в одну строку на ширине 360+ (кнопки — 44). */
@media (max-width: 760px) {
  html.ui-g .tb2 > .tb-row1 { column-gap: 8px; }
  html.ui-g .tb2 > .tb-row1:has(#btn-back-top:not([hidden])) .g-mbrand .g-brand-crm { display: none; }
  html.ui-g .tb2 .topbar-account { gap: 8px; }
  html.ui-g .tb2 #btn-logout { padding: 0 10px; }
}

/* «Склад 1С»: склады — отдельной строкой во всю ширину, со стрелками ‹ › и прокруткой колесом мыши;
   «Найти склад», «🔐 Счета 1С: кто видит», «Список складов 1С» — первой строкой, подписи в одну строку */
html.ui-g .stock-wh-row { flex-wrap: wrap; row-gap: 10px; }
html.ui-g .stock-wh-row > :is(.stock-wh-label, #btn-stock-accounts, #btn-wh-list) { flex: 0 0 auto; white-space: nowrap; }
html.ui-g .stock-wh-row > #btn-wh-list { margin-left: 0; }
html.ui-g .stock-wh-row > .wh-search { flex: 1 1 200px; max-width: 360px; min-width: 0; }
html.ui-g .stock-wh-row > .g-hs { order: 10; flex: 1 1 100%; min-width: 0; }
html.ui-g .g-hs { display: flex; align-items: center; gap: 6px; }
html.ui-g .g-hs > .wh-tabs-scroll { flex: 1 1 auto; min-width: 0; padding-bottom: 4px; scroll-behavior: smooth; }
html.ui-g .g-hs > .g-hs-btn { flex: 0 0 var(--g-ctl-sm); width: var(--g-ctl-sm); min-width: var(--g-ctl-sm); height: var(--g-ctl-sm); min-height: var(--g-ctl-sm); padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--g-line); border-radius: 10px; background: var(--g-surface); color: var(--g-ink); font-size: 18px; line-height: 1; }
html.ui-g .g-hs > .g-hs-btn:hover:not(:disabled) { border-color: var(--g-brand); }
html.ui-g .g-hs > .g-hs-btn:disabled { opacity: .35; cursor: default; }
html.ui-g .g-hs > .g-hs-btn[hidden] { display: none; }
html.ui-g .wh-tabs-scroll .wh-tab { min-height: var(--g-ctl-sm); height: var(--g-ctl-sm); display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; }

/* таблица «Склада»: заголовки переносятся по словам и не наезжают друг на друга; в узком окне таблица
   листается внутри своего блока, а не сжимает столбцы до обрезанных слов («ПРОИЗВОДИТЕЛ») */
html.ui-g .stock-table { min-width: 1080px; }
html.ui-g .stock-table thead th, html.ui-g .stock-table thead th.col-num { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: auto; }
html.ui-g .stock-table thead th .th-sort { white-space: nowrap; }
html.ui-g .stock-scroll { overflow-x: auto; }

/* окна: язычок «▁ Свернуть» над окном — 28, а не 44 (общая высота кнопок Г0.1 раздувала его, и он наезжал
   на заголовок окна — снимок владельца «Счета 1С: кто видит», 31.10) */
html.ui-g .win-frame .win-min { height: 28px; min-height: 28px; top: -30px; padding: 0 12px; line-height: 26px; font-size: 12px; }
html.ui-g .win-frame.win-min-in .win-min { height: 20px; min-height: 20px; top: 0; line-height: 18px; font-size: 11px; }
/* «Счета 1С: кто видит»: номер счёта и «все подсчета» — одной строкой; кнопка «Настроить» не сжимается */
html.ui-g .sa-t td:first-child { white-space: nowrap; }
html.ui-g .sa-t td:last-child { width: 1%; white-space: nowrap; }
html.ui-g .sa-pos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; margin: 12px 0; }
html.ui-g .sa-pos fieldset { margin: 0; padding: 8px 14px 12px; border: 1px solid var(--g-line); border-radius: 12px; }
html.ui-g .sa-pos legend { padding: 0 6px; font-weight: 600; }
html.ui-g .sa-pos label { display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 0; }
html.ui-g .sa-site { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
html.ui-g .sa-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* на телефоне таблица счетов — карточками: правка должностей помещается в ширину экрана */
@media (max-width: 600px) {
  html.ui-g .sa-t thead { display: none; }
  html.ui-g #sa-modal .sa-t, html.ui-g #sa-modal .sa-t tbody, html.ui-g #sa-modal .sa-t tr, html.ui-g #sa-modal .sa-t td { display: block; width: auto; }
  html.ui-g .sa-t tr { padding: 10px 0; border-bottom: 1px solid var(--g-line); }
  html.ui-g .sa-t td { padding: 2px 0; border: 0; white-space: normal; }
  html.ui-g .sa-t td:last-child { width: auto; padding-top: 8px; }
  html.ui-g .sa-t td.cs-num::before { content: "Строк: "; color: var(--g-muted); }
  html.ui-g .sa-pos { grid-template-columns: 1fr; }
}

/* кнопки в шапках разделов на телефоне — надпись в одну строку (было: «🎯 Упущенный / спрос» вылезало за кнопку 44) */
@media (max-width: 760px) {
  html.ui-g :is(.td-head-actions, .stock-actions) { flex-wrap: wrap; }
  html.ui-g :is(.td-head-actions, .stock-actions) > button { white-space: nowrap; }
}

/* =====================================================================================
   Г2 (01.11.2026) — перетаскивание (public/ui-g-drag.js): закреплённые разделы, «Мой вид», «Воронка продаж».
   ===================================================================================== */
.g-drag-ghost { position: fixed !important; left: 0 !important; top: 0 !important; margin: 0 !important; z-index: 3000; pointer-events: none; opacity: .92; box-shadow: 0 12px 32px rgba(16, 24, 40, .28); border-radius: 12px; transition: none !important; }
.g-drag-ghost[data-why]::after { content: "⛔"; position: absolute; right: -8px; top: -10px; font-size: 18px; }
.g-drag-src { opacity: .35; outline: 2px dashed var(--g-brand, #1769aa); outline-offset: -2px; }
.g-drag-armed { outline: 2px solid var(--g-brand, #1769aa); }
.g-drag-saving { opacity: .6; pointer-events: none; }
html.g-dragging, html.g-dragging * { cursor: grabbing !important; user-select: none !important; }
.g-drop-ok { background-color: color-mix(in srgb, var(--g-brand, #1769aa) 8%, transparent); }
.g-drop-no { background-color: color-mix(in srgb, #d92d20 6%, transparent); }
/* боковая панель: группа «Закреплённые» при переносе видна, даже пустая */
html.ui-g.g-dragging .g-side .g-pins[hidden] { display: block; }
html.ui-g .g-side .g-group.g-drop-ok { background-color: rgba(255, 255, 255, .08); border-radius: 12px; }
html.ui-g .g-side .g-group.g-drop-no { background-color: transparent; }
/* «Мой вид» → «Закреплённые»: ручка ⠿ у каждой строки */
#pf-pins .pf-pin { display: flex; align-items: center; gap: 8px; }
#pf-pins .pf-grip { flex: 0 0 auto; width: 20px; text-align: center; color: var(--g-muted, #667085); cursor: grab; touch-action: none; font-size: 16px; line-height: 1; }
#pf-pins .pf-pin:has(input:not(:checked)) .pf-grip { visibility: hidden; }

/* ---------------- Г2: карточка объекта — 7 групп вкладок и «Обзор» (public/ui-g-constr.js) ---------------- */
html.ui-g #constr-view .cs-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 4px 0 10px; position: sticky; top: calc(var(--topbar-h, 96px) + var(--vhh, 0px)); z-index: 6; background: var(--g-surface); }
html.ui-g #constr-view .cs-grp { display: inline-flex; align-items: center; gap: 8px; height: var(--g-ctl); min-height: var(--g-ctl); padding: 0 14px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-surface); color: var(--g-ink); font: 500 15px/1 var(--g-font); white-space: nowrap; cursor: pointer; }
html.ui-g #constr-view .cs-grp:hover { border-color: var(--g-brand); }
html.ui-g #constr-view .cs-grp.active { background: var(--g-brand); border-color: var(--g-brand); color: var(--g-on-brand); font-weight: 600; }
html.ui-g #constr-view .cs-grp-ico { font-size: 16px; line-height: 1; }
html.ui-g #constr-view .cs-grp-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--g-pale); color: var(--g-pale-ink); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
html.ui-g #constr-view .cs-grp.active .cs-grp-n { background: rgba(255, 255, 255, .22); color: var(--g-on-brand); }
/* подвкладки группы — одной строкой; не помещаются — листаются вбок (не в 2–6 рядов, как раньше) */
html.ui-g #constr-view nav.cs-tabs.cs-subtabs { position: static; flex-wrap: nowrap; overflow-x: auto; margin: 4px 0 16px; padding-top: 0; scrollbar-width: thin; }
html.ui-g #constr-view nav.cs-tabs.cs-subtabs[hidden] { display: none; }
html.ui-g #constr-view nav.cs-tabs .cs-tab[hidden] { display: none; }
html.ui-g #constr-view nav.cs-tabs .cs-tab { flex: 0 0 auto; white-space: nowrap; }
html.ui-g #constr-view nav.cs-groups + nav.cs-tabs[hidden] + #cs-obj-body { margin-top: 16px; }
@media (max-width: 760px) {
  html.ui-g #constr-view .cs-groups { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  html.ui-g #constr-view .cs-grp { padding: 0 12px; }
}

/* «Обзор» */
html.ui-g .cso-stages { display: flex; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: cso; overflow-x: auto; }
html.ui-g .cso-stages li { flex: 1 1 0; min-width: 96px; position: relative; padding: 0 4px 0 0; }
html.ui-g .cso-stages li span { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 10px; background: var(--g-surface2); color: var(--g-muted); font-size: 13px; font-weight: 500; white-space: nowrap; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
html.ui-g .cso-stages li:first-child span { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
html.ui-g .cso-stages li.done span { background: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g .cso-stages li.cur span { background: var(--g-brand); color: var(--g-on-brand); font-weight: 600; }
html.ui-g .cso-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 28px; margin: 0 0 16px; }
html.ui-g .cso-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: var(--g-gap); align-items: start; }
html.ui-g .cso-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; }
html.ui-g .cso-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); }
html.ui-g .cso-tile.cso-warn { border-color: var(--g-bad); box-shadow: inset 4px 0 0 var(--g-bad); }
html.ui-g .cso-tile h4 { margin: 0; font-size: 16px; font-weight: 600; color: var(--g-ink); }
html.ui-g .cso-facts { margin: 0; padding: 0; list-style: none; color: var(--g-muted); font-size: 14px; line-height: 1.45; }
html.ui-g .cso-links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: auto; }
html.ui-g #constr-view .cso-go { padding: 0; height: auto; min-height: 28px; border: 0; background: none; color: var(--g-brand); font: 500 14px/1.3 var(--g-font); text-align: left; cursor: pointer; }
html.ui-g #constr-view .cso-go:hover { text-decoration: underline; }
html.ui-g .cso-side { padding: 16px 18px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface2); }
html.ui-g .cso-side h4 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
html.ui-g .cso-todo { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
html.ui-g .cso-todo li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--g-surface); font-size: 14px; line-height: 1.4; border-left: 4px solid var(--g-line); }
html.ui-g .cso-todo li > span { flex: 1 1 auto; min-width: 0; }
html.ui-g .cso-todo li .cso-go { flex: 0 0 auto; }
html.ui-g .cso-todo li.cso-red { border-left-color: var(--g-bad); }
html.ui-g .cso-todo li.cso-amber { border-left-color: var(--g-warn); }
html.ui-g .cso-todo li.cso-soon { border-left-color: var(--g-brand); }
html.ui-g .cso-more { margin: 12px 0 0; }
@media (max-width: 1100px) { html.ui-g .cso-wrap { grid-template-columns: 1fr; } }

/* =====================================================================================
   Г3 (01.11.2026) — окно заявки по замечаниям РОП «РМ_2» (пп. 1, 2, 6), public/ui-g-order.js
   ===================================================================================== */
html.ui-g .om-g3 .om-grid { grid-template-columns: minmax(220px, .9fr) minmax(0, 2fr) minmax(300px, 1.15fr); align-items: stretch; gap: 16px; }
html.ui-g .om-g3 .om-card { background: var(--g-surface); border-color: var(--g-line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
html.ui-g .om-g3 .om-card h3 { color: var(--g-muted); font-size: 12px; }
/* Покупатель: строка «название · УНП ↗ ▾»; развёрнутый — на весь ряд */
html.ui-g .om-g3 .om-buyer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
html.ui-g .om-g3 .om-buyer-line .om-big { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
html.ui-g .om-g3 .om-buyer-tog { margin-left: auto; }
html.ui-g .om-g3 .om-buyer.om-buyer-open { grid-column: 1 / -1; }
html.ui-g .om-g3 .om-grid:has(> .om-buyer-open) { grid-template-columns: minmax(0, 2fr) minmax(300px, 1.15fr); }
html.ui-g .om-g3 .om-buyer.om-buyer-open .om-buyer-line .om-big { flex: 0 1 auto; }
html.ui-g .om-g3 .om-buyer-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--g-line); }
html.ui-g .om-g3 .om-buyer-more[hidden] { display: none; }
html.ui-g .om-g3 .om-buyer-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
html.ui-g .om-g3 .om-cp-h { margin: 14px 0 8px; font-size: 14px; }
/* Что заказали: таблица листается внутри карточки, высота ряда — по самому высокому блоку, но не больше 420 */
html.ui-g .om-g3 .om-items-card h3.om-items-h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
html.ui-g .om-g3 .om-items-scroll { max-height: 380px; overflow: auto; }
html.ui-g .om-g3 .om-items-card .om-items { margin: 0; }
/* Обсуждение — третий столбец (не на весь ряд, как раньше) */
html.ui-g .om-g3 .om-grid > .ch-om { grid-column: auto; display: flex; flex-direction: column; min-width: 0; max-height: 470px; }
html.ui-g .om-g3 .ch-om .ch-om-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
html.ui-g .om-g3 .ch-om .chd { grid-template-columns: 1fr; }
html.ui-g .om-g3 .ch-om .chd-side { display: none; }
html.ui-g .om-g3 .ch-om .chd-msgs { max-height: 300px; }
/* узкий столбец: поле сообщения — во всю ширину строки, кнопки — под ним */
html.ui-g .om-g3 .ch-om .ch-crow { flex-wrap: wrap; }
html.ui-g .om-g3 .ch-om .ch-crow .chd-text { flex: 1 1 100%; order: -1; min-width: 0; }
html.ui-g .om-g3 .ch-om .ch-crow > :is(button, label):last-child { margin-left: auto; }
/* Работа по заявке — полосой на всю ширину: кто ведёт · Передать · Статус · Заметка · Сохранить; сроки ответа — строкой ниже */
html.ui-g .om-g3 .om-work { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
html.ui-g .om-g3 .om-work > h3 { flex: 0 0 auto; margin: 0; }
html.ui-g .om-g3 .om-work > p { margin: 0; flex: 0 1 auto; }
html.ui-g .om-g3 .om-work > .om-actions { margin: 0; flex: 0 0 auto; }
html.ui-g .om-g3 .om-work > .om-actions button { width: auto; }
html.ui-g .om-g3 .om-work > label { margin: 0; flex: 0 0 auto; font-weight: 500; }
html.ui-g .om-g3 .om-work > .om-wf { display: flex; align-items: center; gap: 8px; min-width: 0; }
html.ui-g .om-g3 .om-work > .om-wf > label { margin: 0; flex: 0 0 auto; font-weight: 500; }
html.ui-g .om-g3 .om-work > .om-wf-status { flex: 0 1 300px; }
html.ui-g .om-g3 .om-work > .om-wf-status select { flex: 1 1 auto; width: auto; min-width: 160px; margin: 0; }
html.ui-g .om-g3 .om-work > .om-wf-note { flex: 1 1 320px; }
html.ui-g .om-g3 .om-work > .om-wf-note textarea { flex: 1 1 auto; width: auto; min-height: var(--g-ctl); margin: 0; resize: vertical; }
html.ui-g .om-g3 .om-work > #om-note-save { flex: 0 0 auto; margin: 0; }
/* Р2: верхний отступ кнопки сдвигал её центр на 4 px в ряду с выравниванием по центру */
html.ui-g .om-g3 .om-work > .sp-om-btn { margin: 0; flex: 0 0 auto; }
html.ui-g .om-g3 .om-work > #om-status-close:empty { display: none; }
html.ui-g .om-g3 .om-work > #om-status-close, html.ui-g .om-g3 .om-work > .sla-box, html.ui-g .om-g3 .om-work > .hint { flex: 1 1 100%; margin: 0; }
html.ui-g .om-g3 .om-work > .sla-box { padding-top: 10px; }
/* Деньги и отгрузка — подробно, свёрнуто */
html.ui-g .om-g3 .om-cash { margin-top: 12px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface2); }
html.ui-g .om-g3 .om-cash > summary { min-height: var(--g-ctl); display: flex; align-items: center; padding: 0 16px; cursor: pointer; font-weight: 500; }
html.ui-g .om-g3 .om-cash > .om-cash-body { border: 0; border-top: 1px solid var(--g-line); border-radius: 0 0 14px 14px; }
/* шапка окна: сумма · стадия · оплачено · отгрузка */
html.ui-g #order-modal .om-header { flex-wrap: wrap; row-gap: 6px; }
html.ui-g #order-modal .om-hsum { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; order: 3; }
html.ui-g #order-modal .om-chip-s { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--g-surface2); border: 1px solid var(--g-line); color: var(--g-ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
html.ui-g #order-modal .om-chip-sum { font-weight: 700; }
html.ui-g #order-modal .om-chip-stage { background: var(--g-pale); color: var(--g-pale-ink); border-color: transparent; }
html.ui-g #order-modal .om-chip-ok { background: var(--g-ok-bg); color: var(--g-ok); border-color: transparent; }
html.ui-g #order-modal .om-chip-part { background: var(--g-warn-bg); color: var(--g-warn); border-color: transparent; }
/* «Сменить покупателя» — окно выбора */
html.ui-g .occ-box { width: min(640px, 96vw); }
.occ-box #occ-q { width: 100%; box-sizing: border-box; }
.occ-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin: 10px 0; }
.occ-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 8px 12px; text-align: left; border: 1px solid var(--g-line, #dcdfe4); border-radius: 10px; background: var(--g-surface, #fff); cursor: pointer; }
.occ-row:hover:not(:disabled) { border-color: var(--g-brand, #1769aa); }
.occ-row:disabled { opacity: .5; cursor: default; }
@media (max-width: 1100px) { html.ui-g .om-g3 .om-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } html.ui-g .om-g3 .om-grid > .ch-om { grid-column: 1 / -1; } }
@media (max-width: 760px) { html.ui-g .om-g3 .om-grid { grid-template-columns: 1fr; } html.ui-g .om-g3 .om-work > .om-wf { flex: 1 1 100%; } }

/* ---------------- Г3: «Заявки с сайта» и «Клиенты» (public/ui-g-orders.js) ---------------- */
html.ui-g #orders-block .og-switch { display: inline-flex; align-self: flex-start; margin: 4px 0 8px; border: 1px solid var(--g-line); border-radius: 12px; overflow: hidden; background: var(--g-surface); }
html.ui-g #orders-block .og-switch button { height: var(--g-ctl-sm); min-height: var(--g-ctl-sm); padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--g-ink); font: 500 14px/1 var(--g-font); white-space: nowrap; }
html.ui-g #orders-block .og-switch button + button { border-left: 1px solid var(--g-line); }
html.ui-g #orders-block .og-switch button.active { background: var(--g-brand); color: var(--g-on-brand); font-weight: 600; }
html.ui-g #orders-block .og-switch button:not(.active):hover { background: var(--g-pale); }
html.ui-g #orders-block .oc-wait { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-right: 6px; border-radius: 11px; background: var(--g-surface2); color: var(--g-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
html.ui-g #orders-block .oc-wait-free { background: var(--g-warn-bg); color: var(--g-warn); }
html.ui-g #orders-block .oc-next { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--g-line); font-size: 13px; }
html.ui-g #orders-block .oc-stage { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--g-pale); color: var(--g-pale-ink); font-size: 12px; font-weight: 600; }
html.ui-g #orders-block .oc-late { color: var(--g-bad); font-weight: 600; }
html.ui-g #orders-block .order-card[hidden] { display: none; }
html.ui-g #funnel-view .fn-to-orders { margin-right: auto; }
html.ui-g .clm-debt1c { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 10px; font-size: 14px; }
html.ui-g .clm-c1 { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; }
html.ui-g .clm-c1.c1-due { background: var(--g-bad-bg); color: var(--g-bad); }
html.ui-g .clm-c1.c1-adv { background: var(--g-ok-bg); color: var(--g-ok); }
html.ui-g .clm-c1.c1-zero { background: var(--g-surface2); color: var(--g-muted); }

/* ---------------- Г3.1: экран «Заявки» — таблица + карточка справа; «Клиенты» — список + карточка ---------------- */
html.ui-g.g-orders-mode #list-view .products-column { display: none; }
html.ui-g.g-orders-mode #list-view .list-columns { grid-template-columns: minmax(0, 1fr); }
html.ui-g.g-orders-mode #orders-block { position: static; max-height: none; width: auto; }
html.ui-g.g-orders-mode #orders-block .orders-head h2::after { content: ""; }
/* Экран заявок листается всей страницей, карточка справа закреплена (ниже). Поэтому app.js → fitScreen не включает на нём
   html.fit-screen — см. там, 02.11.2026, предложение №57. */
html.ui-g.g-orders-mode #orders-block #orders-list { height: auto !important; max-height: none; overflow: visible; }
html.ui-g .og-card { display: none; }
/* ширина — по месту, которое есть у блока заявок (справа может стоять колонка уведомлений): контейнерные запросы */
html.ui-g.g-orders-mode #orders-block { container-type: inline-size; }
/* ≥ 900 — таблица и карточка рядом; уже — таблица на всю ширину (щелчок — окно заявки); телефон — карточками */
@container (min-width: 900px) {
  html.ui-g.g-orders-mode .og-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); gap: 16px; align-items: start; }
  html.ui-g.g-orders-mode .og-card { display: block; position: sticky; top: calc(var(--topbar-h, 96px) + 12px); max-height: calc(100vh - var(--topbar-h, 96px) - 32px); overflow: auto; padding: 16px 18px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); }
}
@container (min-width: 520px) { html.ui-g.g-orders-mode #orders-list > .order-card { display: none; } }
@container (max-width: 519.98px) { html.ui-g.g-orders-mode #og-table { display: none; } }
/* узко для всех столбцов: «Что хочет» и «Ждёт» — в карточке справа (или в окне заявки) */
@container (min-width: 900px) and (max-width: 1250px) {
  html.ui-g.g-orders-mode .og-table :is(th, td):is(:nth-child(3), :nth-child(5)) { display: none; }
  html.ui-g.g-orders-mode .og-table th:nth-child(2) { width: auto; } html.ui-g.g-orders-mode .og-table th:nth-child(6) { width: 38%; }
}
@container (max-width: 760px) {
  html.ui-g.g-orders-mode .og-table :is(th, td):nth-child(3) { display: none; }
  html.ui-g.g-orders-mode .og-table th:nth-child(2) { width: auto; }
}
html.ui-g .og-table-wrap { overflow-x: auto; }
html.ui-g .og-table { width: 100%; margin: 0; table-layout: fixed; }
html.ui-g .og-table th { white-space: normal; }
html.ui-g .og-table th:nth-child(1) { width: 110px; } html.ui-g .og-table th:nth-child(2) { width: 18%; } html.ui-g .og-table th:nth-child(4) { width: 110px; }
html.ui-g .og-table th:nth-child(5) { width: 130px; } html.ui-g .og-table th:nth-child(6) { width: 24%; } html.ui-g .og-table th:nth-child(7) { width: 84px; }
html.ui-g .og-table td { vertical-align: top; overflow-wrap: anywhere; }
html.ui-g .og-table td.og-what { overflow: hidden; text-overflow: ellipsis; }
html.ui-g .og-table .og-sum { text-align: right; white-space: nowrap; }
html.ui-g .og-table tr.og-row { cursor: pointer; }
html.ui-g .og-table tr.og-row:hover td { background: var(--g-surface2); }
html.ui-g .og-table tr.og-row.og-sel td { background: var(--g-pale); }
html.ui-g .og-table tr.og-row.og-sel td:first-child { box-shadow: inset 4px 0 0 var(--g-brand); }
html.ui-g .og-table tr.og-row:focus-visible { outline: 2px solid var(--g-brand); outline-offset: -2px; }
html.ui-g .og-table tr.og-free td:first-child { box-shadow: inset 4px 0 0 var(--g-accent); }
html.ui-g .og-table .og-act .o-claim { width: 100%; }
html.ui-g .og-src-crm { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 9px; background: var(--g-surface2); color: var(--g-muted); font-size: 11px; }
html.ui-g .og-card-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
html.ui-g .og-card-h h3 { margin: 0; font-size: 18px; }
html.ui-g .og-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
html.ui-g .og-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--g-surface2); border: 1px solid var(--g-line); font-size: 12px; font-weight: 600; }
html.ui-g .og-card section { margin-top: 14px; }
html.ui-g .og-card h4 { margin: 0 0 6px; color: var(--g-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
html.ui-g .og-card p { margin: 4px 0; }
html.ui-g .og-items { margin: 0; padding-left: 18px; }
html.ui-g .og-note { padding: 6px 10px; border-radius: 10px; background: var(--g-warn-bg); }
html.ui-g .og-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
html.ui-g .og-acts > * { flex: 1 1 140px; }
html.ui-g .og-card-empty { margin: 0; }
html.ui-g.g-orders-mode #orders-block .oc-next { display: none; }
@container (max-width: 519.98px) { html.ui-g.g-orders-mode #orders-block .oc-next { display: flex; } }

/* «Клиенты»: карточка клиента — панелью справа от таблицы (без затемнения) */
html.ui-g.g-cl-dock #client-modal { position: fixed !important; inset: var(--g-cl-top, 124px) 16px 16px auto !important; width: min(540px, 40vw) !important; height: auto !important; padding: 0 !important; background: transparent !important; backdrop-filter: none !important; pointer-events: none; display: block; z-index: 40 !important; }
html.ui-g.g-cl-dock #client-modal > .modal-box { pointer-events: auto; position: static !important; width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; margin: 0 !important; transform: none !important; overflow: auto; border: 1px solid var(--g-line); border-radius: 14px; box-shadow: 0 8px 28px rgba(16, 24, 40, .14); }
html.ui-g.g-cl-dock #client-modal .win-frame { display: none !important; }
/* № 67: таблицы карточки (заявки, документы) не шире панели, иначе вся панель листается вбок; напоминания — левее панели, не поверх неё */
html.ui-g.g-cl-dock #client-modal table.products { min-width: 0; }
html.ui-g.g-cl-dock .notice-stack { right: calc(min(540px, 40vw) + 32px); }
html.ui-g #clm-full { margin-left: auto; }
/* в режиме заявок «Каталог товаров» в меню виден — по нему возврат к товарам (на экране каталога кнопка прячется сама) */
html.ui-g.g-orders-mode .g-side #btn-catalog[hidden] { display: flex !important; }
/* при панели справа в таблице клиентов — главное: клиент, телефон, УНП, заявок (остальное — в карточке) */
html.ui-g.g-cl-dock .clients-table :is(th, td):is(:nth-child(2), :nth-child(4), :nth-child(7), :nth-child(8)) { display: none; }
html.ui-g.g-cl-dock .clients-table tr.cl-row.g-cl-sel td { background: var(--g-pale); }

/* =====================================================================================
   Г4 (01.11.2026) — «Склад» (public/ui-g-stock.js) и «Снабжение» (public/ui-g-supply.js)
   ===================================================================================== */
/* Склад: итог чтения 1С */
html.ui-g .gs-1c { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 0; font-size: 13px; }
html.ui-g .gs-1c-b { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-weight: 600; white-space: nowrap; }
html.ui-g .gs-1c-b.gs-ok { background: var(--g-ok-bg); color: var(--g-ok); }
html.ui-g .gs-1c-b.gs-bad { background: var(--g-bad-bg); color: var(--g-bad); }
html.ui-g .gs-1c-b.gs-wait { background: var(--g-surface2); color: var(--g-muted); }
/* Склад: 4 карточки */
html.ui-g #stock-view .gs-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 10px; }
html.ui-g #stock-view .gs-cards .gs-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 96px; height: auto; padding: 14px 16px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); color: var(--g-ink); text-align: left; cursor: pointer; }
html.ui-g #stock-view .gs-cards .gs-card:hover { border-color: var(--g-brand); }
html.ui-g #stock-view .gs-cards .gs-card .gs-n { font-size: 26px; font-weight: 700; line-height: 1.1; }
html.ui-g #stock-view .gs-cards .gs-card .gs-n small { font-size: 15px; font-weight: 500; color: var(--g-muted); }
html.ui-g #stock-view .gs-cards .gs-card .gs-l { font-size: 14px; color: var(--g-muted); }
html.ui-g #stock-view .gs-cards .gs-card .gs-s { font-size: 12px; color: var(--g-muted); }
html.ui-g #stock-view .gs-cards .gs-card .gs-bar { display: block; width: 100%; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--g-surface2); overflow: hidden; }
html.ui-g #stock-view .gs-cards .gs-card .gs-bar i { display: block; height: 100%; background: var(--g-brand); }
html.ui-g #stock-view .gs-cards .gs-card.gs-warn { border-color: var(--g-warn); }
html.ui-g #stock-view .gs-cards .gs-card.gs-warn .gs-n { color: var(--g-warn); }
html.ui-g #stock-view .gs-cards .gs-card.gs-zero .gs-n { color: var(--g-muted); }
@media (max-width: 760px) { html.ui-g #stock-view .gs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Склад: 9 плиток-фильтров — строкой чипов под карточками */
html.ui-g #stock-view .stock-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
html.ui-g #stock-view .stock-summary .ls-tile { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; min-height: 36px; height: auto; padding: 4px 12px; border-radius: 16px; width: auto; } /* 32 → 36: №261109-КИ-6 */
html.ui-g #stock-view .stock-summary .ls-tile .ls-num { font-size: 14px; font-weight: 700; }
html.ui-g #stock-view .stock-summary .ls-tile .ls-label { font-size: 13px; white-space: nowrap; -webkit-line-clamp: unset; display: inline; }
html.ui-g #stock-view .stock-summary .ls-tile.active { background: var(--g-brand); border-color: var(--g-brand); color: var(--g-on-brand); }
html.ui-g #stock-view .stock-summary .ls-tile.active :is(.ls-label, .ls-num, .ls-sub) { color: var(--g-on-brand); }
/* Склад: «свободно» и «Связать» в таблице */
html.ui-g .gs-free { font-size: 12px; color: var(--g-ok); font-weight: 600; }
html.ui-g .gs-free.gs-free-0 { color: var(--g-bad); }
html.ui-g .gs-link { display: block; margin-top: 6px; }

/* Снабжение: вкладки одной строкой, подвкладки «Ждут 1С» */
html.ui-g #supply-view .sp-tabs.gsp-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
html.ui-g #supply-view .sp-tabs.gsp-tabs .sp-tab { flex: 0 0 auto; white-space: nowrap; }
html.ui-g #supply-view .sp-tabs.gsp-tabs .sp-tab[hidden] { display: none; }
html.ui-g #supply-view .gsp-sub { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
html.ui-g #supply-view .gsp-sub .gsp-subtab { height: var(--g-ctl-sm); min-height: var(--g-ctl-sm); padding: 0 14px; border: 1px solid var(--g-line); border-radius: 18px; background: var(--g-surface); color: var(--g-ink); font: 500 14px/1 var(--g-font); white-space: nowrap; }
html.ui-g #supply-view .gsp-sub .gsp-subtab.active { background: var(--g-pale); border-color: var(--g-brand); color: var(--g-pale-ink); font-weight: 600; }
/* Снабжение: путь закупки + «Заказать до» */
html.ui-g #supply-view .gsp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 18px; align-items: start; margin-top: 14px; }
html.ui-g #supply-view .gsp-left { min-width: 0; }
html.ui-g #supply-view .gsp-path { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
html.ui-g #supply-view .gsp-path .gsp-step { flex: 1 1 0; min-width: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: auto; min-height: 104px; padding: 12px 14px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface); color: var(--g-ink); text-align: left; cursor: pointer; }
html.ui-g #supply-view .gsp-path .gsp-step:hover { border-color: var(--g-brand); }
html.ui-g #supply-view .gsp-path .gsp-step .gsp-l { font-size: 13px; font-weight: 600; color: var(--g-muted); }
html.ui-g #supply-view .gsp-path .gsp-step .gsp-n { font-size: 26px; font-weight: 700; line-height: 1.1; }
html.ui-g #supply-view .gsp-path .gsp-step .gsp-s { font-size: 12px; color: var(--g-muted); }
html.ui-g #supply-view .gsp-path .gsp-step.gsp-zero .gsp-n { color: var(--g-muted); }
html.ui-g #supply-view .gsp-path .gsp-step.gsp-late { border-color: var(--g-bad); box-shadow: inset 0 3px 0 var(--g-bad); }
html.ui-g #supply-view .gsp-bad { font-size: 12px; font-weight: 600; color: var(--g-bad); }
html.ui-g #supply-view .gsp-arrow { align-self: center; flex: 0 0 auto; color: var(--g-muted); font-size: 16px; }
html.ui-g #supply-view .gsp-side { padding: 14px 16px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-surface2); }
html.ui-g #supply-view .gsp-side h4 { margin: 0 0 10px; font-size: 16px; }
html.ui-g #supply-view .gsp-due { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
html.ui-g #supply-view .gsp-due .gsp-due-b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: auto; min-height: 0; padding: 8px 10px; border: 1px solid var(--g-line); border-left: 4px solid var(--g-brand); border-radius: 10px; background: var(--g-surface); color: var(--g-ink); font-size: 13px; text-align: left; cursor: pointer; }
html.ui-g #supply-view .gsp-due .gsp-due-late .gsp-due-b { border-left-color: var(--g-bad); }
@media (max-width: 1100px) { html.ui-g #supply-view .gsp-wrap { grid-template-columns: 1fr; } }

/* ---------------- 02.11.2026: контраст и телефон (замеры контролёра №32, КИ-2 … КИ-7) ---------------- */
/* КИ-2. Тёмная тема: --primary и --accent-btn здесь светло-голубые #5AA9E6 — белый текст на них 2,54:1. Эти вкладки и
   ярлыки остаются с белым текстом, а фон — тёмнее (6,14:1). Основные кнопки не трогаем: у них тёмный текст на голубом. */
html.ui-g[data-theme="dark"] :is(.wh-tab.active, .cl-kind-tab.active, .td-tab.active, .sd-tab.active, .kb-tabs button[aria-selected="true"], .kba-views button[aria-selected="true"], .kba-link.on, .td-sb-btn.active, .td-rc.active, .td-part-tag, .cl-ctr-filters .active, .plc-filters .active, .primary-file, label.primary-file, .sp-upload, .primary-link, .of-n) {
  background: #1F6699; border-color: #1F6699; color: #FFFFFF;
}
html.ui-g[data-theme="dark"] :is(.primary-file, label.primary-file, .sp-upload, .primary-link):hover { background: #17507A; border-color: #17507A; }
html.ui-g .wh-tab.active .wh-tab-n, html.ui-g .sd-tab.active .sd-n { opacity: 1; }
/* КИ-3, КИ-7: счётчик на активной вкладке тендеров — тёмная подложка вместо белой дымки (белый на ней ≥ 8:1 в обеих темах) */
html.ui-g .td-tab.active .td-tab-n { background: rgba(0, 0, 0, .28); color: #FFFFFF; }
/* КИ-4: у общего правила кнопок плавная смена фона 0,1 с — сразу после смены темы «Выйти» секунду был белым под светлым текстом */
html.ui-g .tb2 #btn-logout { transition: none; }
/* КИ-7. Светлая тема */
html.ui-g .o-tab-count-hot { background: #B45309 !important; color: #FFFFFF !important; }
html.ui-g:not([data-theme="dark"]) .st-toggle { color: color-mix(in srgb, var(--c) 62%, #000000); }
html.ui-g:not([data-theme="dark"]) .st-eye-off { color: #5F6B7A; opacity: 1; }
html.ui-g:not([data-theme="dark"]) :is(.st-add-btn, .st-more-btn) { color: #5F6B7A; }

/* КИ-5, КИ-6. Телефон: всё, на что нажимают, — не ниже 44 px (флажки и переключатели сюда не входят: у них своя подпись-область);
   текст — не меньше 14 px, кроме подписей нижних вкладок (решение владельца 02.11: там норма 12). */
@media (max-width: 760px) {
  html.ui-g, html.ui-g.density-compact { --g-ctl-sm: 44px; --g-tab: 44px; --g-item: 44px; }
  html.ui-g :is(button, select, a.ghost, a.btn-link, .btn-link, .ls-tile, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"])):not(.g-sr) { min-height: 44px !important; box-sizing: border-box; }
  /* №261116-КИ-5 (17.11): значки-кнопки были уже 40 px (высота 44 у них уже есть) — ширина тоже не меньше 44; заголовки
     сворачиваемых блоков «Настроек» — не ниже 44, по ним нажимают как по кнопке */
  html.ui-g :is(.help-close, #help-close, .ghost.small, .ch-ibtn, #btn-list-top, #btn-list-bottom, #cf-clear, #stock-colf-reset, .st-toggle, .st-eye, .st-add-btn, .st-more-btn) { min-width: 44px; box-sizing: border-box; justify-content: center; }
  html.ui-g .settings-page .set-fold-h, html.ui-g #settings-view .set-fold-h { min-height: 44px; box-sizing: border-box; }
  html.ui-g #home-view .hg-what-b { display: flex; align-items: center; }
  html.ui-g .g-tab-lbl, html.ui-g .g-tab-cnt { font-size: 12px; }
  html.ui-g .tb2 #btn-logout, html.ui-g .g-ava { font-size: 14px; }
  html.ui-g #app :is(.fn-tag, .fn-meta, .fn-client, .fn-step, .fn-note, .fn-hint, .fn-col h4, .fn-col h4 span, .fn-tile small, code.st-mcode, .stock-table td.col-mcode code.st-mcode, .wh-tab, .wh-tab-n, .ig-tab-n, .ig-kind, .ig-badge, .gs-s, .ls-label, .ls-sub, #st-zoom-val, .st-sec-txt, .st-sec-name, .st-sec-meta, .oc-wait, .oc-stage, .og-chip, .hg-kpi-l, .hg-kpi-s, .hg-tab-n, .hg-sec, .hg-meta, .hh-date, .hh-name, button.small, .ghost.small) { font-size: 14px; }
}

/* 11-02g: на телефоне путь закупки виден весь, без прокрутки вбок: шаг «Приёмка» — под рукой */
@media (max-width: 760px) {
  html.ui-g #supply-view .gsp-path { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  html.ui-g #supply-view .gsp-path .gsp-step { min-width: 0; }
  html.ui-g #supply-view .gsp-arrow { display: none; }
}

/* =====================================================================================
   Г5 (03.11.2026) — «Офис» и «Тендеры» (public/ui-g-office.js, public/ui-g-tenders.js). Только вид и расположение.
   Цвета — токены --g-* (у них есть тёмные значения), что вписано цветом — дано явно для обеих тем.
   ===================================================================================== */
/* единая шкала размеров внутри разделов (Р11): 13,5 / 16 / 24 px прежних стилей — на ступени шкалы */
html.ui-g :is(#office-view, #tenders-view, #secset-tenders) { font-size: 15px; }
html.ui-g :is(#office-view, #tenders-view) h2 { font-size: 26px; }
html.ui-g :is(#office-view, #tenders-view, #secset-tenders) h3 { font-size: 18px; }
html.ui-g :is(#office-view, #tenders-view, #secset-tenders) :is(h4, .of-h) { font-size: 17px; }
html.ui-g :is(#office-view, #tenders-view, #secset-tenders) :is(button.small, a.small, .ghost.small, .vs-btn, .hint, .of-tile span, .of-det > summary, label) { font-size: 14px; }
html.ui-g :is(#office-view, #tenders-view, #secset-tenders) .hint { color: var(--g-muted); }

/* прежние замечания оболочки */
@media (min-width: 901px) {
  /* кнопка «Свернуть» стопки: в длинной стопке (10 и больше) уезжала вверх и была недостижима — закреплена сверху самой стопки */
  html.ui-g .notice-stack .notice-bar { position: sticky; top: 0; z-index: 2; flex: 0 0 auto; }
}
html.ui-g[data-theme="dark"] .notice-stack .notice-close:not(:hover) { background: transparent; }
html.ui-g .notice-stack .notice-bar { background: #0B2B44; color: #FFFFFF; }
html.ui-g[data-theme="dark"] .notice-stack .notice-bar { background: #12314A; color: #E6EEF5; }
@media (max-width: 760px) {
  /* метка «ТЕСТ»: была поверх шторки «Ещё» и наезжала на плашку уведомлений — под шторкой (1890) и над плашкой */
  html.ui-g .test-copy-tag { z-index: 1800; bottom: calc(var(--g-tabbar-h) + 72px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------- Офис: шапка и переключатель организаций */
html.ui-g #office-view .of-head { align-items: center; gap: 10px 16px; }
html.ui-g #office-view .of-head-actions { gap: 8px 12px; align-items: center; }
html.ui-g #office-view .of-head-actions > button { min-height: var(--g-ctl); height: var(--g-ctl); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
html.ui-g #office-view .of-orgs { flex-wrap: nowrap; gap: 0; height: var(--g-ctl); padding: 3px; box-sizing: border-box; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-surface2); }
html.ui-g #office-view .of-orgs .vs-btn { height: 100%; min-height: 0; padding: 0 12px; margin: 0; border: 0; border-radius: 9px; background: transparent; color: var(--g-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
html.ui-g #office-view .of-orgs .vs-btn.active { background: #1F6699; color: #FFFFFF; }
html.ui-g[data-theme="dark"] #office-view .of-orgs .vs-btn.active { background: #1F6699; color: #FFFFFF; }
html.ui-g .gof-org-short { display: none; }
html.ui-g #office-view .of-org1 { font-size: 14px; color: var(--g-muted); }

/* ---------------------------------------------------------------- Офис: полоса групп и вкладки группы */
html.ui-g #office-view .gof-nav { position: sticky; top: calc(var(--topbar-h, 96px) + var(--vhh, 0px)); z-index: 5; display: flex; flex-direction: column; gap: 8px; margin: 12px 0 14px; padding: 4px 0 0; background: var(--g-surface); }
html.ui-g .gof-groups { display: flex; flex-wrap: wrap; gap: 4px; }
html.ui-g .gof-group { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: 0 0 auto; height: var(--g-tab); min-height: var(--g-tab); padding: 0 9px; margin: 0; box-sizing: border-box; border: 1px solid var(--g-line); border-radius: 10px; background: var(--g-surface); color: var(--g-ink); font: 600 14px/1 var(--g-font); letter-spacing: -0.01em; white-space: nowrap; cursor: pointer; }
html.ui-g .gof-group:hover { border-color: var(--g-brand); }
html.ui-g .gof-group.active, html.ui-g[data-theme="dark"] .gof-group.active { background: #1F6699; border-color: #1F6699; color: #FFFFFF; }
html.ui-g .gof-group:focus-visible, html.ui-g #office-view .of-tab:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 1px; }
html.ui-g #office-view .gof-nav .of-tabs { position: static; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; background: transparent; border-bottom: 1px solid var(--g-line); }
html.ui-g #office-view .gof-nav .of-tabs[hidden] { display: none; }
html.ui-g #office-view .of-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--g-tab); min-height: var(--g-tab); padding: 0 12px; margin: 0 0 -1px; box-sizing: border-box; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--g-muted); font: 500 14px/1 var(--g-font); white-space: nowrap; }
html.ui-g #office-view .of-tab[hidden] { display: none; }
html.ui-g #office-view .of-tab:hover { color: var(--g-ink); }
html.ui-g #office-view .of-tab.active, html.ui-g[data-theme="dark"] #office-view .of-tab.active { background: transparent; color: var(--g-brand); border-bottom-color: var(--g-brand); font-weight: 600; }
html.ui-g #office-view .of-n { display: inline-block; flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #1F6699; color: #FFFFFF; font: 700 12px/18px var(--g-font); text-align: center; }
html.ui-g[data-theme="dark"] #office-view .of-n { background: #1F6699; color: #FFFFFF; }
html.ui-g #office-view .gof-group.active .of-n { background: #FFFFFF; color: #17507A; }
html.ui-g[data-theme="dark"] #office-view .gof-group.active .of-n { background: #FFFFFF; color: #17507A; }

/* ---------------------------------------------------------------- Офис: содержимое вкладок — кнопка в одну строку и по центру, одна высота в ряду */
html.ui-g #office-view :is(.of-mbtns, .of-actions, .of-filters) { gap: 8px; align-items: center; }
html.ui-g #office-view :is(button, a.ghost, a.primary):not(.gof-group, .of-tab, .vs-btn, .linklike, .link-small) { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; box-sizing: border-box; text-decoration: none; }
html.ui-g #office-view :is(.of-mbtns, .of-acq-btns) > :is(button, a) { min-height: var(--g-ctl-sm); height: var(--g-ctl-sm); }
html.ui-g #office-view .of-seg { gap: 4px; }
html.ui-g #office-view .of-seg button { height: var(--g-tab); min-height: var(--g-tab); padding: 0 12px; }
html.ui-g #office-view .of-table { font-size: 14px; }
html.ui-g #office-view .of-table td { height: var(--g-row); vertical-align: middle; box-sizing: border-box; }
html.ui-g #office-view .of-mmeta, html.ui-g #office-view .of-mdoclbl, html.ui-g #office-view .of-mreason { font-size: 13px; }
html.ui-g #office-view .of-mrow { padding: 12px 14px; margin: 8px 0; border-radius: 12px; align-items: center; }
html.ui-g #office-view .of-tile { padding: 12px 14px; border-radius: 12px; background: var(--g-surface); }
html.ui-g #office-view .of-tile b { font-size: 26px; }
html.ui-g[data-theme="dark"] #office-view .of-badge.warn { color: #F0C25A; }
html.ui-g #office-view .of-warn { color: var(--g-warn); }
html.ui-g #office-view :is(a:not([class]), .linklike) { color: var(--g-brand); }
html.ui-g #office-view .of-filters select { flex: 1 1 200px; max-width: 280px; }
/* поле поиска в ряду отбора — шире: подсказка целиком; если не влезает (телефон) — с «…» и всплывающей подсказкой */
html.ui-g #office-view :is(.of-filters, .of-actions) input:is([type="search"], [type="text"], :not([type])) { flex: 1 1 340px; min-width: 0; }
html.ui-g #office-view input { text-overflow: ellipsis; }
html.ui-g #office-view input::placeholder { text-overflow: ellipsis; }
html.ui-g #office-view summary { min-height: var(--g-ctl-sm); display: list-item; line-height: var(--g-ctl-sm); cursor: pointer; }

/* «Шаблоны»: коды шаблонов — плиткой в 3 ряда, а не столбиком на всю высоту экрана */
html.ui-g #office-view .olc-codes { width: 196px; gap: 4px; }
html.ui-g #office-view :is(.olc-q, .olc-ai, .olc-pre) { font-size: 13px; }

/* окно «Офиса»: стрелка у «Ещё: срок исполнения, гриф» — у summary с display:flex браузер её не рисует, поэтому своя */
html.ui-g #of-modal .of-more > summary, html.ui-g #office-view .of-more > summary { display: flex; align-items: center; gap: 6px; list-style: none; }
html.ui-g #of-modal .of-more > summary::-webkit-details-marker { display: none; }
html.ui-g #of-modal .of-more > summary::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .12s ease; }
html.ui-g #of-modal .of-more[open] > summary::before { transform: rotate(45deg); }
html.ui-g #of-modal .of-more > summary { color: var(--g-muted); }
/* карточка окна — цвет карточки нового вида в обеих темах */
html.ui-g #of-modal .of-modal-box, html.ui-g #of-modal .modal-box { background: var(--g-surface); color: var(--g-ink); }
/* нижние кнопки окна на телефоне переносятся, подпись в одну строку и не обрезана («Сохранить проект» уходил за левый край) */
@media (max-width: 760px) {
  html.ui-g #of-m-actions { display: flex; flex-wrap: wrap; justify-content: stretch; gap: 8px; }
  html.ui-g #of-m-actions > button { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
}

/* ---------------------------------------------------------------- Тендеры */
html.ui-g #tenders-view:not([hidden]) { display: flex; flex-direction: column; }
html.ui-g #tenders-view > * { min-width: 0; }
html.ui-g #tenders-view .td-source-note { order: 20; margin: 14px 0 0; }
/* шапка: заголовок и «⚙ Настройки раздела» — в верхней строке (как в Строительстве, Снабжении и Офисе), рабочие кнопки — строкой ниже */
html.ui-g #tenders-view .td-head { justify-content: flex-start; gap: 8px; margin-bottom: 8px; }
html.ui-g #tenders-view .td-head::after { content: ""; order: 2; flex: 0 0 100%; height: 0; }
html.ui-g #tenders-view .td-head-actions { display: contents; }
html.ui-g #tenders-view .td-head-actions > button { order: 3; }
html.ui-g #tenders-view #td-settings-btn { order: 1; margin-left: auto; }
html.ui-g #tenders-view .td-head-actions > button { display: inline-flex; align-items: center; justify-content: center; height: var(--g-ctl); min-height: var(--g-ctl); padding: 0 14px; font-size: 14px; white-space: nowrap; box-sizing: border-box; }
html.ui-g #tenders-view .td-tabs { gap: 4px; margin: 8px 0 12px; }
html.ui-g #tenders-view .td-tab { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: var(--g-tab); min-height: var(--g-tab); padding: 0 10px; margin: 0; box-sizing: border-box; border-radius: 10px; font: 600 14px/1 var(--g-font); white-space: nowrap; flex: 0 0 auto; }
html.ui-g #tenders-view .td-tab-n { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; font: 700 12px/18px var(--g-font); background: var(--g-pale); color: var(--g-pale-ink); }
html.ui-g #tenders-view .td-tab-n[hidden] { display: none; }
html.ui-g #tenders-view .td-tab.active .td-tab-n, html.ui-g[data-theme="dark"] #tenders-view .td-tab.active .td-tab-n { background: #FFFFFF; color: #17507A; }
html.ui-g #tenders-view .td-tab-scr:not(.active) { color: var(--g-muted); }
html.ui-g #tenders-view .td-tab-warn:not(.active) { background: var(--g-warn-bg); border-color: var(--g-warn); color: var(--g-warn); }
html.ui-g #tenders-view .td-soon { font-size: 14px; color: var(--g-bad); white-space: nowrap; }
html.ui-g #tenders-view .td-waits-btn { height: var(--g-tab); min-height: var(--g-tab); white-space: nowrap; }
html.ui-g #tenders-view .td-toolbar { gap: 8px 12px; margin-bottom: 0; }
html.ui-g #tenders-view .td-toolbar > * { align-self: center; }
html.ui-g #tenders-view .td-toolbar input[type="search"] { flex: 1 1 460px; min-width: 0; height: var(--g-ctl); } /* вся подсказка поиска помещается */
html.ui-g #tenders-view .td-adv-btn { height: var(--g-ctl); min-height: var(--g-ctl); white-space: nowrap; }
html.ui-g #tenders-view .td-closed, html.ui-g #tenders-view #td-count { font-size: 14px; line-height: var(--g-ctl); height: var(--g-ctl); }

/* доска: широкая — листается внутри своего блока, страница вбок не едет */
html.ui-g #tenders-view .td-board { max-width: 100%; grid-auto-columns: minmax(240px, 1fr); gap: 12px; padding-bottom: 10px; scrollbar-width: thin; overscroll-behavior-x: contain; }
html.ui-g #tenders-view .td-col, html.ui-g[data-theme="dark"] #tenders-view .td-col { background: var(--g-surface2); border-color: var(--g-line); border-radius: 12px; min-width: 0; }
html.ui-g #tenders-view .td-col-head { min-height: 44px; box-sizing: border-box; padding: 0 12px; font-size: 14px; border-bottom-color: var(--g-line); }
html.ui-g #tenders-view .td-card, html.ui-g[data-theme="dark"] #tenders-view .td-card { background: var(--g-surface); border-color: var(--g-line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
html.ui-g #tenders-view .td-card-top { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--g-muted); }
html.ui-g #tenders-view .td-card-top > .td-chk { margin: 0; flex: 0 0 auto; }
html.ui-g #tenders-view .td-card-top > span { flex: 1 1 0; min-width: 0; }
html.ui-g #tenders-view .td-card-top > .td-card-num { flex: 0 0 100%; }
html.ui-g #tenders-view .td-card .td-title { font-size: 14px; }
html.ui-g #tenders-view .td-card-foot { font-size: 13px; color: var(--g-ink); flex-wrap: wrap; }
html.ui-g #tenders-view .td-card-foot .hint { font-weight: 400; color: var(--g-muted); }
html.ui-g #tenders-view .td-left { font-size: 12px; background: var(--g-surface2); color: var(--g-muted); border: 1px solid var(--g-line); }
html.ui-g #tenders-view .td-left-hot { background: var(--g-bad-bg); color: var(--g-bad); border-color: transparent; }
html.ui-g #tenders-view .td-left-late { background: var(--g-surface2); color: var(--g-muted); text-decoration: none; }
html.ui-g #tenders-view .td-left-review { background: var(--g-pale); color: var(--g-pale-ink); border-color: transparent; }
html.ui-g #tenders-view .td-table td { height: var(--g-row); vertical-align: middle; font-size: 14px; box-sizing: border-box; }
html.ui-g #tenders-view .td-table select.td-status { height: var(--g-ctl-sm); min-width: 170px; font-size: 14px; }
html.ui-g #tenders-view :is(.td-chk-col, .td-when) { white-space: nowrap; }

/* настройки раздела — в ⚙ «Разделы»; окна на странице в новом виде нет */
html.ui-g #td-set-modal { display: none !important; }
html.ui-g #secset-tenders { scroll-margin-top: calc(var(--g-head-bottom, 112px) + 12px); }
html.ui-g #secset-tenders[hidden] { display: none; }
html.ui-g #secset-tenders textarea { width: 100%; box-sizing: border-box; }
html.ui-g #secset-tenders h4 { margin: 14px 0 6px; }
html.ui-g #secset-tenders > h4:first-child { margin-top: 0; }
html.ui-g #secset-tenders .td-set-people label { min-height: 36px; }
html.ui-g #secset-tenders .td-mail-grid label { display: flex; flex-direction: column; gap: 4px; }
html.ui-g #secset-tenders .td-mail > button { margin: 0 8px 8px 0; }
html.ui-g #secset-tenders .modal-actions { position: static; padding: 12px 0 0; margin: 12px 0 0; background: transparent; }
html.ui-g .gtd-set-link, html.ui-g #td-set-learn.linklike { display: inline; min-height: 0; height: auto; padding: 0; margin: 0; border: 0; background: none; color: var(--g-brand); font: inherit; text-decoration: underline; cursor: pointer; white-space: normal; }

/* ---------------------------------------------------------------- телефон: одна полоса, ничего не закреплено поверх экрана */
@media (max-width: 760px) {
  html.ui-g .g-mbrand { min-height: 44px; }
  html.ui-g .g-tab-more .g-ico svg { stroke-width: 3.2; } /* три точки «Ещё» были почти не видны */
  html.ui-g #tenders-view .td-head-actions > button { letter-spacing: -0.02em; }
  html.ui-g #office-view .gof-nav { position: static; margin: 10px 0 12px; }
  html.ui-g #office-view :is(.gof-groups, .gof-nav .of-tabs) { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  html.ui-g #office-view :is(.gof-groups, .gof-nav .of-tabs)::-webkit-scrollbar { display: none; }
  html.ui-g #office-view .of-tab { flex: 0 0 auto; }
  html.ui-g #office-view :is(.of-mbtns, .of-acq-btns) > :is(button, a) { height: auto; min-height: 44px; }
  html.ui-g .gof-org-full { display: none; }
  html.ui-g .gof-org-short { display: inline; }
  html.ui-g #office-view .of-orgs .vs-btn { min-width: 56px; }
  html.ui-g #office-view .gof-flat .of-tabs { flex-wrap: wrap; overflow: visible; } /* плоская строка сотрудника: всё видно сразу */
  html.ui-g #office-view .of-head h2 { flex: 0 0 100%; }
  html.ui-g #office-view :is(.of-mmeta, .of-mdoclbl, .of-mreason), html.ui-g #office-view .gof-group, html.ui-g #office-view .of-tab { font-size: 14px; }

  html.ui-g #tenders-view .view-head { position: static; }
  html.ui-g #tenders-view .td-head-actions > button:not(#td-settings-btn) { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 0 4px; }
  /* №261116-КИ-1: длинная подпись («💡 Подсказки по вашим отказам») переносится в 2 строки внутри своей кнопки, а не наезжает на соседнюю */
  html.ui-g #tenders-view .td-head-actions > button:not(#td-settings-btn) { white-space: normal; height: auto; min-height: var(--g-ctl); padding: 4px 6px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
  html.ui-g #tenders-view .td-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  html.ui-g #tenders-view .td-tabs::-webkit-scrollbar { display: none; }
  html.ui-g #tenders-view .td-soon { margin-left: 6px; flex: 0 0 auto; }
  html.ui-g #tenders-view .td-toolbar input[type="search"] { flex: 1 1 100%; width: 100%; }
  html.ui-g #tenders-view .td-adv-btn { flex: 1 1 auto; padding: 0 8px; }
  html.ui-g #tenders-view .td-view-switch { flex: 0 0 auto; }
  html.ui-g #tenders-view .td-closed { flex: 1 1 auto; }
  html.ui-g #tenders-view .td-board { grid-auto-columns: minmax(270px, 84%); }
  html.ui-g #tenders-view .td-col-body { max-height: none; overflow-y: visible; }
  html.ui-g #tenders-view :is(.td-card-top, .td-card-foot, .td-card .td-title, .td-left, .td-col-head) { font-size: 14px; }
}

/* =====================================================================================
   Г6 (03.11.2026) — остальные разделы: Накладные, Калькулятор, База знаний, Персонал, Предложения, Сотрудники, Агенты,
   Журнал, Документы, Instagram, Чат. Только вид: данные, права и обработчики прежние. Старый вид и выключатель пока на месте.
   ===================================================================================== */
/* шкала размеров (Р11): 11,5 / 12,5 / 13,5 / 14,5 / 16 / 18,7 / 24 px прежних стилей — на ступени шкалы */
html.ui-g :is(#waybills-view, #kb-view, #hr-view, #suggestions-view, #users-view, #journal-view, #docs-view, #agents-view, #chat-view, #instagram-view) { font-size: var(--g-fs); }
html.ui-g :is(#waybills-view, #kb-view, #hr-view, #suggestions-view, #users-view, #journal-view, #docs-view, #agents-view, #instagram-view) h2 { font-size: 26px; }
html.ui-g :is(#waybills-view, #kb-view, #hr-view, #suggestions-view, #users-view, #journal-view, #docs-view, #agents-view, #instagram-view) h3 { font-size: 18px; }
html.ui-g :is(#waybills-view, #kb-view, #hr-view, #suggestions-view, #users-view, #journal-view, #docs-view, #agents-view, #instagram-view) h4 { font-size: 17px; }
html.ui-g :is(#kb-view, #users-view, #journal-view, #docs-view, #agents-view, #instagram-view, #chat-view) :is(summary, dd, dt, p, li, td, b) { font-size: inherit; }
html.ui-g :is(#kb-view, #users-view, #journal-view, #agents-view, #instagram-view) table :is(td, th) { font-size: 14px; }
/* Всё, что мельче основного текста, — на 12 или 13 px */
html.ui-g #kb-view :is(.kb-pill, .kb-acc), html.ui-g #journal-view .j-state { font-size: 12px; }
html.ui-g #kb-view :is(.kb-chain, .kb-chain a, .kb-doc-title), html.ui-g #journal-view .j-arrow { font-size: 13px; }
html.ui-g :is(#suggestions-view .sg-attach, #users-view .ur-item span) { font-size: 14px; }
html.ui-g #agents-view :is(.ag-tab, .ag-stat, .ag-stats > span, .ag-attest-t, .ag-kind span) { font-size: 14px; }
html.ui-g #agents-view .ag-stat b, html.ui-g #agents-view .ag-stats b { font-size: inherit; }
html.ui-g #agents-view .ag-name b { font-size: inherit; }
html.ui-g #instagram-view :is(.ig-tab, .ig-when, .ig-empty, .ig-plan-bar, .ig-day-h, .ig-tags, .ig-facts li, .igs-hook, .ig-cap) { font-size: 14px; }
html.ui-g #instagram-view :is(.ig-chip, .ig-pi, .ig-pi-t) { font-size: 14px; }
html.ui-g #instagram-view :is(.ig-badge, .ig-kind, .ig-pi-k) { font-size: 12px; }
html.ui-g #instagram-view .ig-tab-n { font-size: 12px; }
html.ui-g #chat-view :is(.ch-meta, .ch-meta b, .ch-meta span, .ch-sys, .ch-urgent-l, .ch-react, .ch-link, .ch-ksrc-i) { font-size: 13px; }
html.ui-g #chat-view :is(.ch-time, .ch-readers, .ch-hint) { font-size: 12px; }
html.ui-g #chat-view :is(.ch-text, .ch-file-t a, .ch-mem-t b, .ch-mem-h, .ch-check) { font-size: 14px; }
html.ui-g #chat-view :is(.ch-ibtn, .ch-more, .ch-file-dl, .ch-head-title) { font-size: 15px; }

/* Строка таблицы и основание (Р1, Р9) */
html.ui-g :is(#journal-view table.products, #users-view .sd-table, #users-view .sp-table, #agents-view .ag-table, #kb-view .kb-logt) tbody td { height: var(--g-row); box-sizing: border-box; }
html.ui-g #kb-view .kb-tabs button { min-height: var(--g-tab); height: var(--g-tab); }

/* Чат: поле ввода не сжимается до столбика, когда рядом открыта стопка уведомлений или панель участников */
html.ui-g #chat-view .ch-crow { flex-wrap: wrap; row-gap: 8px; }
html.ui-g #chat-view .ch-crow > textarea { flex: 1 1 100%; order: -1; width: 100%; min-width: 0; }

html.ui-g #agents-view button.ag-tab.ag-tab { min-height: var(--g-tab); height: var(--g-tab); box-sizing: border-box; }
html.ui-g #chat-view .ch-who { font-size: 14px; }
html.ui-g #instagram-view .table-wrap { overflow-x: auto; }
html.ui-g #instagram-view .igs-sb tbody td { height: var(--g-row); box-sizing: border-box; }
html.ui-g #docs-view .modal-actions { flex-wrap: wrap; }
html.ui-g #docs-view .modal-actions > button { white-space: nowrap; }

/* Окна: та же шкала, что и в разделах (карточка товара, КП и счёт, заказ поставщику, тендер и прочие) */
html.ui-g :is(.modal-overlay, .staff-drawer, .om-box) { font-size: var(--g-fs); }
html.ui-g :is(.modal-box, .om-box, .staff-drawer) :is(a, b, i, dd, dt, h4, .of-h, .of-task, .tdd-sumline) { font-size: inherit; }
html.ui-g :is(.modal-box, .om-box, .staff-drawer) h2 { font-size: 20px; }
html.ui-g :is(.modal-box, .om-box, .staff-drawer) h3 { font-size: 18px; }
html.ui-g :is(.modal-box, .om-box, .staff-drawer) :is(h4, .of-h) { font-size: 17px; }
html.ui-g :is(.modal-box, .om-box, .staff-drawer) h5 { font-size: 14px; }
html.ui-g :is(.modal-box, .om-box) .td-sb-btn { font-size: 13px; min-height: var(--g-ctl-sm); }
html.ui-g .modal-box .olc-pre { font-size: 13px; }
html.ui-g .modal-box :is(.ch-ibtn) { font-size: 15px; }

/* Окно «Рейсы» и другие формы .sc-form: поле в подписи-колонке получало высоту от flex-основания 150–170 px */
html.ui-g .sc-form label > :is(input, select), html.ui-g .sc-form > :is(input, select) { flex: 0 1 auto; height: var(--g-ctl); box-sizing: border-box; }
html.ui-g .sc-form > :is(input, select) { flex: 1 1 170px; }
html.ui-g .sc-form > .sc-short { flex: 0 1 150px; }
html.ui-g .sc-form label > :is(input, select) { width: 100%; min-width: 110px; }
html.ui-g .modal-overlay h2 { font-size: 20px !important; }
html.ui-g :is(.modal-overlay, .staff-drawer, .om-box) :is(code, kbd, pre, samp, tt, [class*="mono"], [class*="-code"], [class*="mcode"]) { font-family: var(--g-font); font-variant-numeric: tabular-nums; }
html.ui-g :is(.modal-overlay, .staff-drawer, .om-box) table :is(td, th) { font-size: 14px; }
html.ui-g .modal-overlay :is(.ch-ibtn, .ch-clip, .chd-emo) { font-size: 15px !important; }
html.ui-g .modal-overlay li { font-size: inherit; }
html.ui-g .modal-box .td-sb-n { font-size: 12px; }
html.ui-g .modal-box :is(.spd-mid, .spd-ok, .spd-bad, .spd-warn) { font-size: 14px; }
html.ui-g .modal-overlay :is(ul, ol) > li { font-size: inherit !important; }

/* №261116-КИ-7 (17.11): на компьютере малые кнопки не меньше нормы 36 px — «👍»/«👎» в ответах Капли (было 28), крестик
   Инструкции (30×30), строка-кнопка «Главной» «Утвердить публикации и сценарии: N» (высота 20). Только ≥ 761 px:
   на телефоне действует правило 44 px (КИ-5). */
@media (min-width: 761px) {
  html.ui-g .asst-acts .ghost.small { min-height: var(--g-ctl-sm); min-width: var(--g-ctl-sm); box-sizing: border-box; }
  html.ui-g #help-close { width: var(--g-ctl-sm); height: var(--g-ctl-sm); min-width: var(--g-ctl-sm); }
  html.ui-g #home-view .hg-what-b { display: flex; align-items: center; min-height: var(--g-ctl-sm); }
}

html.ui-g #journal-view button { white-space: nowrap; }
@media (max-width: 760px) {
  /* Instagram на телефоне: десять вкладок — одной лентой, а не пятью рядами (выбранная сама встаёт в видимую часть, ui-g-rest.js) */
  html.ui-g #instagram-view .ig-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  html.ui-g #instagram-view .ig-tabs .ig-tab { flex: 0 0 auto; white-space: nowrap; }
  html.ui-g #journal-view button { padding-left: 10px; padding-right: 10px; }
}

/* Тёмная тема: контраст текста не ниже 4,5:1 (Р12) */
html.ui-g[data-theme="dark"] #chat-view :is(.ch-chip.on, .ch-plus), html.ui-g[data-theme="dark"] #chat-view .ch-msg.mine .ch-bubble { background: #1F6699; border-color: #1F6699; color: #FFFFFF; }
html.ui-g[data-theme="dark"] #chat-view .ch-msg.mine .ch-urgent-l { color: #FFFFFF; }
html.ui-g[data-theme="dark"] #chat-view .ch-unread { background: #C2410C; color: #FFFFFF; }
html.ui-g[data-theme="dark"] .docs-ver { color: var(--g-pale-ink); }
html.ui-g[data-theme="dark"] #instagram-view .ig-pi-k { color: var(--g-muted); }
html.ui-g[data-theme="dark"] #instagram-view .ig-badge.ig-ok { background: var(--g-ok-bg); color: var(--g-ok); }
html.ui-g[data-theme="dark"] #chat-view { --ch-blue: #1F6699; --ch-orange: #C2410C; }
html.ui-g[data-theme="dark"] #chat-view :is(.ch-plus, .ch-send, .ch-send-btn) { background: #1F6699 !important; border-color: #1F6699 !important; color: #FFFFFF !important; }
html.ui-g .modal-overlay .of-ev { font-size: 13px; }
html.ui-g #detail-view { font-size: var(--g-fs); }
html.ui-g #detail-view label { font-size: 14px; }
html.ui-g[data-theme="dark"] #chat-view .ch-file a { color: var(--g-pale-ink); }
html.ui-g[data-theme="dark"] #chat-view .ch-msg.mine .ch-file a { color: #FFFFFF; }
html.ui-g[data-theme="dark"] #chat-view .ch-msg:not(.mine) .ch-urgent-l { color: #F2914F; }
html.ui-g[data-theme="dark"] .modal-overlay :is(.of-warn, .of-warn b, .spd-mid, .tdd-warn) { color: var(--g-warn); }
html.ui-g[data-theme="dark"] .modal-overlay .spd-bad { color: var(--g-bad); }
html.ui-g[data-theme="dark"] .modal-overlay :is(.spd-ok, .ux-pload:not(.hot)) { color: var(--g-ok); }
html.ui-g[data-theme="dark"] .modal-overlay .tds-q { color: var(--g-muted); }

/* №261116-КИ-6 (18.11, вторая попытка): вкладки на компьютере — ровно 40 px (норма --g-tab), в ряду одна высота. Было: «Каталог» .o-tab 48
   (счётчик в строке + нижняя полоса 2 px поверх min-height), .sp-tab 41/40 (рамка 1 px у выбранной), .vs-btn 42
   (height: 100% от .view-switch 44). Подпись вкладки — в одну строку, поэтому ряд вкладок заявок .orders-tabs переносится
   целыми вкладками, а не вылезает за свой столбец (окно ~1000 px: 528 px вкладок в столбце 464 — замечание Рецензента 17.11).
   Телефон (≤ 760) не трогаем — там 44. */
@media (min-width: 761px) {
  html.ui-g :is(.o-tab[data-view], .cl-kind-tab, .sp-tab) { height: var(--g-tab); min-height: var(--g-tab); box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  html.ui-g .orders-tabs:has(> .o-tab[data-view]) { flex-wrap: wrap; row-gap: 0; min-width: 0; max-width: 100%; }
  html.ui-g .orders-tabs > .o-tab[data-view] { flex: 0 0 auto; max-width: 100%; }
  html.ui-g .view-switch:has(.vs-btn) { height: auto; align-self: center; }
  html.ui-g .view-switch .vs-btn { height: var(--g-tab); min-height: var(--g-tab); box-sizing: border-box; }
}

/* Г7 (07.11.2026): в меню ⚙ Настроек 29 пунктов в шести группах — пункт ниже обычной кнопки, чтобы группа помещалась целиком */
html.ui-g #settings-view .set-mi { min-height: 36px; padding: 7px 12px; }
@media (max-width: 860px) { html.ui-g #settings-view .set-mi { min-height: 40px; } }

/* 09.11.2026, №261109-КИ-5: на телефоне (≤ 760 px) текст не мельче 14 px — заголовки групп панели, «_ Свернуть»,
   меню «Настроек», подсказки абзацем, время и подвал окна ошибки. Только размер шрифта.
   Подписи нижних вкладок .g-tab-lbl (12 px, пять в ряд) — норма вида Г, не меняются. */
@media (max-width: 760px) {
  html.ui-g .g-side .g-h { font-size: 14px; }
  html.ui-g .win-min, html.ui-g .win-frame .win-min { font-size: 14px; }
  html.ui-g .win-frame.win-min-in .win-min { height: 24px; min-height: 24px; line-height: 22px; font-size: 14px; }
  html.ui-g .settings-page .set-mi { font-size: 14px; }
  html.ui-g .settings-page .set-gh { font-size: 14px; }
  html.ui-g p.hint, html.ui-g .modal-box.client-modal p.hint, html.ui-g .modal-box.sell-modal p.hint { font-size: 14px; }
  html.ui-g .pd-at, html.ui-g .pd-foot { font-size: 14px; }
}

/* №261116-КИ-4 (17.11.2026): телефон — текст в содержимом не мельче 14 px (норма КИ-5 09.11; подписи нижних вкладок — 12).
   Прежнее правило было внутри #app, а окно заявки и другие окна лежат вне #app, и у части элементов свои, более точные размеры
   (12–13 px). Здесь — те же или более точные селекторы, поэтому правило стоит в конце файла. Только размер шрифта. */
@media (max-width: 760px) {
  html.ui-g :is(.cs-tab, .cs-chips button.cs-chip, .cs-stage, .cs-pdst, .td-sb-btn, .td-sb-final .td-sb-btn, .om-chip-s, .ur-title, .fn-hint, button.small, .ghost.small) { font-size: 14px; }
  html.ui-g :is(.modal-box, .om-box) .td-sb-btn { font-size: 14px; }
  html.ui-g .om-g3 .om-card h3, html.ui-g .om-g3 h3, html.ui-g .om-g3 .om-items-card h3.om-items-h { font-size: 14px; }
  html.ui-g #order-modal :is(.om-chip-s, .fn-hint, .fn-list) { font-size: 14px; } /* у окна заявки свои размеры через #order-modal */
}

/* №261117-РЦ-1 (18.11.2026): окно 761–1000 px (половина экрана, планшет боком) — кружок и «Выйти» уходили за край
   (на 820 px до 941 px, страница листалась вбок): часы с датой и строкой «Рабочее время» не сжимались (318 px).
   Теперь «кто вошёл» не сжимается и всегда виден, а дата и строка состояния сжимаются с «…» (полный текст — как и
   раньше, по наведению на строку), на окне уже 900 px остаётся только время. 1440 и телефон (≤ 760) — как были. */
@media (min-width: 761px) and (max-width: 1000px) {
  html.ui-g .tb2 > .tb-row1 { gap: 12px; }
  html.ui-g .tb2 .tb-row1 > .g-search { min-width: 180px; }
  html.ui-g .tb2 #clock { flex: 0 1 auto; min-width: 0; }
  html.ui-g .tb2 #clock .clock-text { min-width: 0; overflow: hidden; }
  html.ui-g .tb2 #clock .clock-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.ui-g .tb2 #clock .clock-status { max-width: 100%; }
  html.ui-g .tb2 .topbar-account { flex: 0 0 auto; }
}
@media (min-width: 761px) and (max-width: 900px) {
  html.ui-g .tb2 #clock .clock-text { display: none; }
}
