/* Тесты и банк задач для сотрудников. Общие компоненты — components.css; здесь — только то, чего там нет.
   Источник вида — design/prototype/src/december.html (страницы s-tests, s-test, s-new, s-bank, s-task, окно #pick).
   Всё — внутри .staff-tests (обёртка каждого экрана): имена классов из макета не задевают чужие экраны. */

/* ===== Формы: настройки теста и задача ===== */
.staff-tests fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.staff-tests fieldset.field { margin-bottom: 14px; }
.staff-tests .lock-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surf2); color: var(--muted); font-size: 14px; }
.staff-tests .lock-note .i { color: var(--muted); margin-top: 1px; }
.staff-tests a.link { color: var(--pri-ink); font-weight: 700; text-underline-offset: 3px; }

/* ===== Задачи теста: слева состав, справа подбор из банка ===== */
.staff-tests .sec-t { margin: 0; font: 700 18px/1.25 var(--f-disp); letter-spacing: -0.02em; }
.staff-tests .les { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--surf); box-shadow: var(--shadow); }
.staff-tests .les + .les { margin-top: 10px; }
.staff-tests .les-list { list-style: none; margin: 0; padding: 0; }
.staff-tests .les .idx { font: 700 17px var(--f-disp); color: var(--muted); text-align: center; }
.staff-tests .les .tt { font-weight: 800; line-height: 1.3; }
.staff-tests .les .tt a { text-decoration: none; }
.staff-tests .les .tt a:hover { color: var(--pri-ink); }
.staff-tests .les .pt { font-weight: 800; white-space: nowrap; color: var(--muted); font-size: 14px; }
.staff-tests .les form { margin: 0; display: flex; gap: 2px; }
.staff-tests .les .rm { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; transition: background-color var(--t-fast), color var(--t-fast); }
.staff-tests .les .rm:hover { background: var(--surf2); color: var(--ink); }
.staff-tests .les .rm.del:hover { color: var(--bad-ink); }
.staff-tests .les .rm[disabled] { opacity: 0.35; cursor: default; background: none; color: var(--muted); }
.staff-tests .les .rm .i { width: 18px; height: 18px; }
.staff-tests .parts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.staff-tests .part { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--ok-t); color: var(--ok-ink); }
.staff-tests .part.na { background: var(--surf2); color: var(--muted); }
.staff-tests .part.miss { background: var(--bad-t); color: var(--bad-ink); }
.staff-tests .sum { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 14px 2px 0; }
.staff-tests .sum b { color: var(--ink); }
.staff-tests .pick-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.staff-tests .pick-tools .search { width: auto; grid-column: 1 / -1; background: var(--surf2); }
.staff-tests .pick-tools .row { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.staff-tests .pick { display: grid; }
.staff-tests .pick label { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; }
.staff-tests .pick label + label { border-top: 1px solid var(--line); }
.staff-tests .pick input { width: 20px; height: 20px; accent-color: var(--pri); margin: 0; }
.staff-tests .pick small { color: var(--muted); display: block; font-size: 13px; }
.staff-tests .pick .pt { color: var(--muted); font-size: 14px; white-space: nowrap; }
.staff-tests .pick-f { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.staff-tests .pick-f .muted { font-size: 14px; }

/* ===== Результаты теста, банк ===== */
.staff-tests .tbl .tt a { text-decoration: none; }
.staff-tests .tbl td.rate { white-space: nowrap; }
.staff-tests .tbl small.why { color: var(--warn-ink); }
.staff-tests .head .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.staff-tests .head .acts form { margin: 0; }
.staff-tests .search-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== Задача: карточка и форма с предпросмотром ===== */
.staff-tests .prev-l { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 4px; }
.staff-tests .prev-col { position: sticky; top: 150px; }
.staff-tests .kindsel { display: flex; flex-wrap: wrap; justify-self: start; background: var(--surf2); border-radius: 14px; padding: 4px; max-width: 100%; }
.staff-tests .kindsel label { position: relative; padding: 8px 16px; border-radius: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color var(--t-fast), background-color var(--t-fast); }
.staff-tests .kindsel label:hover { color: var(--ink); }
.staff-tests .kindsel input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.staff-tests .kindsel label:has(input:checked) { color: var(--ink); background: var(--surf); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.staff-tests .kindsel label:has(input:focus-visible) { outline: 2px solid var(--pri); outline-offset: -2px; }
.staff-tests .optrow { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 8px; }
.staff-tests .optrow input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ok); margin: 0; justify-self: center; }
.staff-tests .optrow .errorlist { grid-column: 2; }
/* Варианты нужны выбору, принимаемые ответы — короткому ответу: лишний блок прячем по выбранному типу */
.staff-tests .task-form:has(input[name="kind"][value="short_text"]:checked) .f-opts { display: none; }
.staff-tests .task-form:not(:has(input[name="kind"][value="short_text"]:checked)) .f-short { display: none; }
.staff-tests .answer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.staff-tests .answer-list li { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; }
.staff-tests .answer-list .i { color: var(--ok); margin-top: 2px; }
/* Предпросмотр и карточка задачи: переносы строк вопроса видны, как у ученика */
.staff-tests .q-card.static .q-text { white-space: pre-line; }
.staff-tests .q-card.static .q-text + .opts { margin-top: 14px; }
.staff-tests .explain { margin: 0; white-space: pre-line; }

@media (max-width: 1100px) {
  .staff-tests .prev-col { position: static; }
}
@media (max-width: 640px) {
  .staff-tests .les { grid-template-columns: 26px minmax(0, 1fr); }
  .staff-tests .les .pt, .staff-tests .les form { grid-column: 2; }
  .staff-tests .pick-tools { grid-template-columns: 1fr; }
}
