/* Рабочее пространство организации (ws-*.js): анкеты, реестры, оценки, документы. Токены — из styles.css. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.req { color: var(--red); }

.ws-block { min-width: 0; border: 0; margin: 0 0 22px; padding: 18px 20px 6px; background: var(--surface); border-radius: var(--radius); }
.ws-block legend { float: left; width: 100%; font-weight: 700; font-size: 17px; margin-bottom: 12px; padding: 0; }
.ws-block legend + * { clear: both; }
.ws-form__actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin-top: 0; z-index: 2; }
.field small.muted { font-weight: 400; }
.field[hidden] { display: none; }
.chips--form { margin: 4px 0 0; }
.chips--form .chip { font-size: 14px; padding: 7px 12px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

.ws-subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ws-subnav a { padding: 7px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.ws-subnav a:hover { background: var(--surface); color: var(--primary); }
.ws-subnav a.is-on { background: var(--primary-soft); color: var(--primary); }

.ws-items { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.ws-item { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 14px 16px; background: var(--surface); border-radius: 10px; }
.ws-item__main { min-width: 0; }
.ws-item__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.ws-task.is-done .ws-item__main b, .ws-task.is-dismissed .ws-item__main b { text-decoration: line-through; color: var(--muted); }
.ws-editor { margin-top: 14px; }
.ws-editor h4 { margin: 0 0 12px; }
.ws-task-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.ws-task-add .field { flex: 1 1 320px; margin: 0; }

.ws-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.ws-stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border-radius: 10px; text-decoration: none; color: inherit; }
.ws-stat b { font-size: 24px; }
.ws-stat span { color: var(--muted); font-size: 14px; }
.ws-stat:hover b { color: var(--primary); }

.ws-level { display: inline-block; min-width: 64px; text-align: center; padding: 6px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 750; white-space: nowrap; }
.ws-level--range { background: var(--amber-soft); color: var(--amber); }
.ws-level--none { background: var(--bg); color: var(--muted); font-weight: 600; }
.ws-result { margin-bottom: 14px; }
.ws-result__head { display: flex; gap: 14px; align-items: center; }
.ws-result__head h3 { margin: 0; }
.ws-result h4 { margin: 16px 0 6px; font-size: 15px; }
.ws-facts { margin: 0; padding-left: 20px; }
.ws-facts li { margin: 4px 0; }
.ws-facts--warn li::marker { color: var(--amber); }
.norm a { color: var(--primary); }
.norm__conf { color: var(--amber); font-size: 13px; }

.ws-scenario ol { margin: 10px 0 0; padding-left: 20px; }
.ws-scenario li { margin: 6px 0; }
.ws-login { margin: 14px 0; }

.ws-measures td { font-size: 14px; }
.ws-measures__group td { background: var(--bg); }
.ws-measure { display: grid; gap: 6px; min-width: 240px; }
.ws-measure select, .ws-measure input { font: inherit; font-size: 14px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; width: 100%; }

.norms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.norms__dir { margin: 28px 0 12px; font-size: 22px; }
.norm-card h3 { font-size: 17px; margin: 8px 0; }
.norm-card.is-off { opacity: .7; }
.norm-card__dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; margin: 8px 0 12px; font-size: 14px; }
.norm-card__dl dt { color: var(--muted); }
.norm-card__dl dd { margin: 0; }

.ws-doc { display: grid; gap: 8px; }
.ws-doc__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ws-doc__head h3 { margin: 0; font-size: 17px; }
.ws-doc details summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; }
.ws-doc dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; font-size: 14px; margin: 8px 0; }
.ws-doc dt { color: var(--muted); }
.ws-doc dd { margin: 0; }
.ws-doc__upload { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ws-doc__upload-field { display: grid; gap: 6px; flex: 1 1 280px; min-width: 0; }
.ws-doc__upload-field > label { font-size: 14px; font-weight: 700; color: var(--text); }
.ws-doc__upload input[type=file] { display: block; width: 100%; max-width: 100%; padding: 9px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface); font: inherit; font-size: 14px; }
.ws-doc__upload-hint, .ws-doc__filename { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.ws-doc__filename.is-selected { color: var(--primary); font-weight: 650; }
.ws-doc__upload > .check-row { margin: 0 2px 8px; }
.ws-findings { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.ws-findings li { margin: 6px 0; }
.ws-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

@media (max-width: 720px) {
  .ws-item { flex-direction: column; }
  .ws-item__actions { justify-content: flex-start; }
  .ws-block { padding: 14px 14px 4px; }
  .norm-card__dl, .ws-doc dl { grid-template-columns: 1fr; }
  .norm-card__dl dt, .ws-doc dt { margin-top: 6px; }
}

.ws-offer { display: flex; flex-direction: column; gap: 6px; }
.ws-offer h3 { margin: 0; font-size: 17px; }
.ws-offer__price { font-weight: 700; color: var(--primary); margin: 0; }
.ws-offer .btn { align-self: flex-start; margin-top: auto; }
.ws-dialog { max-width: 760px; width: calc(100% - 32px); border: 0; border-radius: var(--radius); padding: 22px; background: var(--bg); }
.ws-dialog::backdrop { background: rgba(8, 19, 15, .5); }
.ws-dialog h2 { margin-top: 0; }

/* Широкие таблицы (меры, показатели, журнал) прокручиваются внутри блока, а не расширяют страницу */
.cab__main, #cab-body { min-width: 0; }
.table-wrap { max-width: 100%; position: relative; }
