/* Оформление поверх Tabler (vendor/tabler): только то, чего в Tabler нет, и цвета из его переменных —
   поэтому светлая и тёмная темы работают без отдельных правил. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/inter/inter-cyrillic-400-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-weight: 500; font-display: swap; src: url("vendor/inter/inter-cyrillic-500-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-weight: 600; font-display: swap; src: url("vendor/inter/inter-cyrillic-600-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-weight: 700; font-display: swap; src: url("vendor/inter/inter-cyrillic-700-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-weight: 400; font-display: swap; src: url("vendor/inter/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("vendor/inter/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("vendor/inter/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("vendor/inter/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tblr-body-font-family: var(--tblr-font-sans-serif);
  --accent: var(--tblr-primary);
  --accent-2: var(--tblr-teal);
  --accent-3: var(--tblr-orange);
  --ok: var(--tblr-success);
  --warn: var(--tblr-warning);
  --bad: var(--tblr-danger);
  --line: var(--tblr-border-color);
  --muted: var(--tblr-secondary);
  --surface: var(--tblr-bg-surface);
  --surface-2: var(--tblr-bg-surface-secondary);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); margin: 8px 0 0; }
.error.small { font-size: 12px; margin: 2px 0 0; }
.hint, .page-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.page-hint { margin: 0 0 16px; max-width: 120ch; }
.fine { font-size: 12px; margin: 0; color: var(--muted); }
code { font-size: 12px; }
.tab-page > * + * { margin-top: 16px; }

/* шапка и вкладки */
.app-header { border-bottom: 1px solid var(--line); }
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--tblr-primary); color: #fff;
}
.brand-mark .icon { width: 22px; height: 22px; }
.text-center .brand-mark { width: 48px; height: 48px; }
.brand-title { display: block; font-weight: 700; line-height: 1.2; }
.brand-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
[data-bs-theme="light"] .theme-light, [data-bs-theme="dark"] .theme-dark { display: none; }
.app-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.app-tabs .nav-link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: none; border: 0;
  color: var(--muted); padding: 12px 12px 10px; border-bottom: 2px solid transparent; font-weight: 500;
}
.app-tabs .nav-link:hover { color: var(--tblr-body-color); }
.app-tabs .nav-link.active { color: var(--tblr-primary); border-bottom-color: var(--tblr-primary); }
/* пульт имитации — справа и приглушённо: это не часть продукта, а подмена внешней системы */
.app-tabs .nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.app-tabs .tab-demo { font-style: italic; }
.subnav { flex-wrap: wrap; margin-bottom: 16px; }
.subnav .btn { display: inline-flex; align-items: center; gap: 6px; }

/* переключатель отдела */
.dept-switch { display: flex; align-items: center; gap: 8px; margin-left: 24px; min-width: 0; }
.dept-label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dept-switch .form-select { width: auto; max-width: 260px; font-weight: 600; }
.dept-sphere { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* плитки */
.tiles .card-body { padding: 14px 16px; }
.tile-value { font-size: 26px; font-weight: 600; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile.warn .tile-value { color: var(--warn); }
.tile-hint { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.35; }
.tile .avatar { flex: none; }

/* таблицы */
.scroll { max-height: 62vh; overflow: auto; }
.scroll.tall { max-height: 75vh; }
.table th { white-space: nowrap; position: sticky; top: 0; z-index: 1; background: var(--surface); }
.table td { white-space: nowrap; }
th.wide { width: 28%; }
td.empty-cell { text-align: center; padding: 22px; white-space: normal; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.wrap-text { display: block; white-space: normal; min-width: 180px; max-width: 640px; overflow-wrap: anywhere; }
tbody tr.clickable { cursor: pointer; }
tr.inactive td { color: var(--muted); }
tr.warn-row td { color: var(--warn); }
tr.fresh { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(var(--tblr-primary-rgb), .18); } to { background: transparent; } }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.lookup { width: 190px; }

.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; min-width: 100px; }
.bar > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.dev { font-variant-numeric: tabular-nums; font-weight: 600; }
.dev.ok { color: var(--ok); } .dev.warn { color: var(--warn); } .dev.bad { color: var(--bad); }
.warn-text { color: var(--warn); }

/* графики: цвета рядов — проверенная палитра (различимы при дальтонизме, проверено в светлой и тёмной теме),
   состояния — отдельные цвета, всегда вместе с числом или подписью */
:root {
  --series-1: #2a78d6; /* назначено */
  --series-2: #eb6834; /* на доработку */
  --series-3: #1baf7a; /* решено и отклонено */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-critical: #d03b3b;
  --chart-grid: #e7e8ec;
  --chart-soft: #9ec5f4;
}
[data-bs-theme="dark"] {
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --chart-grid: #2c3a4d;
  --chart-soft: #2f5d93;
}
.chart { min-height: 220px; color: var(--muted); }
.chart-small { min-height: 160px; }
/* страница всегда длиннее окна: прокрутка до низа есть, даже когда в отделе ещё нет данных */
#app .page-wrapper { min-height: 100vh; }
/* подвал: после последней карточки остаётся запас, как на обычных сайтах, — видно, что страница закончилась */
.app-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  width: 100%; margin-top: 32px; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--tblr-border-color);
  color: var(--muted); font-size: 13px; }
.chart.is-empty { min-height: 0; }
/* кнопка «Наверх»: появляется, когда страница прокручена дальше полутора экранов */
.scroll-top { position: fixed; right: 24px; bottom: 24px; z-index: 1030; width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s, transform .2s; }
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 575.98px) { .scroll-top { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .scroll-top { transition: none; } }
.chart.is-empty .chart-empty { margin: 4px 0; }
.chart-empty { color: var(--muted); font-size: 13px; margin: 24px 0; text-align: center; }
.svg-chart { width: 100%; height: auto; display: block; overflow: visible; font-variant-numeric: tabular-nums; }
.svg-chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.svg-chart .baseline { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.svg-chart .axis { fill: var(--muted); font-size: 11px; }
.svg-chart .axis-strong { fill: var(--muted); font-size: 11px; font-weight: 600; }
.svg-chart .label { fill: var(--tblr-body-color); font-size: 12px; dominant-baseline: middle; }
.svg-chart .value { fill: var(--tblr-body-color); font-size: 12px; font-weight: 600; dominant-baseline: middle; }
.svg-chart .mark-accent { fill: var(--series-1); }
.svg-chart .mark-soft { fill: var(--chart-soft); }
.svg-chart .track { fill: var(--chart-grid); opacity: .5; rx: 4; }
.svg-chart .col.series-a { fill: var(--series-1); }
.svg-chart .col.series-b { fill: var(--series-3); }
.svg-chart .col.series-c { fill: var(--series-2); }
.svg-chart .cursor { fill: var(--muted); opacity: .08; }
.svg-chart .hit { fill: transparent; cursor: crosshair; }
.svg-chart .band { fill: var(--muted); opacity: .1; }
.svg-chart .status-good { fill: var(--status-good); }
.svg-chart .status-warning { fill: var(--status-warning); }
.svg-chart .status-critical { fill: var(--status-critical); }
.svg-chart circle.dot { stroke: var(--surface); stroke-width: 2; }
.svg-chart .focus-ring { fill: none; stroke: var(--tblr-body-color); stroke-width: 1.5; }
.svg-chart .zone-bad { fill: var(--status-critical); opacity: .06; }
.svg-chart .zone-label { fill: var(--status-critical); font-size: 11px; font-weight: 600; }
.svg-chart .threshold { stroke: var(--status-critical); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.chart-tip {
  position: fixed; z-index: 2000; pointer-events: none; min-width: 160px; max-width: 280px; padding: 8px 10px;
  background: var(--surface); color: var(--tblr-body-color); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15); font-size: 12px;
}
.chart-tip-title { font-weight: 600; margin-bottom: 4px; }
.chart-tip-row { display: flex; justify-content: space-between; gap: 12px; }
.chart-tip-row span { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.key.series-a { background: var(--series-1); } .key.series-b { background: var(--series-3); } .key.series-c { background: var(--series-2); }
.legend { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .key { margin-left: 8px; }

/* формы */
.form-grid { display: grid; gap: 12px; }
.executor-quality { margin: 8px 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.today-cell { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.motivation-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; }
.field .form-hint { margin-top: 4px; }
.sentence { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.value-editor { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.value-editor .form-control { flex: 1 1 140px; width: auto; }
.value-editor.checks { gap: 2px 18px; }
.value-editor.checks .form-check { margin: 0; }

/* диалоги и уведомления */
.app-dialog {
  background: var(--surface); color: var(--tblr-body-color); border: 1px solid var(--line); border-radius: 12px;
  width: min(860px, 95vw); padding: 20px; box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
#editor { width: min(720px, 95vw); }
.app-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin-bottom: 12px; }
.kv span { overflow-wrap: anywhere; }
.note { color: var(--warn); margin: 4px 0; }
.decision { color: var(--ok); font-size: 16px; margin: 0 0 4px; }
.decision.none { color: var(--warn); }
.toast-box {
  position: fixed; right: 20px; bottom: 20px; max-width: min(440px, calc(100vw - 40px)); z-index: 1100;
  padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--ok); box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}
.toast-box.bad { border-left-color: var(--bad); }

/* демонстрация */
.intro p { line-height: 1.55; max-width: 120ch; }
.step-no {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tblr-primary); color: #fff; font-size: 13px; margin-right: 10px;
}
.rate { font-size: 15px; font-weight: 500; margin: 8px 0 14px; }
.flow { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.stage {
  flex: 1 1 0; min-width: 150px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; position: relative;
}
.stage .icon { color: var(--tblr-primary); width: 22px; height: 22px; }
.stage.live { border-color: var(--tblr-primary); }
.stage.warn .stage-note { color: var(--warn); }
.stage-no { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 12px; }
.stage-title { color: var(--muted); font-size: 13px; min-height: 2.6em; margin-top: 6px; }
.stage-value { font-size: 22px; font-weight: 600; margin: 4px 0; font-variant-numeric: tabular-nums; }
.stage-note { font-size: 12px; color: var(--muted); }
.stage-arrow { align-self: center; color: var(--muted); }
.flow.running .stage.live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(var(--tblr-primary-rgb), .18); } }
@media (max-width: 900px) { .flow { flex-direction: column; } .stage-arrow { transform: rotate(90deg); } }

.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.preset { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.preset.current { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.preset p { margin: 0; line-height: 1.45; }
.preset .btn { justify-self: start; margin-top: 4px; }
.preset-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.preset-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.feed-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; text-align: left; cursor: pointer; }
.feed-id { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 56px; }
.feed-what { color: var(--accent-2); }

.executors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.executor .card-body { display: grid; gap: 10px; align-content: start; }
.executor.off { opacity: .65; }
.executor-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.executor-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; }
.skills { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.skills dt { color: var(--muted); font-weight: 400; }
.skills dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .brand-sub { display: none; }
  /* отдел — отдельной строкой под логотипом, во всю ширину */
  .app-header .container-xl { flex-wrap: wrap; }
  .dept-switch { order: 3; width: 100%; margin: 8px 0 0; }
  .dept-switch .form-select { max-width: none; flex: 1; }
  .tile-value { font-size: 22px; }
  .lookup { width: 150px; }
}

/* разбор по правилам для одного сотрудника */
.candidate-link { display: inline-flex; align-items: center; gap: 2px; text-align: left; font-weight: 600; }
.candidate-link .icon { width: 14px; height: 14px; }
.check-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule-checks { display: grid; gap: 8px; margin-top: 12px; }
.rule-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.rule-check.ok { border-left: 4px solid var(--ok); }
.rule-check.bad { border-left: 4px solid var(--bad); background: rgba(var(--tblr-danger-rgb), .04); }
.rule-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; color: #fff; }
.rule-check.ok .rule-mark { background: var(--ok); }
.rule-check.bad .rule-mark { background: var(--bad); }
.rule-mark .icon { width: 16px; height: 16px; }
.rule-line { margin-top: 2px; }

/* страница сотрудника */
.executor-name { font-weight: 600; color: inherit; }
.executor-name:hover { color: var(--tblr-primary); }
.profile-avatar { background: var(--tblr-primary); color: #fff; font-weight: 700; font-size: 1.4rem; }
.profile-avatar.off { background: var(--muted); }
.skill-list { display: grid; gap: 14px; }
.skill-label { font-weight: 600; margin-bottom: 4px; }
.skill-values { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-chip { font-size: 13px; font-weight: 500; padding: 5px 9px; }

/* мастер своей сферы */
.sphere-builder { display: grid; gap: 12px; }
.sphere-params { display: grid; gap: 12px; }
.sphere-param { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; }
.sphere-param-head { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; align-items: end; }
.sphere-heavy { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; }
.sphere-summary { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .sphere-param-head, .sphere-heavy { grid-template-columns: 1fr; } }

/* «Как это работает»: путь заявки и чек-лист */
.path { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.path-step {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit;
}
.path-step:hover { border-color: var(--tblr-primary); }
.path-step .icon { color: var(--tblr-primary); width: 22px; height: 22px; }
.path-no { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 12px; }
.path-who { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.path-title { font-weight: 600; line-height: 1.3; }
.path-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.path-note { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .path { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .path { grid-template-columns: 1fr; } }
.check-item { display: flex; gap: 12px; align-items: flex-start; }
.check-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; color: #fff; }
.check-mark.ok { background: var(--ok); }
.check-mark.todo { background: var(--warn); }
.check-mark .icon { width: 16px; height: 16px; }
.roles dt { margin-top: 8px; }
.roles dd { margin: 0; color: var(--muted); font-size: 13px; }

/* путь заявки в карточке */
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 28px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--tblr-primary); }
.timeline .dot.ok { background: var(--ok); } .timeline .dot.warn { background: var(--warn); } .timeline .dot.muted { background: var(--muted); }
.timeline-time { font-size: 12px; color: var(--muted); }
.timeline-title { font-weight: 600; }

/* рейтинг */
.rating-table td { vertical-align: middle; }
.rating-points { min-width: 180px; }
.points-cell { display: flex; align-items: center; gap: 10px; }
.points-value { min-width: 64px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.points-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--chart-grid); overflow: hidden; min-width: 80px; }
.points-bar > span { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.outside-row .points-bar > span { background: var(--muted); }
.medal, .place { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 13px; }
.medal-1 { background: #f5c542; color: #3d2e00; }
.medal-2 { background: #c9ced6; color: #2a2f36; }
.medal-3 { background: #d9a172; color: #3b2210; }
.place { color: var(--muted); }
.group-row td { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; }

.demo-badge { font-weight: 600; letter-spacing: .02em; }

.import-preview { max-height: 45vh; overflow: auto; }

/* роли: кнопки, которые вернули бы «нет прав», не показываются (права всё равно проверяет сервер) */
body.role-viewer .need-manager, body:not(.role-admin) .need-admin, body.role-admin .need-not-admin { display: none !important; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; line-height: 1.15;
  white-space: nowrap; }
.user-chip .user-text { display: flex; flex-direction: column; }
.user-chip .user-name { color: var(--tblr-body-color); font-weight: 600; }
.user-chip .user-role { font-size: 11px; }
@media (max-width: 767.98px) { .user-chip .user-text { display: none; } }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.roles-table td:not(:first-child), .roles-table th:not(:first-child) { text-align: center; }

/* ИИ-разбор */
.ai-result:not(:empty) { margin-top: 4px; }
.ai-summary { font-size: 15px; line-height: 1.55; }
.ai-section { margin-top: 18px; }
.ai-section-title { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 8px; }
.ai-finding { padding: 10px 12px; border: 1px solid var(--tblr-border-color); border-radius: 8px; display: grid; gap: 6px; }
.ai-finding + .ai-finding { margin-top: 8px; }
.ai-finding-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-why { font-size: 13px; }
.ai-actions { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.ai-links { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.ai-print-head { display: none; }
tr.row-highlight td { background: var(--tblr-yellow-lt, rgba(247, 183, 49, .18)); transition: background .3s; }
/* печать отчёта: только карточка ИИ-разбора, без кнопок */
@media print {
  body.print-ai * { visibility: hidden; }
  body.print-ai #ai-card, body.print-ai #ai-card * { visibility: visible; }
  body.print-ai #ai-card { position: absolute; top: 0; left: 0; width: 100%; border: 0; box-shadow: none; }
  body.print-ai #ai-run, body.print-ai .ai-report-tools, body.print-ai .ai-links { display: none !important; }
  body.print-ai .ai-print-head { display: block; color: #555; }
}
