/* contract-text.css — окно «Договор: текст» (2026-10-19g). Цвета — переменные темы. */
.ctx-overlay { position: fixed; inset: 0; z-index: 2180; /* над окнами заявки и клиента (≤ 2150), под переспросом (#confirm-modal 2200) */ background: rgba(15, 20, 30, .45); display: flex; justify-content: center; align-items: flex-start; padding: 24px 12px; overflow-y: auto; }
.ctx-panel { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; width: 100%; max-width: 920px; padding: 16px 18px; box-sizing: border-box; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.ctx-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.ctx-head-actions { display: flex; gap: 8px; align-items: center; }
.ctx-lock { background: rgba(214, 137, 16, .12); border: 1px solid rgba(214, 137, 16, .45); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.ctx-sec { margin: 14px 0; }
.ctx-sec h4 { margin: 0 0 8px; font-size: 14px; }
.ctx-cl { margin: 0 0 8px; }
.ctx-cl p, .ctx-special-ro { margin: 0 0 6px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.ctx-cl textarea, .ctx-special { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.45; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); resize: vertical; }
.ctx-edited textarea { border-color: var(--warning, #d68910); box-shadow: 0 0 0 1px var(--warning, #d68910) inset; }
.ctx-cl-bar { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.ctx-cl-bar:empty, .ctx-cl-bar:not(:has(:not([hidden]))) { display: none; }
.ctx-panel .ctx-reset[hidden] { display: none !important; }
.ctx-cl textarea { overflow-y: hidden; }
.ctx-badge { font-size: 12px; color: var(--warning, #b9770e); font-weight: 600; }
.ctx-hist { margin: 12px 0; font-size: 13px; }
.ctx-hist div { padding: 2px 0; }
.ctx-foot { position: sticky; bottom: -16px; background: var(--surface); border-top: 1px solid var(--border); padding: 10px 0; margin-top: 10px; display: flex; gap: 10px; }
.ctx-tpl { margin-top: 6px; }
@media (max-width: 600px) {
  .ctx-overlay { padding: 0; }
  .ctx-panel { border-radius: 0; min-height: 100vh; padding: 12px; }
  .ctx-panel .ctx-head-actions a, .ctx-panel .ctx-head-actions button, .ctx-panel .ctx-foot button, .ctx-panel .ctx-reset { min-height: 40px; height: auto; display: inline-flex; align-items: center; }
}
