/* ============================================================
   Трафики Diversity — фирменный стиль, вариант «Графит, строгий».
   Основа: брендбук Diversity Group 2026 (\\dvs.group\file2\00.Public\BrandBook\
   DGroup\!Brandbook_Diversity Group_2026). Согласовано 28.09.2026.

   Из брендбука: девять цветов, #EDEDED для текста на тёмном фоне,
   Roboto Condensed (заголовки, подписи, кнопки) и Roboto Flex (текст),
   плашки как выделение, отступы кратны единице x = 4px.
   Производные цвета (панели, линии, «цвета для текста на графите») —
   ниже с пометкой «производный»: брендовые синий, красный и фиолетовый
   на #262626 текстом нечитаемы, поэтому для текста они осветлены.
   ============================================================ */
:root {
  /* брендбук */
  --ground:  #262626;
  --text:    #EDEDED;
  --red:     #DB2323;
  --blue:    #274BDB;
  --orange:  #F9A448;
  --green:   #81BC29;
  --teal:    #43C1CF;
  --purple:  #A03DE7;
  /* производные */
  --rail:      #1E1E1E;
  --rail-line: #33322F;
  --panel:     #2E2D2B;
  --panel-2:   #383734;
  --line:      #45443F;
  --line-soft: #383734;
  --dim:       #B3AEA5;
  --faint:     #9A958C;
  --mute:      #6B6862;   /* пройденные шаги, неактивное — не для текста */
  --blue-text: #8EA2F2;
  --red-text:  #F2685E;
  --blue-dot:  #5F7EF0;
  --purple-dot:#B566F0;

  --cond: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  --flex: 'Roboto Flex', Roboto, Arial, sans-serif;
  --x: 4px;
  --rail-w: 214px;
  color-scheme: dark;
}
html.rail-min { --rail-w: 60px; }

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--ground); color: var(--text);
  font: 400 14px/1.45 var(--flex); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 2px; }

/* ---------- каркас: колонка меню + рабочая область ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
main.page { padding: calc(var(--x) * 8) calc(var(--x) * 8) calc(var(--x) * 12); max-width: 1560px; min-width: 0; }

/* ---------- колонка меню ---------- */
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 24px 0 18px;
  background: var(--rail); border-right: 1px solid var(--rail-line);
}
.rail-logo { display: block; margin: 0 22px; line-height: 0; }
.rail-logo img { width: 143px; height: 53px; }   /* знак с подтёками ниже строки */
/* название продукта — отдельно от логотипа, за охранным полем (буква «D») */
.rail-prod {
  display: block; margin: 18px 22px 22px;
  font: 600 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.rail-nav { display: grid; gap: 2px; padding: 0 10px; }
.rail-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: 4px; font: 600 15px/1 var(--cond); color: var(--dim); text-decoration: none;
}
.rail-nav a i { flex-shrink: 0; width: 3px; height: 16px; border-radius: 1px; background: var(--sc); }
.rail-nav a:hover { color: var(--text); background: var(--ground); }
.rail-nav a.on { color: var(--text); background: var(--panel); }
.rail-nav a.on i { width: 4px; height: 22px; }
.rail-nav a b {
  margin-left: auto; padding: 3px 6px; border-radius: 2px;
  background: var(--red); color: #fff; font: 600 11.5px/1 var(--cond);
}
.rail-grp {
  padding: 18px 12px 6px;
  font: 600 11px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
/* цвет раздела — из расширенной палитры; красный разделам не отдаём, он для сигналов */
.sc-home { --sc: var(--teal); }
.sc-req  { --sc: var(--blue-dot); }
.sc-perf { --sc: var(--green); }
.sc-proj { --sc: var(--orange); }
.sc-adm  { --sc: var(--purple-dot); }
.sc-task { --sc: var(--orange); }
.sc-cli  { --sc: var(--teal); }
.sc-plug { --sc: var(--blue-dot); }
.sc-close { --sc: var(--green); }
.sc-tpl { --sc: var(--orange); }
.rail-foot { margin-top: auto; padding: 22px 22px 0; display: grid; gap: 12px; justify-items: start; }
button.rail-fold {
  height: auto; padding: 0; border: 0; background: none; color: var(--faint);
  font: 400 12.5px/1 var(--cond); letter-spacing: 0;
}
button.rail-fold:hover { color: var(--text); }
.fold-max { display: none; }
.rail-user { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
             font: 400 14px/1.2 var(--cond); color: var(--dim); }
.rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--panel-2); color: var(--text);
  font: 600 11px/1 var(--cond);
}
form.rail-logout { margin: 0; }

/* свёрнутое меню — полоса с цветными метками */
.rail-min .rail-logo, .rail-min .rail-prod, .rail-min .rail-nav span, .rail-min .rail-name,
.rail-min .rail-logout, .rail-min .fold-min { display: none; }
.rail-min .fold-max { display: inline; font-size: 16px; }
.rail-min .rail-nav { padding: 0 8px; }
.rail-min .rail-nav a { justify-content: center; padding: 0; }
.rail-min .rail-nav a i { width: 5px; height: 18px; }
.rail-min .rail-nav a b { position: absolute; top: 3px; right: 3px; padding: 2px 4px; font-size: 10px; }
.rail-min .rail-grp { font-size: 0; padding: 0; height: 1px; margin: 10px 8px; background: var(--rail-line); }
.rail-min .rail-foot { padding: 22px 0 0; justify-items: center; }

/* ---------- заголовки: Roboto Condensed, плотно, трекинг −2% ---------- */
h1 {
  margin: 0; font: 900 38px/1 var(--cond); letter-spacing: -.02em; text-transform: uppercase;
  text-wrap: balance;
}
main.page > h1 { margin-bottom: 14px; }
h1 .count, h2 .count {
  font: 400 17px/1 var(--cond); letter-spacing: 0; text-transform: none; color: var(--faint);
  margin-left: 6px;
}
h1 .rule-badge { vertical-align: middle; letter-spacing: 0; text-transform: none; }
h2 { margin: 32px 0 12px; font: 600 24px/1.1 var(--cond); letter-spacing: -.02em; }
h3 { margin: 20px 0 8px; font: 600 17px/1.15 var(--cond); letter-spacing: -.01em; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1, .page-head h2 { margin: 0; }
.panel + .page-head, .table-scroll + .page-head { margin-top: 32px; }
.lede, main.page > p { color: var(--dim); max-width: 78ch; margin: 8px 0 16px; }
p.sub:first-child { margin: 0 0 10px; }
p.sub a { color: var(--faint); font: 400 14px/1 var(--cond); }
p.sub a:hover { color: var(--text); text-decoration: none; }

/* ---------- панели и плашки ---------- */
.panel { background: var(--panel); border-radius: 6px; overflow: hidden; }
.panel + .panel, .table-scroll + .panel, .panel + .table-scroll { margin-top: 12px; }
.panel > :not(table):not(.table-scroll):not(.panel-head):not(details.section-hint) { margin-left: 16px; margin-right: 16px; }
.panel > :first-child:not(table):not(.table-scroll):not(.panel-head) { margin-top: 16px; }
.panel > :last-child:not(table):not(.table-scroll) { margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px 12px; }
.panel-head h2, .panel-head h3 { margin: 0; }
/* заголовок блока — синяя фирменная плашка */
.panel-head h2 {
  display: inline-block; padding: 5px 8px; border-radius: 2px;
  background: var(--blue); color: #fff; font: 600 16px/1 var(--cond); letter-spacing: -.01em;
}
/* таблица прямо на странице тоже лежит на панели */
main.page > .table-scroll { background: var(--panel); border-radius: 6px; margin-top: 12px; }
.table-scroll { overflow-x: auto; }

/* ---------- кнопки ---------- */
.btn, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 4px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--mute); background: transparent; color: var(--text);
  font: 600 14px/1 var(--cond); letter-spacing: .01em; text-decoration: none;
}
.btn:hover, button:hover { border-color: var(--text); text-decoration: none; }
/* главное действие — основной акцентный красный */
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #C21E1E; border-color: #C21E1E; }
.btn-ghost { border-color: var(--line); color: var(--dim); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--mute); }
form.inline-form { display: inline-block; margin: 0 8px 0 0; }
/* поле с подписью в строке с кнопкой («Статус [▾] Сменить») — одной строкой */
form.inline-form label { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 0 0; }
main.page > form.inline-form { margin-bottom: 16px; }

/* ---------- поля ---------- */
select, input, textarea {
  height: 34px; padding: 0 11px; border-radius: 4px;
  background: var(--ground); border: 1px solid var(--line); color: var(--text);
  font: 400 13.5px/1 var(--flex);
}
select { min-width: 190px; }
input[type="text"], input[type="password"], input[type="email"], input:not([type]) { min-width: 220px; }
/* ширину из шаблона (size= или style="width:…") не перебиваем */
input[size], input[style*="width"] { min-width: 0; }
input[type="number"], input[type="date"], input[type="time"] { min-width: 0; }
input[type="file"] { height: auto; min-width: 0; padding: 6px 9px; }
input[type="checkbox"], input[type="radio"] {
  width: 15px; height: 15px; min-width: 0; padding: 0; margin: 0;
  accent-color: var(--blue-text); vertical-align: middle; flex-shrink: 0;
}
textarea { height: auto; padding: 9px 11px; line-height: 1.45; min-width: min(320px, 100%); max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--blue-text); outline-offset: 1px; }
label { display: block; margin: 8px 0; color: var(--dim); font: 400 14px/1.3 var(--cond); }
/* фильтры (method="get") — в строку; формы правки — обычным потоком */
main.page form[method="get"]:not(.inline-form) {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 14px;
}
.form-grid { display: grid; gap: 12px; max-width: 760px; }
.form-grid label { display: grid; gap: 4px; }
.form-grid fieldset { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.form-grid label.inline-check, .inline-check {
  display: inline-flex; align-items: center; gap: 6px; margin: 3px 14px 3px 0; color: var(--dim);
}
.inline-check input { min-width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px 16px; margin: 0; }
legend { padding: 0 6px; font: 600 14px/1 var(--cond); color: var(--text); }

/* ---------- таблицы ---------- */
table { border-collapse: collapse; width: 100%; }
th, td {
  padding: 11px 14px; vertical-align: top; text-align: left;
  border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
thead th, table > tbody > tr:first-child:has(th) th {
  font: 600 11.5px/1.2 var(--cond); letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap; border-bottom-color: var(--line);
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody tr:hover td { background: rgba(237, 237, 237, .025); }
/* имя в строке — ссылка, но таблица не рябит синим: белый полужирный */
td a:not(.btn):not(.code) { color: var(--text); font-weight: 600; }
td a:not(.btn):not(.code):hover { color: var(--blue-text); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.code, a.code { font: 500 13.5px/1.4 var(--flex); font-variant-numeric: tabular-nums; color: var(--blue-text); }
.sub { color: var(--dim); font: 400 13px/1.3 var(--cond); }
div.sub { margin-top: 2px; }
td.sub { font-size: 13px; }
.prewrap { white-space: pre-wrap; }
/* таблица «поле — значение» */
table.kv th, table.kv > tbody > tr:first-child:has(th) th {
  width: 190px; font: 600 13.5px/1.4 var(--cond); letter-spacing: 0;
  text-transform: none; color: var(--faint); white-space: normal; border-bottom-color: var(--line-soft);
}
/* просрочен ответ менеджеру */
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
td.dl-late { color: var(--orange); font-weight: 600; }
td.dl-late .sub { color: var(--orange); font-weight: 400; }

/* ---------- статусы: цветная точка + нейтральный текст ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 3px;
  background: var(--panel-2); color: var(--text); font: 400 13px/1.35 var(--cond); white-space: nowrap;
}
.badge::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--faint)); }
.badge.badge-warn { --sc: var(--orange); }
.badge[data-code="closed"] { --sc: var(--green); }
/* путь запроса: от брифа до оплаты */
.badge[data-rq="new"]       { --sc: var(--dim); }
.badge[data-rq="ready"]     { --sc: var(--teal); }
.badge[data-rq="tender"]    { --sc: var(--orange); }
.badge[data-rq="sent"]      { --sc: var(--blue-dot); }
.badge[data-rq="rebid"]     { --sc: var(--red); }
.badge[data-rq="in_work"]   { --sc: var(--purple-dot); }
.badge[data-rq="realized"]  { --sc: var(--green); }
.badge[data-rq="closed"]    { --sc: var(--mute); color: var(--dim); }
.badge[data-rq="cancelled"] { --sc: var(--red); color: var(--dim); }
.badge[data-offer="candidate"] { --sc: var(--mute); }
.badge[data-offer="asked"]     { --sc: var(--orange); }
.badge[data-offer="answered"]  { --sc: var(--green); }
.badge[data-offer="declined"]  { --sc: var(--red); }
.badge[data-offer="waiting"]   { --sc: var(--purple-dot); }
.badge[data-offer="accepted"]  { --sc: var(--teal); }
.badge[data-offer="staff"]     { --sc: var(--blue-text); }

/* путь запроса — тонкая шкала, текущий шаг красный */
.path { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin: 14px 0 18px; }
.path span {
  border-top: 4px solid var(--panel-2); padding-top: 8px;
  font: 400 12px/1.2 var(--cond); color: var(--faint);
}
.path span.done { border-color: var(--mute); color: var(--dim); }
.path span.now  { border-color: var(--red); color: var(--text); font-weight: 600; }

/* ---------- метки правил подбора у исполнителей ---------- */
.rule-badge {
  display: inline-block; margin: 1px 0; padding: 1px 7px; border-radius: 2px;
  border: 1px solid currentColor; font: 600 12px/1.5 var(--cond); white-space: nowrap;
}
.rule-badge[data-kind="blacklist"], .rule-badge[data-kind="do_not_offer"],
.rule-badge[data-kind="unavailable"] { color: var(--red-text); }
.rule-badge[data-kind="favorite"]    { color: var(--green); }
.rule-badge[data-kind="exclusive"]   { color: var(--orange); }
.rule-badge[data-kind="grey"], .rule-badge[data-kind="neutral"],
.rule-badge[data-kind="low_priority"], .rule-badge[data-kind="last_resort"] { color: var(--dim); }
.rule-badge[data-kind="role_limit"], .rule-badge[data-kind="note"] { color: var(--blue-text); }
.rule-badge[data-kind="staff"] { background: var(--text); border-color: var(--text); color: var(--ground); }
tr.rule-off td { opacity: .45; text-decoration: line-through; }

/* ---------- подсказки ----------
   .hint/.warn — и абзацы «что это и что делать», и строчные пояснения.
   Плашку рисуем только блочным. */
p.hint, div.hint, li.hint, p.warn, div.warn, li.warn {
  display: block; margin: 10px 0; padding: 11px 14px; border-radius: 4px;
  background: var(--panel); color: var(--dim); font-size: 13.5px; max-width: 90ch;
  box-shadow: inset 3px 0 0 var(--teal);
}
p.warn, div.warn, li.warn { color: var(--text); box-shadow: inset 3px 0 0 var(--orange); }
.panel p.hint, .panel p.warn, .panel div.hint, .panel div.warn { background: var(--ground); }
span.hint { color: var(--dim); font-size: 13px; }
span.warn { color: var(--orange); font-size: 13px; }
td .hint, td .warn { display: inline; padding: 0; margin: 0; background: none; box-shadow: none; }
.error { color: var(--red-text); }
small { color: var(--faint); font-size: 12px; }
.cand-warn { color: var(--blue-text); font: 400 13px/1.3 var(--cond); }
.cand-excluded td, .inactive { opacity: .55; }

/* свёрнутая подсказка «что это и что делать» под шапкой панели */
details.section-hint { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, .08); }
details.section-hint summary { list-style: none; white-space: nowrap; color: var(--dim); font: 400 13px/1.3 var(--cond); }
details.section-hint summary::-webkit-details-marker { display: none; }
details.section-hint summary::after { content: " ▾"; color: var(--faint); }
details.section-hint[open] summary::after { content: " ▴"; }
details.section-hint p { margin: 10px 0 2px; color: var(--dim); font-size: 13px; max-width: 78ch; }

details { margin: 10px 0; }
details > summary { cursor: pointer; color: var(--text); font: 600 14px/1.3 var(--cond); }
details > summary:hover { color: var(--blue-text); }
details[open] > summary { margin-bottom: 8px; }
code, pre { font-family: Consolas, 'Roboto Mono', monospace; font-size: 12.5px; color: var(--dim); }

/* ---------- тендер ---------- */
tr.offer-selected td { background: rgba(129, 188, 41, .08); }
.offer-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.offer-form input[type="text"] { width: 110px; min-width: 0; }
.offer-form input[name="term"], .offer-form input[name="comment"] { width: 160px; }
.offer-form select { min-width: 0; }
/* «ровно это уйдёт в письме» — на белой бумаге: почтовый клиент тему сайта не знает,
   и оформление приложения внутрь письма не протекает */
.letter-preview {
  max-width: 760px; margin: 12px 0; padding: 18px 22px; border-radius: 4px;
  background: #fff; color: #000; font: 400 14px/1.45 Calibri, Arial, sans-serif; letter-spacing: 0;
}
.letter-preview a { color: #0563C1; }
.letter-preview th, .letter-preview td {
  font: inherit; letter-spacing: 0; text-transform: none; color: inherit; white-space: normal;
  padding: 4px 8px; border-bottom: 0; background: none;
}
.letter-preview tbody tr:hover td { background: none; }
.letter-preview .table-scroll { background: none; }

/* ---------- страница входа: без колонки меню ---------- */
main.page.login-page {
  min-height: 100vh; max-width: none; display: grid; place-items: center; padding: 24px;
}
.login-box { width: min(400px, 100%); }
.login-brand { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.login-brand img { width: 186px; height: 69px; }
.login-brand .rail-prod { margin: 0 0 23px; }   /* по низу надписи, а не подтёков */
.login-card { padding: 24px; background: var(--panel); border-radius: 6px; }
.login-card h1 { font-size: 30px; margin-bottom: 16px; }
.login-card .warn { margin: 0 0 14px; }
.login-card form { display: block; margin: 0; }
.login-card button { width: 100%; height: 40px; }
.login-card form.login-another { margin-top: 8px; }
.login-card form.login-another button { height: 32px; }
.login-note { margin-top: 16px; text-align: center; color: var(--faint); font: 400 13px/1.3 var(--cond); }

/* публичная форма отзыва менеджера — без меню, как страница входа */
.feedback-box { width: min(560px, 100%); }
.feedback-form fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.feedback-form legend { font-weight: 600; margin-bottom: 6px; }
.feedback-form label { display: block; margin: 4px 0; }
.feedback-form input[type="text"] { width: 100%; margin-top: 6px; }
.feedback-row { padding: 6px 0; border-top: 1px solid var(--line-soft); }
.feedback-row:first-of-type { border-top: 0; }

/* справочник задач: материал — метка, у админа с крестиком */
.task-item { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.task-item:first-of-type { border-top: 0; }
.task-item h3 { margin: 0 0 4px; font-size: 16px; }
.task-item.muted { opacity: .55; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 8px;
        border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.chip-del { display: inline; margin: 0; }
.chip-del button { padding: 0 4px; border: 0; background: none; color: var(--dim); cursor: pointer; }

/* подбор по опыту: релевантность звёздами 1–5 */
.cand-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.relevance { color: var(--orange); letter-spacing: 1px; white-space: nowrap; }
.relevance-off { color: var(--line); }
fieldset.checks { border: 1px solid var(--line); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
fieldset.checks label { white-space: nowrap; font-size: 13px; }
/* рассылка: действия по исполнителю столбиком, переписка и журнал сворачиваются */
table.dispatch td.actions form { display: block; margin-bottom: 4px; }
details.panel > summary { cursor: pointer; list-style: none; }
details.panel > summary h2 { display: inline; }
.event-row { padding: 3px 0; border-bottom: 1px solid var(--line); }
/* карточка запроса: задачи брифа таблицей, условия закрытия одной строкой */
table.brief-tasks td details form { margin-top: 6px; }
form.close-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0; }
/* подбор: кнопка добавления и фильтры по отметкам в одну строку над таблицей */
.cand-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 10px; }
#cand-search { width: 220px; height: 32px; }
.cand-tag.on { background: var(--text); color: var(--ground); border-color: var(--text); }
/* карточка запроса: строка метаданных под названием — подпись над значением */
.meta-row { display: flex; flex-wrap: wrap; row-gap: 10px; margin: 2px 0 14px; }
.meta-row > div { padding: 0 22px; border-left: 1px solid var(--line); }
.meta-row > div:first-child { padding-left: 0; border-left: 0; }
.meta-label { font: 600 11px var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.meta-value { font: 500 16px/1.3 var(--flex); margin-top: 3px; }
.meta-value .code { color: var(--blue-text); }
table.compact th, table.compact td { padding-top: 4px; padding-bottom: 4px; }
table.compact td details summary { font-size: 12.5px; }

/* подсказка «i»: описание раздела всплывает при наведении или нажатии (14.10.2026) */
.info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px;
  margin-left: 6px; vertical-align: middle; border: 1px solid var(--faint); border-radius: 50%;
  color: var(--faint); font: 600 12px/1 var(--flex); letter-spacing: 0; text-transform: none;
  font-style: normal; cursor: help; user-select: none; }
.info:hover, .info:focus { color: var(--text); border-color: var(--text); outline: none; }
/* position: fixed + координаты из base.html — панели с overflow: hidden её не обрежут */
.info-pop { display: none; position: fixed; z-index: 50; top: 0; left: 0;
  width: max-content; max-width: min(420px, calc(100vw - 32px)); padding: 10px 12px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font: 400 13.5px/1.45 var(--flex); letter-spacing: 0;
  text-transform: none; text-align: left; white-space: normal; cursor: auto; }
.info:hover .info-pop, .info:focus .info-pop, .info:focus-within .info-pop { display: block; }

/* переписка по исполнителям — вкладки и лента (документ доработок, 18.11 п. 4) */
.msg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.msg-tab { white-space: nowrap; }
.msg-tab.on { border-color: var(--teal); color: var(--text); }
.msg-tab .q-mark { color: var(--red-text); font-weight: 600; }
.msg-feed { display: flex; flex-direction: column; gap: 10px; }
/* display:flex бьёт атрибут hidden — без этой строки видны все ленты разом (урок Production, 17.11) */
.msg-feed[hidden] { display: none; }
.msg-item { max-width: 78%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
            background: var(--panel-2); }
.msg-item.out { align-self: flex-end; background: var(--panel); }
.msg-item.in { align-self: flex-start; border-color: var(--teal); }
.msg-item.question { border-color: var(--red); }
.msg-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font: 400 12.5px/1.3 var(--cond);
            color: var(--dim); margin-bottom: 6px; }
.msg-meta b { color: var(--text); font-weight: 600; }
.msg-text { white-space: pre-wrap; margin: 0; font: inherit; }
.msg-long > summary { cursor: pointer; list-style: none; }
.msg-long > summary::-webkit-details-marker { display: none; }
.msg-long[open] > summary .msg-text, .msg-long[open] > summary .sub { display: none; }
.msg-answer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.msg-answer label { display: block; }
.msg-answer textarea { width: 100%; }
.msg-answer-act { margin-top: 8px; }
.msg-close { margin-top: 8px; }
.q-badge { color: var(--red-text); font-weight: 600; white-space: nowrap; }
