/* Портал «Финансы СТ ГРУПП» — стиль по согласованному макету (29.09.2026).
   Шрифты: Montserrat — текст и цифры, Oswald — заголовки (обе — свободная лицензия OFL, лежат рядом). */
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-VariableFont_wght.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('../fonts/oswald-cyrillic-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; src: url('../fonts/oswald-latin-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --page: #f2f2f0;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #55534f;
  --muted: #6b6964;          /* серый текст: контраст с фоном не ниже 4,5 : 1 (проверка 02.10, раздел B) */
  --hair: #e3e2dd;
  --axis: #c9c8c2;
  --olive: #5e8c48;          /* пришло, прибыль — фирменный «скорость», ярче для графиков */
  --olive-text: #3f6b2e;
  --burgundy: #a3203a;       /* ушло, просрочено, убыток — фирменный «качество», светлее для графиков */
  --sand: #c28a45;           /* долг в срок — фирменный «надёжность», насыщеннее */
  --grey: #bec0c2;           /* фон-контекст — фирменный «движение» */
  --brand-sand: #ddb182;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* место под полосу прокрутки — всегда: на короткой странице (без прокрутки) колонка по центру не сдвигается
   на полширины полосы — шапка не «прыгает» между страницами (05.10.2026) */
html { scrollbar-gutter: stable; }
body { background: var(--page); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; }
.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
a { color: inherit; }
.muted { color: var(--muted); }

/* шапка */
.top { background: var(--ink); color: #fff; }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px 0; }
.top-inner.solo { padding-bottom: 12px; }
.top-row { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.logo { height: 34px; width: auto; display: block; }
.logo .ink { fill: #ffffff; }
.logo .paper { fill: var(--ink); }
.product { font-weight: 600; font-size: 15px; letter-spacing: .02em; padding-left: 20px; border-left: 1px solid #3a3a3a; }
.product small { display: block; font-weight: 400; color: #a9a8a3; font-size: 12px; }
.top-spacer { flex: 1; }
.user { font-size: 13px; color: #cfcfca; }
.user b { color: #fff; font-weight: 600; }
.small-link { color: #a9a8a3; font-size: 12px; margin-left: 8px; }
.small-link:hover { color: #fff; }
.top form { margin: 0; }
.btn-top { display: inline-block; padding: 7px 14px; border: 1px solid #555; border-radius: 6px; text-decoration: none;
           font: 500 13px var(--font); color: #fff; background: none; cursor: pointer; }
.btn-top:hover { background: #222; }
nav.tabs { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
nav.tabs a, nav.tabs > span { color: #cfcfca; font: 600 14px var(--font); padding: 10px 14px 12px; text-decoration: none;
                            border-bottom: 3px solid transparent; white-space: nowrap; }
nav.tabs a:hover { color: #fff; }
nav.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand-sand); }
nav.tabs > span { color: #6d6c68; }
.badge { font-size: 10px; font-weight: 600; background: #2a2a2a; color: #9d9c97; border-radius: 4px; padding: 2px 5px;
         margin-left: 4px; vertical-align: 2px; }
.badge.bad { background: var(--burgundy); color: #fff; }
.badge.warn { background: var(--sand); color: #111; }   /* тёмный на песочном — контраст ≈ 6:1 (B) */

main { max-width: 1320px; margin: 0 auto; padding: 20px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 4px 0 18px; }
.page-head h1 { font-size: 42px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* строка фильтров — одна над всем, что она задаёт */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--hair); border-radius: 8px; padding: 3px; }
.seg a, .seg button { border: 0; background: none; font: 500 13px var(--font); padding: 6px 12px; border-radius: 6px;
                      cursor: pointer; color: var(--ink-2); text-decoration: none; }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.asof { font-size: 12px; color: var(--muted); }
details.period-form:not([open]) { display: none; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .grid.two { grid-template-columns: minmax(0, 1fr); } }
.gap-top { margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.card h2 { font-size: 22px; margin: 0 0 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.tile { display: flex; flex-direction: column; gap: 4px; }
.tile .label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.tile .value { font-size: 30px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.tile .value small { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-left: 3px; }
.tile .extra { font-size: 12.5px; color: var(--ink-2); }
.tile .extra + .extra { margin-top: 4px; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
.tile.hero .value { font-size: 36px; }
.good { color: var(--olive-text); font-weight: 600; }
.bad { color: var(--burgundy); font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--hair); vertical-align: middle; }
th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.subtotal td { font-weight: 700; border-bottom-color: var(--axis); }
tr.total td { font-weight: 800; font-size: 15.5px; border-bottom: 2px solid var(--ink); }
tr.indent td { font-size: 12.5px; color: var(--ink-2); padding-top: 4px; padding-bottom: 4px; }
tr.indent td:first-child { padding-left: 22px; }
tr.warn td { background: #fbf4ec; }
td.neg { color: var(--burgundy); }
td .pct { color: var(--muted); font-weight: 500; font-size: 12px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #f0efec; color: var(--ink-2); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-box { position: relative; height: 280px; }
details.tableview { margin-top: 10px; font-size: 13px; }
details.tableview summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
details.tableview[open] summary { margin-bottom: 8px; }

.bar-cell { width: 150px; }
.mini { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: #f0efec; gap: 2px; }
.mini b { display: block; height: 100%; }
.callout { border-left: 4px solid var(--sand); background: #fbf6ef; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 14px; font-size: 13px; }

.ctl { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.ctl:last-child { border-bottom: 0; }
.ctl .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ctl .ico.ok { background: #e8f0e4; color: var(--olive-text); }
.ctl .ico.bad { background: #f6e3e7; color: var(--burgundy); }
.ctl .ico.info { background: #f0efec; color: var(--ink-2); }
.ctl .t { font-weight: 600; }
.ctl .h { color: var(--ink-2); font-size: 12.5px; grid-column: 2 / 4; }
.ctl .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.search { width: 100%; max-width: 360px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 8px; font: 14px var(--font); }
.btn { display: inline-block; border: 1px solid var(--hair); background: var(--card); border-radius: 8px; padding: 8px 14px;
       font: 500 13px var(--font); cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--ink-2); }

/* вход */
.login { max-width: 380px; margin: 48px auto; }
.login h1 { font-size: 34px; margin: 0 0 16px; }
.login label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 12px 0 4px; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--axis); border-radius: 8px; font: 15px var(--font); }
.login .btn { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
/* вход с кодом (apps/access, макет data/макеты/вход-с-кодом-макет.html) */
.login .code-input { letter-spacing: 6px; font-size: 22px; text-align: center; }
.login .remember { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); margin: 14px 0 0; }
.login .remember input { width: auto; }
.login .otp-text { font-size: 14px; margin: 0 0 8px; }
.login .otp-note { font-size: 12.5px; margin: 12px 0 0; }
.login .otp-link { font-size: 13px; margin: 12px 0 0; }
.login .otp-center { font-size: 12.5px; margin: 0 0 4px; text-align: center; }
.login .otp-steps { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.login .otp-steps li { margin: 6px 0; }
.login .otp-h2 { font-size: 20px; margin: 22px 0 4px; }
.login .otp-h1-small { font-size: 24px; }
.login svg.qr { display: block; width: 184px; height: 184px; margin: 8px auto; border: 1px solid var(--axis);
                border-radius: 8px; background: #fff; }
.login .otp-key { font: 14px ui-monospace, Menlo, monospace; background: #f4f4f2; border-radius: 6px; padding: 6px 8px;
                  text-align: center; letter-spacing: 1px; color: #1f1f1f; }
.login .otp-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font: 15px ui-monospace, Menlo, monospace;
                    background: #f4f4f2; color: #1f1f1f; border-radius: 8px; padding: 12px 14px; margin: 8px 0; }
.login .otp-box { border: 1px solid var(--axis); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.login .otp-box p { margin: 4px 0; }
.login .otp-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.login .otp-buttons .btn { width: auto; margin: 0; padding: 7px 12px; font-size: 13px; }
.login a.btn { display: block; text-align: center; box-sizing: border-box; }
.errors { color: var(--burgundy); font-size: 13px; margin: 0 0 8px; }

@media (max-width: 640px) {
  .top-inner, main { padding-left: 16px; padding-right: 16px; }
  .product { border-left: 0; padding-left: 0; }
  .page-head h1 { font-size: 32px; }
  .tile .value { font-size: 26px; }
  .user .who { display: none; }                  /* «сменить пароль» остаётся видно */
  .small-link { margin-left: 0; }
}
/* на узком экране меню переносится на новые строки, а не уезжает за край */
@media (max-width: 1100px) {
  nav.tabs { flex-wrap: wrap; overflow: visible; gap: 0 2px; }
  nav.tabs a, nav.tabs > span { padding: 8px 10px 9px; font-size: 13.5px; }
}

/* ФОТ: компактная таблица, имя в одну строку, должность под ним */
table.payroll { font-size: 12.5px; }
table.payroll th, table.payroll td { padding: 6px 6px; }
table.payroll td:first-child { white-space: nowrap; }
table.payroll tr.total td { font-size: 12.5px; }
table.payroll th { letter-spacing: 0; }

/* сообщения после действий (загрузка выписки и т.п.) */
ul.messages { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
ul.messages li { padding: 10px 14px; border-radius: 8px; font-size: 13.5px; border-left: 4px solid var(--axis); background: var(--card); }
ul.messages li.success { border-left-color: var(--olive); background: #eef4ea; }
ul.messages li.warning { border-left-color: var(--sand); background: #fbf4ec; }
ul.messages li.error { border-left-color: var(--burgundy); background: #fbf1f3; }
/* сверка: сообщение «Записано…» над строкой, к которой вернулась страница; на телефоне строка — карточкой,
   кнопка — под ней (вторая проверка 03.10, B) */
#done { scroll-margin-top: 70px; }
/* хвосты сверки: «Связать с записями учёта», «Не требует записи» — под основной кнопкой (C4, 04.10.2026) */
details.more-actions { margin-top: 6px; font-size: 12.5px; }
details.more-actions summary { cursor: pointer; color: var(--muted); }
details.more-actions .btn, details.more-actions input { display: block; margin-top: 6px; }
details.more-actions input { min-width: 200px; }
tr.msg-row td { padding: 6px 0; border-bottom: 0; }
tr.msg-row ul.messages { margin: 0; }
@media (max-width: 760px) {
  table.recon, table.recon tbody, table.recon tr, table.recon td { display: block; width: 100%; }
  table.recon tr:first-child { display: none; }
  table.recon tr { border-bottom: 1px solid var(--axis); padding: 8px 0; }
  table.recon td { border: 0; padding: 2px 0; max-width: none !important; text-align: left; white-space: normal !important; }
  table.recon td.num { font-weight: 600; }
  table.recon form .btn { width: 100%; margin-top: 6px; }
}

/* сопоставление клиентов из таблицы брокеров */
.match select, .match input[type="text"] { font: 13px var(--font); padding: 6px 8px; border: 1px solid var(--axis); border-radius: 6px; max-width: 100%; }
.match select { width: 280px; }
.match .hint { border: 0; background: none; color: var(--olive-text); font: 500 12.5px var(--font); cursor: pointer; text-decoration: underline; padding: 4px; }
.match .new-client { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; font-size: 13px; }
.match .new-client[hidden] { display: none; }
.match .new-client input[type="text"] { width: 280px; }

/* страница «ДТ» */
.upload-box { text-align: right; }
.filters + .callout { margin-top: 16px; }
.upload-box .filters { justify-content: flex-end; }
.upload-box .asof { margin-top: 6px; }
a.tile { text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--axis); }
.seg a small { color: var(--muted); margin-left: 4px; }
.seg a[aria-current="true"] small { color: #cfcfca; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
table.dtt td { vertical-align: top; font-size: 13px; }
table.dtt td.small { font-size: 12.5px; }
td.dts { white-space: nowrap; }
.dt { display: flex; align-items: center; gap: 4px; }
.dt code { font: 500 12.5px/1.6 ui-monospace, 'SF Mono', Menlo, monospace; user-select: all; }
a.dt-open { color: inherit; text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; }
a.dt-open:hover { color: var(--burgundy); text-decoration-color: currentColor; }
.dt { scroll-margin-top: 90px; }
.dt:target { background: #fbf4ec; border-radius: 4px; }
.dt .inv { font-size: 12px; color: var(--olive-text); margin-left: 6px; }
.svc { font-size: 11.5px; color: var(--ink-2); padding-left: 2px; }
button.copy { border: 1px solid var(--hair); background: var(--card); border-radius: 5px; cursor: pointer; font-size: 14px;
              min-width: 28px; min-height: 26px; padding: 0 6px; color: var(--ink-2); }
button.copy:hover { border-color: var(--ink); color: var(--ink); }
.note-muted { color: var(--muted); font-size: 12px; white-space: normal; }
.billnote { background: #fbf6ef; border-left: 3px solid var(--sand); padding: 1px 6px; margin-bottom: 3px; white-space: pre-line; }
details.note-edit summary { color: var(--olive-text); cursor: pointer; font-size: 12px; }
details.note-edit form { display: grid; gap: 6px; margin-top: 6px; min-width: 220px; }
details.note-edit textarea { font: 13px var(--font); padding: 6px 8px; border: 1px solid var(--axis); border-radius: 6px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
         padding: 8px 16px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
@media (max-width: 640px) { .upload-box { text-align: left; } .upload-box .filters { justify-content: flex-start; } }

/* справка */
a.help-top { white-space: nowrap; }
.help { display: grid; gap: 16px; }
.help h2 { font-size: 24px; margin: 0 0 10px; }
.help h3 { font: 600 14px var(--font); margin: 16px 0 6px; }
.help p, .help li, .help dd { line-height: 1.6; }
.help ul, .help ol { margin: 6px 0; padding-left: 20px; }
.help-toc ol { columns: 2; column-gap: 32px; }
.help dl.buttons dt, .help dl.steps-list dt { font-weight: 700; margin-top: 10px; }
.help dl.buttons dd, .help dl.steps-list dd { margin: 2px 0 0 0; }
.help section { scroll-margin-top: 12px; }
.help section:target { border-color: var(--brand-sand); box-shadow: 0 0 0 2px var(--brand-sand); }
@media (max-width: 640px) { .help-toc ol { columns: 1; } }
@media print {
  .top, .page-head .btn { display: none; }
  body { background: #fff; }
  .help .card { border: 0; padding: 0; break-inside: avoid-page; }
}

/* платёжный календарь */
table.cal th small { display: block; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
table.cal td { font-size: 13px; white-space: nowrap; }
table.cal td:first-child { white-space: normal; min-width: 220px; }
table.cal td a { color: inherit; }
table.cal tr.sec td { font: 600 11.5px var(--font); letter-spacing: .06em; color: var(--muted); padding-top: 14px; }
table.cal tr.bal td { font-weight: 600; background: #f7f7f4; }
/* первая колонка (что за строка) остаётся на месте, когда недели прокручиваются вбок — на телефоне (B) */
table.cal td:first-child, table.cal th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
table.cal tr.bal td:first-child { background: #f7f7f4; }
@media (max-width: 760px) { table.cal td:first-child { min-width: 150px; max-width: 150px; font-size: 12px; } }
table.cal .z { color: #c9c8c2; }
td.gap { color: #fff; background: var(--burgundy) !important; }
td.low { background: #fbf1e4 !important; color: #8a5a1c; }
.st { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.st.gap { background: var(--burgundy); color: #fff; } .st.low { background: #fbf1e4; color: #8a5a1c; }
.st.okk { background: #eef4ea; color: var(--olive-text); }
.st.od { background: #f6e3e7; color: var(--burgundy); }        /* минус в пределах лимита овердрафта (12.10.2026) */
.cal-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px 24px; }
.cal-form label, .event-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cal-form label small { font-weight: 400; color: var(--muted); }
.cal-form input, .event-form input, .event-form select { padding: 7px 9px; border: 1px solid var(--axis); border-radius: 6px;
  font: 13px var(--font); max-width: 100%; }
.cal-form p { grid-column: 1 / -1; margin: 4px 0 0; }
.event-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.event-form .wide { flex: 1 1 220px; } .event-form label.check { display: flex; align-items: center; gap: 6px; }
tr.editing td { background: #fbf6ef; }
form.inline { display: inline; }
.link-btn { border: 0; background: none; padding: 4px 2px; color: var(--burgundy); font: 13px var(--font); text-decoration: underline; cursor: pointer; }
h3.suggest-head { font: 600 14px var(--font); margin: 22px 0 4px; }
tr.suggested td { background: #f7f9f5; }
ul.errorlist { list-style: none; margin: 2px 0 0; padding: 0; color: var(--burgundy); font-size: 12px; font-weight: 500; }
[aria-invalid="true"] { border-color: var(--burgundy) !important; }
.tag.warn { background: #fbf1f3; color: var(--burgundy); }
.dt-check { font-size: 11.5px; color: var(--burgundy); white-space: normal; max-width: 420px; margin: 2px 0 4px; }
.copy-all-box { text-align: right; }
.copy-all-box .note-muted { margin-top: 4px; max-width: 260px; margin-left: auto; }

/* «Что сделать сегодня» на дашборде (apps/reports/today.py) */
.today { margin-bottom: 16px; padding-bottom: 14px; }
.today-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.today-head h2 { margin: 0; }
.todos { list-style: none; margin: 10px 0 0; padding: 0; }
.todo { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--hair); }
.todo .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.todo.is-late .dot { background: var(--burgundy); }
.todo.is-due .dot { background: var(--sand); }
.todo .what { flex: 1; min-width: 0; }
.todo .what b { display: block; font-weight: 600; }
.todo .what span { display: block; font-size: 12.5px; color: var(--ink-2); }
.todo-go { flex: none; white-space: nowrap; }
.today-ok { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 12.5px; color: var(--olive-text); }
.today.done .today-ok { border-top: 0; padding-top: 0; }
.today-ok.big { font-size: 14px; font-weight: 600; }
@media (max-width: 640px) { .todo { flex-wrap: wrap; } .todo-go { margin-left: 24px; } }

/* «Долги»: сроки долгов итогом (полоска и пять цифр над таблицей) */
.agebar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 14px 0 10px; background: var(--hair); }
.agebar b { display: block; height: 100%; }
.ages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ag { font-size: 12.5px; color: var(--ink-2); display: grid; grid-template-columns: 12px 1fr; column-gap: 6px; align-items: center; }
.ag .sw { width: 10px; height: 10px; border-radius: 2px; }
.ag b { grid-column: 2; font-size: 16px; color: var(--ink); }
.ag .p { grid-column: 2; }
@media (max-width: 760px) { .ages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* «Из 1С»: напоминалка «Как выгрузить из 1С» */
dl.howto { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; }
dl.howto dt { font-weight: 700; margin-top: 10px; }
dl.howto dt:first-child { margin-top: 0; }
dl.howto dd { margin: 2px 0 0; color: var(--ink-2); }
/* «Долги» и «ФОТ по сотрудникам»: на телефоне название остаётся на месте, когда колонки прокручиваются вбок (B) */
table.debts td:first-child, table.debts th:first-child,
table.payroll td:first-child, table.payroll th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }

/* «Привязать к счетам»: что запишется (12.10.2026) */
.pick-preview { margin: 10px 0 0; padding-left: 18px; font-size: 13px; }
.pick-preview li { margin: 2px 0; }
.good { color: var(--olive-text); font-weight: 600; }
tr.chosen td { background: #f3f7f0; }

/* «Закрыть месяц…»: остатки на конец месяца и отметка о сверке с банком (12.10.2026) */
details.close-month summary { display: inline-block; list-style: none; }
details.close-month summary::-webkit-details-marker { display: none; }
.close-form { background: #faf9f6; border: 1px solid var(--hair); border-radius: 8px; padding: 12px 14px; margin: 8px 0 4px; }
.close-form table { width: auto; min-width: 320px; margin: 8px 0; }
.close-log-title { margin: 18px 0 6px; font-size: 14px; }

/* выбор периода — всегда отдельной строкой под заголовком: справа от него строка то помещалась (прошлый период),
   то переносилась вниз (текущий — подпись «данные на сегодня» длиннее) и прыгала (15.10.2026); «Книга в Excel» —
   в той же строке справа */
.page-head > .filters, .page-head > .head-actions { flex-basis: 100%; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
