/* screens-d: S11, S12 */

/* ════════ S11. Результат курса и выписка ════════ */
.s11 { gap: 16px; }
.s11-metrics { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; height: 132px; }
.s11-m {
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  padding: 14px 20px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-card);
  box-shadow: var(--sh-1); font: inherit; color: inherit; min-width: 0;
}
.s11-m.is-click { cursor: pointer; transition: border-color 150ms, box-shadow 150ms; }
.s11-m.is-click:hover { border-color: var(--teal-300); }
.s11-m.is-active { border-color: var(--teal-700); box-shadow: 0 0 0 1px var(--teal-700), var(--sh-1); }
.s11-m__label { font-size: 14px; color: var(--gray-600); font-weight: 500; }
.s11-m__nums { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.s11-m__before { font-size: 40px; line-height: 1; font-weight: 600; color: var(--gray-400); }
.s11-m__after { font-size: 40px; line-height: 1; font-weight: 700; color: var(--navy-900); }
.s11-m__arrow { flex: none; }
.s11-m__arrow path { fill: none; stroke: var(--teal-700); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.s11-m__unit { font-size: 16px; color: var(--gray-600); align-self: flex-end; padding-bottom: 3px; }
.s11-m__foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.s11-m__foot .chip { padding: 3px 8px; font-size: 12px; }
.s11-m__note { font-size: 12px; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.s11-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 7fr 5fr; gap: 24px; }
.s11-ff { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; padding: 16px 20px; }
.s11-ff__head { display: flex; align-items: center; gap: 12px; }
.s11-ff__legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); }
.s11-tick { display: inline-block; width: 2px; height: 14px; background: var(--navy-900); }
.s11-ff .ch-bars { flex: none; gap: 2px; }
.s11-ff .ch-bars > .ch-legend { margin-bottom: 2px; }
.s11-ff .ch-bars__row { padding: 4px 8px; }
.s11-ff .ch-bars__label { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
.s11-ff .ch-bars__note { align-self: center; padding: 1px 6px; background: var(--teal-100); }
.s11-mini__cap { font-size: 13px; font-weight: 600; color: var(--navy-900); margin-top: 2px; }
.s11-mini { flex: none; min-height: 0; }

.s11-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.s11-goals { padding: 16px 20px; flex: none; }
.s11-goals__body { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.s11-goals__body > :first-child { flex: none; }
.s11-goals__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.s11-goals__list li { display: flex; gap: 8px; align-items: flex-start; }
.s11-goals__list li .icon { margin-top: 1px; }
.s11-goals__list li.is-ok .icon { color: var(--success-700); }
.s11-goals__list li.is-no .icon { color: var(--warning-700); }
.s11-goals__text { font-size: 13px; line-height: 1.3; color: var(--gray-900); }
.s11-goals__actual { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

.s11-sim { padding: 16px 20px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.s11-box { position: relative; height: 56px; margin: 6px 4px 0; }
.s11-box__range { position: absolute; top: 15px; height: 2px; background: var(--gray-400); }
.s11-box__range::before, .s11-box__range::after { content: ''; position: absolute; top: -6px; width: 2px; height: 14px; background: var(--gray-400); }
.s11-box__range::before { left: 0; } .s11-box__range::after { right: 0; }
.s11-box__iqr { position: absolute; top: 4px; height: 24px; background: var(--teal-100); border: 1px solid var(--teal-300); border-radius: 4px; }
.s11-box__med { position: absolute; top: 2px; width: 2px; height: 28px; margin-left: -1px; background: var(--navy-900); }
.s11-box__me { position: absolute; top: 8px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--success-700); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--success-700); z-index: 2; }
.s11-box__mev { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--success-700); white-space: nowrap; }
.s11-box__tick { position: absolute; top: 36px; transform: translateX(-50%); font-size: 12px; color: var(--gray-600); white-space: nowrap; }
.s11-sim__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--gray-600); }
.s11-sim__legend span { display: inline-flex; align-items: center; gap: 6px; }
.s11-lg { display: inline-block; flex: none; }
.s11-lg--range { width: 14px; height: 2px; background: var(--gray-400); }
.s11-lg--iqr { width: 14px; height: 10px; background: var(--teal-100); border: 1px solid var(--teal-300); border-radius: 2px; }
.s11-lg--med { width: 2px; height: 12px; background: var(--navy-900); }
.s11-lg--me { width: 10px; height: 10px; border-radius: 50%; background: var(--success-700); }
.s11-sim__above { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--success-700); }

.s11-summary {
  margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--success-100); border-radius: var(--r-card); color: #1D5A37; font-size: 14px; font-weight: 600; line-height: 1.35;
}

/* ════════ S12. Помощник реабилитационной команды ════════ */
.s12 { gap: 12px; }
.s12 .tabs { align-items: center; }
.s12-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.s12-bar { flex: none; display: flex; align-items: center; }
.s12-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--gray-100); border-radius: var(--r-ctrl); }
.s12-seg__btn { height: 32px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent; color: var(--gray-600); font-size: 14px; }
.s12-seg__btn:hover { color: var(--navy-900); }
.s12-seg__btn.is-active { background: var(--white); color: var(--navy-900); font-weight: 600; box-shadow: var(--sh-1); }

.s12-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 3fr 6fr 3fr; gap: 24px; }

.s12-docs { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; }
.s12-docs__list { display: flex; flex-direction: column; gap: 6px; }
.s12-doc {
  display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; align-items: start; text-align: left;
  padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: var(--r-ctrl); background: var(--white); color: var(--gray-900); font-size: 13px; line-height: 1.3;
}
.s12-doc .icon { color: var(--gray-600); }
.s12-doc:hover { border-color: var(--teal-300); }
.s12-doc.is-active { border-color: var(--teal-700); background: var(--teal-100); }
.s12-doc.is-active .icon { color: var(--teal-700); }
.s12-doc__title { font-weight: 500; }
.s12-doc__st { grid-column: 2; justify-self: start; padding: 2px 8px; font-size: 12px; }
.s12-doc__st.chip--plain { background: var(--gray-100); color: var(--gray-600); }

.s12-center { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.s12-sheet {
  flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--white);
  border-radius: 4px; box-shadow: var(--sh-2); padding: 28px 48px 20px; cursor: text;
}
.s12-sheet__org { flex: none; font-size: 11px; color: var(--gray-600); text-align: center; padding-bottom: 10px; border-bottom: 1px solid var(--gray-200); }
.s12-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding-top: 12px; padding-right: 6px; }
.s12-sheet__title { margin: 0 0 10px; text-align: center; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: var(--navy-900); }
.s12-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; color: var(--gray-900); user-select: text; }
.s12-n { border-radius: 3px; transition: background-color 400ms; }
.s12-n.is-hl { animation: s12NumHl 400ms ease-out both; }
@keyframes s12NumHl { from { background: var(--teal-100); } to { background: transparent; } }
.s12-caret { display: inline-block; width: 2px; height: 18px; margin-left: 1px; vertical-align: text-bottom; background: var(--teal-700); animation: s12Blink 1s steps(1) infinite; }
@keyframes s12Blink { 50% { opacity: 0; } }
.s12-inserted { border-radius: 3px; }
.s12-inserted.is-new { background: var(--teal-100); animation: s12Ins 1600ms ease-out 400ms both; }
@keyframes s12Ins { from { background: var(--success-100); } to { background: var(--teal-100); } }
.s12-sheet__foot { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--gray-300); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.s12-sign { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px dashed var(--gray-300); border-radius: 6px; color: var(--gray-600); font-size: 13px; }
.s12-sign.is-signed { border-style: solid; border-color: var(--success-700); background: var(--success-100); color: #1D5A37; }

.s12-other__row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.s12-other__row b { font-weight: 500; color: var(--gray-600); text-align: right; white-space: nowrap; }

.s12-btns { flex: none; display: flex; align-items: center; gap: 12px; }
.s12-btns__spacer { flex: 1; }
.s12-send { position: relative; }
.s12-send:disabled { cursor: default; }
.s12-send:disabled:not(.is-busy) { background: var(--success-700); }
.s12-spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: var(--white); border-radius: 50%; animation: s12Spin 700ms linear infinite; }
.s12-send.is-busy .s12-spin { display: inline-block; }
.s12-send.is-busy .icon { display: none; }
@keyframes s12Spin { to { transform: rotate(360deg); } }
.s12-toast { display: none; }
.s12-toast.is-on {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-ctrl);
  background: var(--success-100); color: #1D5A37; font-size: 14px; font-weight: 600; animation: eksRise 400ms var(--ease-in) both;
}

.s12-check { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 16px; }
.s12-check__all { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; background: var(--success-100); color: #1D5A37; font-size: 13px; font-weight: 600; }
.s12-check__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; min-height: 0; }
.s12-check__item { display: flex; align-items: flex-start; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 13px; line-height: 1.3; color: var(--gray-400); }
.s12-check__item .icon { margin-top: 1px; }
.s12-check__item.is-lit { color: var(--gray-900); }
.s12-check__item.is-ok.is-lit .icon { color: var(--success-700); }
.s12-check__item.is-miss { flex-wrap: wrap; }
.s12-check__item.is-miss.is-lit { background: var(--warning-100); color: var(--warning-text); font-weight: 600; }
.s12-check__item.is-miss .icon { color: var(--warning-700); }
.s12-check__item.is-miss > span { flex: 1; min-width: 0; }
.s12-add { margin-left: 24px; height: 26px; }
.s12-metric { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--teal-100); color: var(--navy-700); font-size: 13px; font-weight: 600; line-height: 1.3; }
.s12-metric .icon { color: var(--teal-700); }

/* ——— Сводка перед обходом ——— */
.s12-brief { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; }
.s12-brief__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.s12-brief__head .card__sub { margin-top: 4px; }
.s12-brief__cols { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; padding-right: 4px; }
.s12-brief__group { display: flex; flex-direction: column; gap: 8px; }
.s12-brief__gt { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--navy-900); }
.s12-brief__item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--gray-200); border-left: 3px solid var(--success-700);
  border-radius: var(--r-ctrl); background: var(--white); font: inherit; color: inherit;
}
button.s12-brief__item:hover { border-color: var(--teal-300); border-left-color: inherit; }
.s12-brief__item--danger { border-left-color: var(--danger-700); background: var(--danger-100); }
.s12-brief__item--warning { border-left-color: var(--warning-700); background: var(--warning-100); }
.s12-brief__name { font-size: 14px; font-weight: 600; color: var(--navy-900); }
.s12-brief__text { font-size: 13px; line-height: 1.4; color: var(--gray-900); margin-top: 4px; }

@media print {
  .s12-sheet__body, .s12-brief__cols { overflow: visible; }
}
