/* Шрифт Onest (SIL Open Font License 1.1, static/fonts/OFL.txt): переменный,
   веса 100–900 в одном файле, без обращений во внешние сети. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Цвета и размеры — переменные. Основное оформление: нейтральные серые тона и
   один акцентный цвет (оранжевый) на графитовых серых; цветные только статусы.
   Главная кнопка (--primary-bg/--primary-fg/--primary-line): в светлой теме мягкая,
   в темной — сплошная апельсиновая. --accent-fg — цвет
   текста на акцентной заливке, --accent-text — акцентный текст на фоне. */
:root {
  --bg: #f5f5f4; --card: #ffffff; --raised: #fafaf9; --hover: #f1f1ef; --fg: #1f2023; --strong: #0c0d0f;
  --muted: #63666d; --subtle: #8b8e95; --line: #e4e4e1; --line-strong: #cfd0cc;
  --accent: #f5a020; --accent-hover: #e89410; --accent-fg: #1f2023; --accent-soft: #fff3e0; --accent-text: #a35400;
  --primary-bg: #ffe7c2; --primary-hover: #ffdcaa; --primary-fg: #8a4600; --primary-line: #ffc979;
  --ok-bg: #e3f6e9; --ok-fg: #1a7f37; --err-bg: #fdecea; --err-fg: #c0262f; --warn: #a35200; --warn-bg: #fff4d6; --chip: #efefed;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, .05);
  --shadow: 0 1px 2px rgba(24, 24, 27, .05), 0 4px 16px rgba(24, 24, 27, .05);
  --shadow-pop: 0 2px 6px rgba(24, 24, 27, .10), 0 14px 36px rgba(24, 24, 27, .18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --select-arrow: url("/static/select.svg");
  color-scheme: light;
}
/* Оформление выбирает пользователь (data-theme на <html>): без атрибута —
   как в системе, light — светлое, dark — темное, classic — классическое. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111113; --card: #1b1c1f; --raised: #202125; --hover: #26272b; --fg: #e8e8e6; --strong: #f6f6f4;
    --muted: #a0a1a6; --subtle: #7b7d83; --line: #2c2d31; --line-strong: #3e4045;
    --accent: #fb8a3c; --accent-hover: #fda262; --accent-fg: #1f0e02; --accent-soft: #3a2314; --accent-text: #fd9a55;
    --primary-bg: #fb8a3c; --primary-hover: #fda262; --primary-fg: #1f0e02; --primary-line: #fb8a3c;
    --ok-bg: #0f2a1d; --ok-fg: #56c770; --err-bg: #341519; --err-fg: #ff8078; --warn: #e0a83a; --warn-bg: #2d2510; --chip: #26272b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113; --card: #1b1c1f; --raised: #202125; --hover: #26272b; --fg: #e8e8e6; --strong: #f6f6f4;
  --muted: #a0a1a6; --subtle: #7b7d83; --line: #2c2d31; --line-strong: #3e4045;
  --accent: #fb8a3c; --accent-hover: #fda262; --accent-fg: #1f0e02; --accent-soft: #3a2314; --accent-text: #fd9a55;
  --primary-bg: #fb8a3c; --primary-hover: #fda262; --primary-fg: #1f0e02; --primary-line: #fb8a3c;
  --ok-bg: #0f2a1d; --ok-fg: #56c770; --err-bg: #341519; --err-fg: #ff8078; --warn: #e0a83a; --warn-bg: #2d2510; --chip: #26272b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
:root[data-theme="classic"] {
  --bg: #f7f2e6; --card: #fefbf1; --raised: #fefbf1; --hover: #fbf6d9; --fg: #1b1a14; --strong: #1b1a14;
  --muted: #6e6a58; --subtle: #6e6a58; --line: #cbc6af; --line-strong: #a8a387;
  --accent: #2a4fc4; --accent-hover: #2a4fc4; --accent-fg: #ffffff; --accent-soft: #f5f1de; --accent-text: #2a4fc4;
  --primary-bg: var(--accent); --primary-hover: var(--accent); --primary-fg: #ffffff; --primary-line: var(--accent);
  --ok-bg: #e7f1dc; --ok-fg: #2f5d1a; --err-bg: #fbe3dc; --err-fg: #a12a1f; --warn: #8a5a00; --warn-bg: #fbf6d9; --chip: #ece8d6;
  --grid: #b2ac8a; --band: #e9e5d9; --sel: #3f5fcc;
  --shadow-sm: none; --shadow: none; --shadow-pop: 2px 2px 4px rgba(0, 0, 0, .2); --ring: none;
  --r-sm: 0; --r: 0; --r-lg: 0;
  --font: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--strong); margin: 0 0 6px; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; color: var(--strong); margin: 30px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
/* Закладки внутри страницы: подчеркивание акцентом у выбранной. */
nav.tabs { display: flex; gap: 2px 18px; flex-wrap: wrap; margin: 14px 0 20px; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 9px 2px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
nav.tabs a:hover { color: var(--strong); text-decoration: none; }
nav.tabs a.active { color: var(--strong); border-bottom-color: var(--accent); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.scroll td.text { min-width: 16rem; }
.scroll td.who { min-width: 10rem; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--raised); }
th.center { text-align: center; }
tr:last-child td { border-bottom: none; }
tr:hover > td { background: var(--hover); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th.wrap { white-space: normal; min-width: 5.5rem; }
tr.total td { font-weight: 700; color: var(--strong); border-top: 1px solid var(--line-strong); background: var(--raised); }
.notice { background: var(--ok-bg); color: var(--ok-fg); padding: 11px 14px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--r); margin-bottom: 16px; }
.error { background: var(--err-bg); color: var(--err-fg); padding: 11px 14px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--r); margin-bottom: 16px; white-space: pre-wrap; }
.warn { color: var(--warn); margin: 6px 0; }
.fx-gain { color: var(--ok-fg); }
.fx-loss { color: var(--err-fg); }
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.6; }
.chip.posted { background: var(--ok-bg); color: var(--ok-fg); }
.chip.cancelled { background: var(--err-bg); color: var(--err-fg); }
form .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
form .grid > .end { align-self: end; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 7px 10px; margin-top: 4px; transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--muted)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
input.amount { text-align: right; font-variant-numeric: tabular-nums; }
table input, table select { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
button, .button { font: inherit; font-weight: 600; font-size: 14px; line-height: 1.45; padding: 8px 16px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--card); color: var(--fg); cursor: pointer; display: inline-block; box-shadow: var(--shadow-sm);
  transition: background .15s ease, border-color .15s ease, color .15s ease; }
button:hover, .button:hover { background: var(--hover); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
/* Главная кнопка: цвета из --primary-* (в светлой теме мягкая, в темной сплошная). */
button.primary, .button.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-line); box-shadow: none; }
button.primary:hover, .button.primary:hover { background: var(--primary-hover); border-color: var(--primary-line); }
button.danger { color: var(--err-fg); }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline > div { min-width: 160px; }
.inline > .grow { flex: 1 1 240px; }
.big { font-size: 20px; font-weight: 700; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 12px; }
.mt0 { margin-top: 0; }
.full { flex-basis: 100%; margin: 0; }
code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
nav.tabs .group { padding: 9px 4px 9px 14px; font-size: 12px; color: var(--subtle); border-left: 1px solid var(--line); align-self: center; }
tr.archived td { color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; color: var(--fg); font-size: 14px; font-weight: 400; }
.check input { width: auto; margin: 0; }
.chip.error { background: var(--err-bg); color: var(--err-fg); }
.chip.pending { background: var(--chip); }
.chip.done { background: var(--ok-bg); color: var(--ok-fg); }
.chip.active, .chip.open { background: var(--accent-soft); color: var(--accent-text); }
.chip.rejected { background: var(--err-bg); color: var(--err-fg); }
tr.current > td { background: var(--accent-soft); }
.taskform input { min-width: 14rem; }
.taskform .actions { margin-top: 8px; }
.chip.abc-A { background: var(--ok-bg); color: var(--ok-fg); }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.sections .card { margin-bottom: 0; }
td.links { white-space: nowrap; }
.filterinfo { margin: 0 0 10px; }

/* Раскладка как у МойСклад: сверху панель разделов со значками (пункты
   раздела — в выпадающем списке и второй строкой у выбранного), справа в
   ней организация, настройки и пользователь. Под ней панель страницы:
   заголовок, кнопки, «Фильтр» и поиск; фильтры раскрываются над списком.
   Содержимое — во всю ширину. */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: stretch; gap: 8px; min-height: 60px; padding: 0 16px;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.topbar a.brand { display: flex; align-items: center; gap: 9px; flex: none; padding-right: 10px; font-weight: 800; font-size: 17px;
  letter-spacing: -.01em; color: var(--strong); }
.topbar a.brand:hover { text-decoration: none; }
.topbar a.brand::before { content: ""; flex: none; width: 24px; height: 24px;
  background: url(/static/icons/icon.svg) center / contain no-repeat; border-radius: 0; }
nav.areas { display: flex; flex-wrap: wrap; align-items: stretch; flex: 1; min-width: 0; }
/* Разделы делят ширину панели поровну по содержимому: сколько бы их ни
   было (модули скрыты, права), панель заполнена без пустоты справа. */
nav.areas .area { position: relative; display: flex; flex: 1 1 0; min-width: max-content; justify-content: center; }
nav.areas .area > a { flex: 1; }
nav.areas .area > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 9px 5px;
  color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.1; white-space: nowrap; border-bottom: 2px solid transparent; }
nav.areas .area > a svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav.areas .area > a:hover, nav.areas .area:hover > a { color: var(--strong); background: var(--hover); text-decoration: none; }
nav.areas .area > a.active { color: var(--accent-text); border-bottom-color: var(--accent); }
nav.areas .dropdown { display: none; position: absolute; z-index: 50; top: 100%; left: 0; min-width: 230px; padding: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow-pop); }
nav.areas .dropdown a { display: block; padding: 7px 10px; border-radius: var(--r-sm); color: var(--fg); font-size: 14px; white-space: nowrap; }
nav.areas .dropdown a:hover { background: var(--hover); text-decoration: none; }
nav.areas .dropdown a.active { color: var(--accent-text); font-weight: 600; }
@media (hover: hover) and (min-width: 721px) {
  nav.areas .area:hover > .dropdown, nav.areas .area:focus-within > .dropdown { display: block; }
}
.topright { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.topmenu { position: relative; }
.topmenu > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: var(--r);
  cursor: pointer; color: var(--muted); user-select: none; }
.topmenu > summary::-webkit-details-marker { display: none; }
.topmenu > summary:hover, .topmenu[open] > summary { background: var(--hover); color: var(--strong); }
.topmenu > summary svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topmenu.active > summary { color: var(--accent-text); }
.orgmenu > summary { max-width: 260px; }
.orgmenu > summary::after { content: "▾"; color: var(--subtle); font-size: 12px; }
.orgmenu .orgname { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.orgmenu .orgname b, .orgmenu .orgname small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgmenu .orgname b { font-weight: 600; font-size: 14px; color: var(--fg); }
.orgmenu .orgname small { font-size: 12px; color: var(--muted); }
.orgmenu .avatar { width: 28px; height: 28px; font-size: 12px; }
.topmenu .menu { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; min-width: 260px; max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; font-size: 14px; }
.topmenu .menu > a, .topmenu .menu button.linklike { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--fg); font-size: 14px; font-weight: 400; text-align: left; width: 100%; }
.topmenu .menu > a:hover, .topmenu .menu button.linklike:hover { background: var(--hover); text-decoration: none; }
.topmenu .menu > a.active { background: var(--accent-soft); color: var(--accent-text); }
.topmenu .menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.topmenu .menu-group { margin: 0; padding: 6px 10px 2px; color: var(--subtle); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.topmenu .menu-note { margin: 0; padding: 7px 10px; color: var(--muted); font-size: 13px; }
.orgmenu .menu { min-width: 300px; }
.orgmenu .menu a { align-items: flex-start; }
.orgmenu .menu a.add { align-items: center; color: var(--accent-text); }
.orgmenu .txt { display: flex; flex-direction: column; min-width: 0; }
.orgmenu .name { line-height: 1.3; }
.orgmenu .meta { font-size: 12px; line-height: 1.3; color: var(--muted); }
.orgmenu a.active .meta { color: var(--accent-text); opacity: .75; }
.orgmenu a.add .avatar { background: transparent; color: var(--accent-text); border: 1px dashed var(--line-strong); font-size: 18px; font-weight: 400; }
.usermenu .avatar.round { border-radius: 50%; width: 32px; height: 32px; }
.usermenu .avatar:not([class*="tone"]) { background: var(--chip); color: var(--muted); }
.usermenu .user { display: flex; flex-direction: column; padding: 8px 10px 4px; }
.usermenu .user .name { font-weight: 600; color: var(--fg); }
.usermenu .user .meta { font-size: 12px; color: var(--muted); }
.usermenu .themebar { padding: 6px 10px; }
.usermenu .themebar label { font-size: 12px; }
.usermenu .themebar select { padding: 4px 28px 4px 8px; font-size: 13px; }

nav.subnav { display: flex; gap: 0 20px; flex-wrap: wrap; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line); }
nav.subnav a { padding: 9px 2px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
/* Пункты раздела тоже растягиваются на всю строку. */
nav.subnav a { flex: 1 1 auto; text-align: center; white-space: nowrap; }
nav.subnav a:hover { color: var(--strong); text-decoration: none; }
nav.subnav a.active { color: var(--strong); border-bottom-color: var(--accent); font-weight: 600; }

main.page { flex: 1; min-width: 0; padding: 16px 24px 56px; container-type: inline-size; }
/* Панель страницы: заголовок, кнопки и поиск слева, печать и Excel справа. */
.pagebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 14px; min-height: 38px; }
.pagebar:not(:has(h1, a, button, form)) { display: none; }
.pagetitle { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: 6px; }
.pagetitle h1 { font-size: 22px; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pagebar .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pagebar .tools:empty { display: none; }
.pagebar .tools.right { margin-left: auto; }
.pagebar .actions, .pagebar .docbar { margin: 0; gap: 8px; }
.pagebar .button, .pagebar button:not(.linklike), .pagebar .printmenu > summary { padding: 6px 13px; font-size: 13.5px; }
.pagebar .filterbtn { display: inline-flex; align-items: center; gap: 6px; }
.pagebar .filterbtn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pagebar .filterbtn.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
/* Вкладки карточки (app.js): «Карточка», «Бухгалтерия», «Файлы N» рядом с
   «История»; блоки с data-panel показываются по вкладке. */
.pagebar .cardtabs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pagebar .cardtabs .button.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.pagebar .cardtabs .count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 11.5px; line-height: 18px; text-align: center; }
.pagebar .cardtabs .button.on .count { background: var(--accent); color: var(--accent-fg); }
.quicksearch input { margin: 0; width: 240px; padding: 6px 10px; font-size: 13.5px; }
.listhint { margin: 0 0 8px; }

/* Фильтры — раскрывающаяся панель над списком, поля в несколько колонок. */
.filterpanel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); }
.filterpanel[hidden], [data-kpp][hidden] { display: none; }
.filterpanel .block + .block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.filterpanel h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--subtle); margin: 0 0 8px; font-weight: 600; }
.filterpanel form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.filterpanel form label, .filterpanel form .check, .filterpanel .actions { margin: 0; }
.filterpanel form > p { grid-column: 1 / -1; margin: 0; }

/* Форма документа: кнопки «Провести», «Сохранить» — сверху, как в МойСклад,
   и остаются на виду при прокрутке. */
form.card:has(> .grid):has(> .actions:last-child button.primary) { display: flex; flex-direction: column; }
form.card:has(> .grid) > .actions:last-child:has(button.primary) { order: -1; position: sticky; top: 61px; z-index: 20; margin: -18px -18px 16px;
  padding: 10px 18px; background: var(--raised); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* Значки организаций: мягкая подложка оттенка и буквы того же цвета. */
.avatar { flex: none; width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; font-size: 13px; font-weight: 700;
  line-height: 1; --tone: var(--muted); color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, var(--card)); }
.avatar.tone0 { --tone: #c97400; } .avatar.tone1 { --tone: #2f8a55; } .avatar.tone2 { --tone: #7b5ccc; }
.avatar.tone3 { --tone: #b8691f; } .avatar.tone4 { --tone: #23838c; } .avatar.tone5 { --tone: #b84a6e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .avatar { background: color-mix(in srgb, var(--tone) 22%, var(--card)); color: color-mix(in srgb, var(--tone) 55%, #fff); }
}
:root[data-theme="dark"] .avatar { background: color-mix(in srgb, var(--tone) 22%, var(--card)); color: color-mix(in srgb, var(--tone) 55%, #fff); }

/* Узкий экран (телефон): разделы — строкой со значками, подменю — второй строкой. */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 0 10px; gap: 0 6px; position: static; }
  .topbar a.brand { order: 1; min-height: 52px; }
  .topright { order: 2; }
  nav.areas { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; border-top: 1px solid var(--line); }
  nav.areas .area, nav.subnav a { flex: 0 0 auto; }
  .orgmenu > summary { max-width: 160px; }
  nav.subnav { padding: 0 12px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  main.page { padding: 12px 12px 40px; }
  .quicksearch, .quicksearch input { width: 100%; }
  .pagebar .tools.right { margin-left: 0; }
  form.card:has(> .grid) > .actions:last-child:has(button.primary) { top: 0; }
}

/* Воронка сделок: колонки стадий с карточками. */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.board .column { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; }
.board h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 2px 4px 10px; }
.dealcard { display: flex; flex-direction: column; gap: 2px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); }
.dealcard:hover { border-color: var(--accent); text-decoration: none; }

/* Вход и пользователи: мягкое акцентное свечение в углу. */
.bare { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(60% 55% at 85% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%), var(--bg); }
.bare main.card { width: 100%; max-width: 400px; padding: 28px; box-shadow: var(--shadow-pop); }
.bare .brand-line { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--strong); font-size: 17px; }
.bare .brand-line::before { content: ""; width: 24px; height: 24px;
  background: url(/static/icons/icon.svg) center / contain no-repeat; border-radius: 0; }
form.stack label { display: block; margin-bottom: 14px; }
button.linklike { border: 0; background: none; padding: 0; color: var(--accent-text); font-size: 13px; font-weight: 500; box-shadow: none; }
button.linklike:hover { background: none; text-decoration: underline; }
.exportbar { display: flex; gap: 16px; align-items: center; margin: 0 0 12px; font-size: 13px; }
.temp-password { border-color: var(--warn); }
code.big { font-size: 18px; letter-spacing: 1px; user-select: all; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
fieldset .check { margin: 4px 0; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Сторно в журнале и карточке счета */
tr.storno td { color: var(--err-fg); }

/* Сводка организации */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  color: var(--fg); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.kpi:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); text-decoration: none; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--strong); font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--subtle); font-size: 12px; }
.kpi.bad .value { color: var(--err-fg); }

/* Печать отчетов: без меню, фильтров и кнопок */
.print-title h1 { font-size: 18px; }
table.kudir tr.cols td { text-align: center; color: var(--muted); font-size: 12px; }
@media print {
  .topbar, nav.subnav, .filterpanel, .actions, .noprint { display: none !important; }
  .app, main.page, main, .pagebar { display: block !important; margin: 0 !important; padding: 0 !important; }
  body { background: #fff; color: #000; }
  table { font-size: 11px; }
  a { color: inherit; text-decoration: none; }
  .card, .scroll { box-shadow: none; }
}
/* Кнопка «Печать» с выпадающим списком печатных форм. */
.docbar { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.printmenu { position: relative; display: inline-block; }
.printmenu > summary { list-style: none; padding: 5px 12px; font-size: 13px; user-select: none; }
.printmenu > summary::-webkit-details-marker { display: none; }
.printmenu > summary::after { content: " ▾"; color: var(--subtle); }
.printmenu[open] > summary { border-color: var(--accent); }
.printmenu .menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; font-size: 14px; }
.printmenu .menu-forms { display: flex; flex-direction: column; }
.printmenu .menu a, .printmenu .menu button { display: block; padding: 7px 10px; text-align: left; white-space: nowrap;
  color: var(--fg); text-decoration: none; border: 0; border-radius: var(--r-sm); background: none; font-size: 14px; font-weight: 400; box-shadow: none; }
.printmenu .menu a:hover, .printmenu .menu button:hover { background: var(--hover); }
.printmenu .menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.printmenu .menu-note { margin: 0; padding: 7px 10px; color: var(--muted); font-size: 13px; }
.printmenu .menu-group { margin: 0; padding: 6px 10px 2px; color: var(--subtle); font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; }
.createmenu > summary { font-size: 14px; padding: 7px 14px; }
.createmenu > summary::after { color: inherit; opacity: .8; }
.printmenu .menu-note[hidden] { display: none; }
tr[data-row] { cursor: default; }
tr[data-row].selected > td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media print { tr[data-row].selected > td { background: none; } }

/* Выбор оформления: в меню пользователя и на странице профиля. */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.themecard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--fg); font-size: 14px; font-weight: 400; cursor: pointer; }
.themecard:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.themecard input { width: auto; margin: 0; }
/* Выбор страны учета: карточки стран. */
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.countrycard { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--fg); font-size: 15px; font-weight: 400; cursor: pointer; }
.countrycard:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.countrycard input { width: auto; margin: 0; }
.countrycard .check b { font-size: 16px; }
.preview { position: relative; display: block; height: 64px; border: 1px solid var(--pv-line); border-radius: var(--r); overflow: hidden;
  background: var(--pv-bg); }
.preview i { position: absolute; display: block; left: 30%; right: 8px; height: 7px; background: var(--pv-line); border-radius: 3px; }
.preview i:nth-child(1) { left: 0; right: auto; top: 0; bottom: 0; width: 22%; height: auto; background: var(--pv-side);
  border-right: 1px solid var(--pv-line); border-radius: 0; }
.preview i:nth-child(2) { top: 9px; height: 9px; background: var(--pv-accent); right: 40%; }
.preview i:nth-child(3) { top: 27px; }
.preview i:nth-child(4) { top: 42px; }
.preview-light { --pv-bg: #f5f5f4; --pv-side: #ffffff; --pv-line: #e4e4e1; --pv-accent: #f5a020; }
.preview-dark { --pv-bg: #111113; --pv-side: #1b1c1f; --pv-line: #2c2d31; --pv-accent: #fb8a3c; }
.preview-system { --pv-side: transparent; --pv-line: #8b8e95; --pv-accent: #f99c16;
  --pv-bg: linear-gradient(135deg, #f5f5f4 50%, #111113 50%); }
.preview-classic { --pv-bg: #fefbf1; --pv-side: #e9e5d9; --pv-line: #b2ac8a; --pv-accent: #3f5fcc; border-radius: 0; }
.preview-classic i { border-radius: 0; }
.preview-classic i:nth-child(3), .preview-classic i:nth-child(4) { background: #fff; border: 1px solid #b2ac8a; height: 9px; }

/* Классическое оформление: мелкий шрифт, плотные таблицы с полной сеткой,
   объемные кнопки и закладки, подчеркнутые ссылки, синее выделение. */
[data-theme="classic"] body { font: 13px/1.4 Tahoma, Verdana, "Segoe UI", Arial, sans-serif; }
[data-theme="classic"] main :where(a:not(.button, .kpi, .dealcard)) { text-decoration: underline; }
[data-theme="classic"] h1 { font-size: 22px; font-weight: 400; color: #8a8463; }
[data-theme="classic"] h2 { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--band); padding: 3px 8px; margin: 18px 0 8px; }
[data-theme="classic"] .small { font-size: 12px; }
[data-theme="classic"] .card, [data-theme="classic"] .scroll, [data-theme="classic"] .filterpanel,
[data-theme="classic"] .board .column, [data-theme="classic"] .kpi, [data-theme="classic"] .dealcard,
[data-theme="classic"] fieldset, [data-theme="classic"] .themecard, [data-theme="classic"] .countrycard { border-radius: 0; border-color: var(--grid); }
[data-theme="classic"] .card { padding: 10px 12px; margin-bottom: 12px; }
[data-theme="classic"] .scroll { background: #fff; }
[data-theme="classic"] th, [data-theme="classic"] td { padding: 2px 6px; border: 1px solid #d6d1bb; }
[data-theme="classic"] th { font-size: 12px; font-weight: 400; color: var(--fg); background: linear-gradient(#fbf9ef, #ebe7d3);
  border-color: var(--grid); }
[data-theme="classic"] tr:last-child td { border-bottom: 1px solid #d6d1bb; }
[data-theme="classic"] tr.total td { border-top: 2px solid var(--grid); background: var(--band); }
[data-theme="classic"] tbody tr:hover > td, [data-theme="classic"] tr[data-row]:hover > td { background: #fbf6d9; }
[data-theme="classic"] tr[data-row].selected > td { background: var(--sel); color: #fff; }
[data-theme="classic"] tr[data-row].selected > td a, [data-theme="classic"] tr[data-row].selected > td .chip { color: #fff; }
[data-theme="classic"] tr[data-row].selected > td .chip { background: rgba(255, 255, 255, .2); }
[data-theme="classic"] input, [data-theme="classic"] select, [data-theme="classic"] textarea {
  background: #fff; border-color: #a8a387; border-radius: 0; padding: 3px 5px; }
[data-theme="classic"] input:focus, [data-theme="classic"] select:focus, [data-theme="classic"] textarea:focus {
  outline: 1px solid var(--sel); outline-offset: 0; border-color: var(--sel); }
[data-theme="classic"] label { font-size: 12px; }
[data-theme="classic"] button, [data-theme="classic"] .button { padding: 3px 12px; border-radius: 2px; border-color: #a8a387; color: var(--fg);
  background: linear-gradient(#fefdf8, #e6e2d0); }
[data-theme="classic"] button:hover, [data-theme="classic"] .button:hover { background: linear-gradient(#fffbe6, #f2e3a6); text-decoration: none; }
[data-theme="classic"] button.primary, [data-theme="classic"] .button.primary { font-weight: 700; color: var(--fg); border-color: #7a7458;
  background: linear-gradient(#fefdf8, #e6e2d0); }
[data-theme="classic"] button.danger { color: var(--err-fg); }
[data-theme="classic"] button.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; }
[data-theme="classic"] .actions { margin-top: 10px; gap: 6px; }
[data-theme="classic"] table input, [data-theme="classic"] table select { border-color: transparent; background: transparent; }
[data-theme="classic"] table input:hover, [data-theme="classic"] table select:hover { border-color: #c9c3a6; }
[data-theme="classic"] .notice, [data-theme="classic"] .error { border-radius: 0; padding: 6px 10px; border: 1px solid currentColor; }
[data-theme="classic"] .chip { border-radius: 2px; }
[data-theme="classic"] code { border-radius: 0; }
[data-theme="classic"] .avatar { border-radius: 2px; }
[data-theme="classic"] nav.subnav { background: var(--card); border-top-color: var(--grid); padding: 4px 24px; gap: 2px 14px; }
[data-theme="classic"] nav.subnav a { padding: 1px 0; border-radius: 0; color: var(--accent); text-decoration: underline; }
[data-theme="classic"] nav.subnav a.active { background: none; color: var(--fg); text-decoration: none; font-weight: 700; }
[data-theme="classic"] nav.tabs { gap: 2px; margin: 10px 0 14px; border-bottom-color: var(--grid); }
[data-theme="classic"] nav.tabs a { padding: 3px 12px; border: 1px solid #c0bb9f; border-bottom: 0; border-radius: 3px 3px 0 0;
  color: var(--fg); background: linear-gradient(#f8f6ea, #e3dfc8); text-decoration: none; }
[data-theme="classic"] nav.tabs a.active { background: var(--card); border-color: var(--grid); font-weight: 400; }
[data-theme="classic"] nav.tabs .group { padding: 3px 4px 3px 12px; border-left-color: var(--grid); }
[data-theme="classic"] .printmenu .menu { border-radius: 0; border-color: var(--grid); box-shadow: 2px 2px 4px rgba(0, 0, 0, .2); background: #fff; }
[data-theme="classic"] .printmenu .menu a, [data-theme="classic"] .printmenu .menu button { padding: 4px 14px; font-size: 13px;
  background: none; border: 0; text-decoration: none; font-weight: 400; }
[data-theme="classic"] .printmenu .menu a:hover, [data-theme="classic"] .printmenu .menu button:hover { background: var(--sel); color: #fff; }
[data-theme="classic"] .exportbar { font-size: 12px; }
[data-theme="classic"] .exportbar a { text-decoration: underline; }
/* Классическое оформление не берет черты основного: без скруглений, теней,
   жирных подписей и знака у названия. */
[data-theme="classic"] h1, [data-theme="classic"] h2 { letter-spacing: normal; }
[data-theme="classic"] button, [data-theme="classic"] .button { font-weight: 400; font-size: inherit; line-height: inherit; }
[data-theme="classic"] button:active, [data-theme="classic"] .button:active { transform: none; }
[data-theme="classic"] select { appearance: auto; -webkit-appearance: menulist; }
[data-theme="classic"] :where(.chip) { font-weight: 400; color: var(--fg); line-height: 1.5; }
[data-theme="classic"] .avatar { background: var(--tone); color: #fff; }
[data-theme="classic"] nav.subnav a { border-bottom: 0; margin-bottom: 0; font-size: inherit; font-weight: 400; }
[data-theme="classic"] nav.tabs a { margin-bottom: 0; font-weight: 400; }
[data-theme="classic"] nav.tabs a.active { margin-bottom: -1px; }
[data-theme="classic"] .printmenu .menu { padding: 4px 0; }

/* Классическое оформление верхней панели: бежевая полоса, разделы —
   кнопки со значками, выпадающие списки и меню — с синим выделением. */
[data-theme="classic"] .topbar { background: var(--band); border-bottom-color: var(--grid); box-shadow: none; min-height: 54px; }
[data-theme="classic"] .topbar a.brand { font-weight: 700; font-size: 15px; letter-spacing: normal; }
[data-theme="classic"] .topbar a.brand::before, [data-theme="classic"] .bare .brand-line::before { display: none; }
[data-theme="classic"] nav.areas .area > a { font-size: 12px; font-weight: 400; color: var(--fg); border-bottom: 0; margin: 4px 1px; padding: 3px 7px;
  border: 1px solid transparent; border-radius: 2px; }
[data-theme="classic"] nav.areas .area > a:hover, [data-theme="classic"] nav.areas .area:hover > a { background: linear-gradient(#fffbe6, #f2e3a6); border-color: #c9c3a6; }
[data-theme="classic"] nav.areas .area > a.active { background: linear-gradient(#fbf9ef, #ebe7d3); border-color: var(--grid); font-weight: 700; }
[data-theme="classic"] nav.areas .dropdown, [data-theme="classic"] .topmenu .menu { border-radius: 0; border-color: var(--grid); box-shadow: 2px 2px 4px rgba(0, 0, 0, .2);
  background: #fff; padding: 4px 0; }
[data-theme="classic"] nav.areas .dropdown a, [data-theme="classic"] .topmenu .menu > a, [data-theme="classic"] .topmenu .menu button.linklike { border-radius: 0;
  padding: 4px 14px; font-size: 13px; text-decoration: none; }
[data-theme="classic"] nav.areas .dropdown a:hover, [data-theme="classic"] .topmenu .menu > a:hover,
[data-theme="classic"] .topmenu .menu > a.active, [data-theme="classic"] .topmenu .menu button.linklike:hover { background: var(--sel); color: #fff; }
[data-theme="classic"] .topmenu .menu > a:hover .meta, [data-theme="classic"] .topmenu .menu > a.active .meta { color: #fff; }
[data-theme="classic"] .topmenu > summary { border-radius: 2px; }
[data-theme="classic"] .topmenu > summary:hover, [data-theme="classic"] .topmenu[open] > summary { background: #f5f1de; }
[data-theme="classic"] .topmenu .menu-group, [data-theme="classic"] .filterpanel h3 { font-size: 12px; text-transform: none; letter-spacing: normal; color: var(--muted); }
[data-theme="classic"] nav.subnav { background: var(--card); border-bottom-color: var(--grid); padding: 4px 24px; gap: 2px 14px; }
[data-theme="classic"] nav.subnav a { padding: 1px 0; border-radius: 0; color: var(--accent); text-decoration: underline; border-bottom: 0; margin-bottom: 0;
  font-size: inherit; font-weight: 400; }
[data-theme="classic"] nav.subnav a.active { background: none; color: var(--fg); text-decoration: none; font-weight: 700; }
[data-theme="classic"] main.page { padding: 10px 16px 40px; }
[data-theme="classic"] .pagetitle h1 { font-size: 20px; }
[data-theme="classic"] .pagebar { margin-bottom: 10px; }
[data-theme="classic"] .pagebar .actions { margin: 0; }
[data-theme="classic"] .pagebar .cardtabs .button.on, [data-theme="classic"] .pagebar .filterbtn.on { background: linear-gradient(#fffbe6, #f2e3a6); color: var(--fg); }
[data-theme="classic"] .filterpanel { padding: 8px 12px; box-shadow: none; background: var(--band); }
[data-theme="classic"] form.card:has(> .grid) > .actions:last-child:has(button.primary) { margin: -10px -12px 12px; padding: 6px 12px; border-radius: 0;
  background: var(--band); border-bottom-color: var(--grid); top: 55px; }
[data-theme="classic"] .bare { background: var(--bg); }
[data-theme="classic"] .bare main.card { padding: 16px; }
/* Печать — всегда светлая, в каком бы оформлении ни работал пользователь. */
@media print {
  :root:not([data-theme]), :root[data-theme] {
    --bg: #ffffff; --card: #ffffff; --fg: #000000; --muted: #555555; --line: #cccccc; --grid: #999999; --band: #eeeeee;
    --accent: #000000; --chip: #eeeeee; --ok-bg: #ffffff; --ok-fg: #000000; --err-bg: #ffffff; --err-fg: #000000;
    --raised: #ffffff; --hover: #ffffff; --strong: #000000; --subtle: #555555; --line-strong: #999999; --accent-text: #000000;
    --shadow-sm: none; --shadow: none; --shadow-pop: none;
    color-scheme: light;
  }
  [data-theme] th { background: none; }
}

/* Штрихкоды в карточке номенклатуры. */
.barcodes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.barcodes figure { margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.barcodes svg { display: block; width: 200px; height: 70px; }

/* Поле сканера в документе: первая кнопка формы — «Добавить по штрихкоду»,
   чтобы Enter сканера не проводил документ; на экране ее не видно. */
.defaultsubmit { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.scanbar { display: flex; gap: 8px; align-items: end; max-width: 640px; margin-bottom: 4px; }
.scanbar label { flex: 1; }
/* Розница: рабочее место кассира (pos.js), документы розницы. */
.grid-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.posbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.posbar h2 { margin: 0; }
.postitle { display: flex; flex-direction: column; }
.posbar .grow { flex: 1; }
.posmsg { padding: 11px 14px; border-radius: var(--r-lg); margin-bottom: 14px; background: var(--ok-bg); color: var(--ok-fg); white-space: pre-wrap; }
.posmsg.error { background: var(--err-bg); color: var(--err-fg); }
.posmsg.big { font-size: 20px; font-weight: 600; }
.posgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@container (max-width: 860px) { .posgrid { grid-template-columns: minmax(0, 1fr); } }
.poscart, .pospay { margin-bottom: 0; }
.posscan input { font-size: 17px; padding: 10px 12px; }
.posfound { list-style: none; margin: 6px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-pop); max-height: 320px; overflow-y: auto; }
.posfound li button { display: flex; width: 100%; gap: 12px; justify-content: space-between; border: 0; border-radius: var(--r-sm); background: none; text-align: left; padding: 8px 10px; font-weight: 400; box-shadow: none; }
.posfound li button:hover, .posfound li button:focus { background: var(--hover); }
.posfound .muted { white-space: nowrap; }
.postable { margin-top: 10px; }
.postable td { vertical-align: middle; }
.postable input { width: 7rem; padding: 5px 7px; }
.postable input.posqty { width: 5.5rem; }
.postable input.posdisc { width: 4.5rem; }
.postable button.posdel { padding: 2px 9px; color: var(--err-fg); }
.postable tr.noprice input.posprice { border-color: var(--err-fg); }
.postotal { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.postotal b { font-size: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--strong); font-variant-numeric: tabular-nums; }
.pospay label { margin-bottom: 10px; }
.pospay input { font-size: 17px; }
.poschange { margin: 2px 0 14px; font-size: 17px; }
.poschange b { font-variant-numeric: tabular-nums; }
.posbuttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button.posbig { width: 100%; padding: 14px 10px; font-size: 17px; font-weight: 600; }
.posmixed { margin-top: 12px; }
.posmixed summary { cursor: pointer; color: var(--accent-text); font-size: 14px; margin-bottom: 8px; }
.posrefund { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin: 0 0 12px; }
.posrefund legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.posrefund .check { margin: 4px 0; }
.posreceipts { margin-top: 8px; }
.posfind summary { cursor: pointer; }
.pos.busy button { opacity: .6; pointer-events: none; }
.chip.new { background: var(--err-bg); color: var(--err-fg); }
.chip.failed { background: var(--chip); color: var(--muted); }
.chip.draft { background: var(--chip); }
/* Узкий экран (телефон): строка чека — название сверху, поля под ним. */
@container (max-width: 640px) {
  #pos-cart thead { display: none; }
  #pos-cart tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  #pos-cart td { padding: 0; border: 0; }
  #pos-cart td:first-child { grid-column: 1 / -1; }
  #pos-cart td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-align: left; }
  #pos-cart td.num { text-align: left; }
  #pos-cart input { width: 100%; }
  #pos-cart td:last-child { align-self: end; }
  #pos-cart td.possum { grid-column: 1 / 4; font-weight: 600; }
}

/* Терминал склада (/orgs/{org}/m): страницы для телефона и терминала сбора
   данных — крупные кнопки и поля, без меню и боковой панели. */
.m-shell { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.m-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 12px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.m-back { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -6px; border-radius: var(--r); color: var(--accent-text); }
.m-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.m-title b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-title span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-home { padding: 8px 10px; font-weight: 600; }
#m-main { flex: 1; padding: 14px 16px 24px; }
#m-main h2 { margin: 20px 0 8px; }
.m-foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 12px 16px; font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--line); }
.m-foot form { margin-left: auto; }
.m-whpick select { font-size: 17px; padding: 10px; }
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.m-tile { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 16px 14px; border-radius: calc(var(--r-lg) + 2px); background: var(--card);
  border: 1px solid var(--line); color: var(--fg); box-shadow: var(--shadow-sm); }
.m-tile:hover { text-decoration: none; border-color: var(--accent); }
.m-tile b { font-size: 18px; color: var(--accent-text); }
.m-tile span { font-size: 13px; color: var(--muted); }
.m-wide { display: block; text-align: center; padding: 14px; font-size: 17px; margin-bottom: 8px; }
.m-scan { margin-bottom: 14px; }
.m-scanrow { display: flex; gap: 8px; align-items: stretch; }
.m-scanrow input { flex: 1; min-width: 0; margin: 0; font-size: 18px; padding: 12px; }
.m-scanrow button { min-width: 52px; min-height: 52px; font-size: 16px; }
.m-cambtn { display: grid; place-items: center; padding: 0; color: var(--accent-text); }
.m-cambtn[hidden] { display: none; }
.m-cambtn.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.m-full { margin-bottom: 10px; }
.m-qty, .m-more, .m-left { margin-top: 10px; }
.m-qty summary, .m-more summary, .m-left summary, .m-fix summary { color: var(--accent-text); cursor: pointer; font-size: 14px; padding: 4px 0; }
.m-qty input { font-size: 17px; max-width: 12rem; }
.m-left ul { margin: 6px 0 0; padding-left: 20px; }
.m-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.m-cards a { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); color: var(--fg); box-shadow: var(--shadow-sm); }
.m-cards a:hover { text-decoration: none; border-color: var(--accent); }
.m-cards a b { color: var(--accent-text); }
.m-overdue { color: var(--err-fg); }
.m-lines { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.m-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.m-lines li:last-child { border-bottom: 0; }
.m-lines li.last { background: var(--ok-bg); }
.m-lines li.done .m-name, .m-lines li.done .m-q { color: var(--muted); }
.m-lines li.done .m-q b::before { content: "✓ "; color: var(--ok-fg); }
.m-name { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.m-q { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-q b { font-size: 18px; }
.m-fix { grid-column: 1 / -1; }
.m-fixform { display: flex; gap: 8px; margin-top: 4px; }
.m-fixform input { margin: 0; max-width: 9rem; font-size: 17px; }
.m-choices form { margin-top: 8px; }
.m-choice { width: 100%; text-align: left; padding: 12px; }
.m-head { margin: 0 0 4px; }
.m-figures { display: flex; gap: 20px; flex-wrap: wrap; }
.m-figures div { display: flex; flex-direction: column; }
.m-figures b { font-size: 22px; }
.m-prefilled { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.m-cam { position: sticky; top: 56px; z-index: 4; background: #000; }
.m-cam[hidden] { display: none; }
.m-cam video { display: block; width: 100%; height: 34vh; object-fit: cover; }
.m-cam-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 12px; color: #fff; font-size: 13px; }
.m-cam-bar button { padding: 6px 12px; }

/* Код из письма: цифры крупно и вразрядку */
input.code { font-size: 20px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

/* Тариф и оплата: баннер о подписке, состояние, карточки тарифов */
.banner { padding: 11px 14px; border-radius: var(--r); margin-bottom: 16px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.error { background: var(--err-bg); color: var(--err-fg); }
.banner a { color: inherit; font-weight: 600; }
.substate-title { margin: 0 0 12px; font-size: 15px; }
.substate-kpis { margin-bottom: 8px; }
.kpi .value.small { font-size: 14px; font-weight: 600; }
.chip.ok, .chip.paid { background: var(--ok-bg); color: var(--ok-fg); }
.chip.warn, .chip.issued { background: var(--warn-bg); color: var(--warn); }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* Карточка тарифа выбирается кликом: прозрачная радиокнопка накрывает всю карточку. */
.plan.pickable { position: relative; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plan.pickable:hover { border-color: var(--accent); }
.plan-pick { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.plan.pickable:has(.plan-pick:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.plan.pickable:has(.plan-pick:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-mark { display: none; position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); }
.plan-pick:checked + .plan-mark { display: inline-block; }
.plan h3 { margin: 0 0 6px; font-size: 17px; }
.plan .price { margin: 0 0 8px; font-size: 15px; }
.plan .price b { font-size: 20px; color: var(--strong); }
.plan ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
/* «За год / Помесячно» на странице тарифов: радиокнопки скрыты, подписи —
   вкладки; видна цена выбранного срока (как на сайте, static/site.css). */
.terms { position: relative; }
.term-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.term-switch { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.term-switch label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none; }
.term-save { font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
#term-year:checked ~ .term-switch label[for="term-year"], #term-month:checked ~ .term-switch label[for="term-month"] { background: var(--accent); color: var(--accent-fg); }
#term-year:checked ~ .term-switch label[for="term-year"] .term-save { background: rgba(255, 255, 255, .22); color: inherit; }
.term-radio:focus-visible ~ .term-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
#term-year:checked ~ .plans .price-month, #term-month:checked ~ .plans .price-year { display: none; }
.plan .plan-save { margin: 0 0 8px; font-size: 12.5px; color: var(--accent-text); }
.plan .price-month .plan-save { color: var(--muted); }
table.props th { text-align: left; color: var(--muted); font-weight: 500; width: 9rem; }
[data-theme="classic"] .plan, [data-theme="classic"] .banner { border-radius: 0; }

/* Связь: переписка WhatsApp, звонки, кнопки у номеров (comms.go). */
.phoneacts { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
.inlineform { display: inline; margin: 0; }
/* Вспомогательные классы вместо инлайн-стилей (их запрещает CSP). */
input.upper { text-transform: uppercase; }
input.short { width: 7em; max-width: 8rem; }
th.left { text-align: left; }
td[data-level] { padding-left: 8px; }
td[data-level="1"] { padding-left: 26px; } td[data-level="2"] { padding-left: 44px; } td[data-level="3"] { padding-left: 62px; }
td[data-level="4"] { padding-left: 80px; } td[data-level="5"] { padding-left: 98px; } td[data-level="6"] { padding-left: 116px; }
.iconbtn { padding: 1px 6px; font-size: 13px; line-height: 1.4; border-radius: var(--r-sm); box-shadow: none; background: transparent; border-color: transparent; }
.iconbtn:hover { background: var(--hover); border-color: var(--line); }
.nowrap { white-space: nowrap; }
.chatgrid { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .chatgrid { grid-template-columns: 1fr; } }
.chatlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.chatrow { display: block; padding: 8px 10px; margin: 0 -4px; border-radius: var(--r); color: var(--fg); }
.chatrow:hover { background: var(--hover); text-decoration: none; }
.chatrow.active { background: var(--accent-soft); }
.chatrow-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.chatrow-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat h2 { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.messages { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); min-height: 200px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 72%; padding: 8px 12px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.msg .body { white-space: pre-wrap; }
.msg.in { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--accent-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.msg .attach { font-weight: 600; }
.msg .meta { margin-top: 2px; }
.sendform { display: flex; gap: 10px; margin-top: 12px; }
.sendform input { margin: 0; }
.sendmenu .menu { min-width: 300px; padding: 12px 14px; }
.sendmenu .stack label { margin-top: 8px; }
.sendmenu .stack button { margin-top: 10px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 14px; }
legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
/* Карточка входящего звонка (app.js по data-live). */
.calltoast { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: min(360px, calc(100vw - 40px)); background: var(--card); color: var(--fg);
  border: 1px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 14px 16px; animation: calltoast .25s ease; }
@keyframes calltoast { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.calltoast .ct-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.calltoast .ct-phone { font-size: 20px; font-weight: 700; color: var(--strong); margin: 4px 0 2px; }
.calltoast .ct-name { margin-bottom: 8px; }
.calltoast .ct-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.calltoast .ct-close { background: none; border: none; box-shadow: none; padding: 0 4px; font-size: 18px; color: var(--muted); }

/* Расчеты по договорам — строки под контрагентом (settlements.html). */
tr.sub td { font-size: 13px; color: var(--muted); }
tr.sub td.indent { padding-left: 28px; }
tr.sub td a { color: inherit; }
/* Документы долга в отчете «Долги по срокам». */
td details summary { cursor: pointer; color: var(--muted); }
td details table { margin-top: 4px; }
tr.items td { padding-top: 0; border-top: 0; }
tr.items details table { width: auto; }
td.num.bad { color: var(--err-fg); }
/* План счетов и ведомости: уровень вложенности субсчета, строка счета-группы. */
td.lvl1 { padding-left: 28px; }
td.lvl2 { padding-left: 46px; }
td.lvl3 { padding-left: 64px; }
td.lvl4 { padding-left: 82px; }
tr.grp td { font-weight: 600; color: var(--strong); }
/* Итог документа — справа под таблицей позиций, как в МойСклад. */
form.card > p.big { text-align: right; margin: 14px 0 4px; }

/* Страница «Помощь»: оглавление слева, разделы-карточки справа. */
.mb0 { margin-bottom: 0; }
.help { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.help-toc a { padding: 6px 8px; border-radius: var(--r-sm); color: var(--fg); text-decoration: none; }
.help-toc a:hover { background: var(--hover); color: var(--accent-text); }
.help-head { color: var(--subtle); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 8px 6px; margin: 0; }
.help-body section { scroll-margin-top: 16px; max-width: 860px; }
.help-body h2 { font-size: 17px; }
.help-steps { padding-left: 22px; }
.help-steps li { margin-bottom: 10px; }
.help-faq dt { font-weight: 600; color: var(--strong); margin-top: 12px; }
.help-faq dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 720px) { .help { grid-template-columns: 1fr; } .help-toc { position: static; } }
.hint { margin: -4px 0 14px; }

/* Распознавание документов (recognize.go): файл слева, форма проверки справа. */
.recognize { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); gap: 18px; align-items: start; }
.recognize-file { position: sticky; top: 72px; }
.recognize-file img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.recognize-file object { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: var(--r-lg); }
.recognize-form table.lines input { min-width: 4rem; }
.recognize-form table.lines td:first-child input { min-width: 14rem; }
.recognize-form table.lines select { max-width: 16rem; }
@media (max-width: 900px) { .recognize { grid-template-columns: 1fr; } .recognize-file { position: static; } .recognize-file object { height: 50vh; } }

/* Доска сделок как в Битрикс24: каждая стадия целиком подсвечена своим цветом (--stage),
   суммы по стадиям, карточки с клиентом, ответственным и делами. */
.board.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; scrollbar-width: thin; }
.board.kanban .column { flex: 0 0 264px; min-height: 180px; --stage: var(--muted); padding: 0 8px 8px; transition: outline-color .15s ease;
  background: color-mix(in srgb, var(--stage) 16%, var(--raised)); border-color: color-mix(in srgb, var(--stage) 45%, var(--line)); border-top: 4px solid var(--stage); }
.board.kanban .column.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.stagehead { display: flex; flex-direction: column; gap: 0; padding: 9px 4px 8px; margin: 0 0 8px; color: color-mix(in srgb, var(--stage) 65%, var(--strong)); }
.stagehead b { font-size: 13px; line-height: 1.3; }
.stagehead span { font-size: 12px; opacity: .92; font-variant-numeric: tabular-nums; }
.column > .dealcard[draggable="true"] { cursor: grab; }
.dealcard.dragging { opacity: .45; }
.dealcard.closed { opacity: .85; }
.dc-head { display: flex; gap: 6px; align-items: baseline; justify-content: space-between; }
.dc-title { font-weight: 600; color: var(--strong); }
.dc-amount { font-weight: 700; color: var(--strong); font-variant-numeric: tabular-nums; display: flex; gap: 6px; align-items: center; }
.dc-client { font-size: 13px; }
.dc-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-height: 24px; }
.dc-foot .avatar { width: 24px; height: 24px; font-size: 11px; }
.dc-acts { display: flex; gap: 2px; align-items: center; }
.dc-acts .iconbtn { font-size: 14px; padding: 1px 4px; }
.dc-tasks { margin-left: auto; font-size: 12px; white-space: nowrap; }
.dc-last { font-size: 12px; }
.quick > summary { font-size: 12.5px; font-weight: 600; color: var(--accent-text); cursor: pointer; list-style: none; margin: 0 4px 8px; }
.quick > summary::-webkit-details-marker { display: none; }
.quick form.card { padding: 10px; margin-bottom: 8px; }
.quick form.card label { margin-bottom: 6px; }
.quick form.card .actions { margin-top: 8px; }
.chip.stage { --stage: var(--muted); background: color-mix(in srgb, var(--stage) 18%, var(--card)); color: color-mix(in srgb, var(--stage) 70%, var(--strong)); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--card); }
.seg a { padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg a:hover { background: var(--hover); text-decoration: none; }
.seg a.on { background: var(--accent-soft); color: var(--accent-text); }
.seg a + a { border-left: 1px solid var(--line-strong); }
.dealtabs { margin-top: 0; }
.dealtabs .counter { font-weight: 500; font-size: 13px; }
.dealtabs .counter.warn { color: var(--err-fg); }
.inlineform { display: inline; }
td.nowrap { white-space: nowrap; }
input[type="color"] { width: 46px; height: 34px; padding: 2px 4px; margin-top: 0; vertical-align: middle; cursor: pointer; }
input.stagename { --stage: var(--muted); border-left: 6px solid var(--stage); margin-top: 0; }
@media (max-width: 720px) {
  .board.kanban .column { flex-basis: 84vw; }
}
[data-theme="classic"] .board.kanban .column { background: color-mix(in srgb, var(--stage) 22%, var(--card)); border-radius: 0; }
[data-theme="classic"] .stagehead { color: var(--fg); }
[data-theme="classic"] .seg a.on { background: var(--sel); color: #fff; }

/* Диск: файлы и фото на карточках (filesbox) и раздел «Файлы». */
.filegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.filegrid.gallery { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.file { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.file.main { border-color: var(--accent); }
.file .preview { display: flex; align-items: center; justify-content: center; height: 120px; border-radius: var(--r); background: var(--chip); overflow: hidden; }
.filegrid.gallery .file .preview { height: 150px; }
.file .preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file .ext, .filecell .ext { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; padding: 0 8px; border-radius: var(--r); background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.file .preview .ext { height: 44px; font-size: 14px; }
.file figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.file figcaption > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.fileupload { padding: 14px 18px; }
.filecell { width: 56px; }
.filethumb { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
