/* Vidicap Connect pages */
.cn-ok { color: var(--ok); } .cn-warn { color: #d48a00; } .cn-bad { color: var(--off); }
.cn-subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.cn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; margin: 14px 0; }
.cn-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.cn-stat b { font: 700 30px/1.1 ui-monospace, monospace; }
.cn-stat b small { font-size: 16px; font-weight: 600; }
.cn-problem { border-left: 4px solid var(--off); padding: 8px 12px; margin: 8px 0; background: var(--panel); border-radius: 6px; }
.cn-problem.warn { border-left-color: #d48a00; } .cn-problem.info { border-left-color: var(--accent); }
.cn-problem a { color: inherit; }
table.cn-t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cn-t td, table.cn-t th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.cn-t th { color: var(--muted); font-weight: 600; font-size: 12px; }
.cn-ward { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.cn-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; margin-top: 8px; }
.cn-bed { background: var(--panel); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.cn-bed h4 { margin: 0 0 6px; font-size: 16px; display: flex; justify-content: space-between; gap: 6px; }
.cn-dev { display: flex; gap: 6px; align-items: center; margin: 3px 0; flex-wrap: wrap; }
.cn-new { border-bottom: 1px solid var(--line); padding: 10px 0; }
.cn-new:last-child { border-bottom: 0; }
.cn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cn-row form { display: contents; }
.cn input:not([type=radio]):not([type=checkbox]), .cn select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; max-width: 100%; }
.cn details > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.cn-inline { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.cn-form { display: grid; gap: 14px; max-width: 760px; }
.cn-form > label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.cn-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.cn-radio { display: grid; gap: 6px; }
.cn-radio label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.cn-two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.cn-two label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.cn-note { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.cn pre { background: var(--panel); padding: 10px; border-radius: 8px; font-size: 12px; overflow: auto; white-space: pre; }
.cn-err { color: var(--off); font-size: 13px; font-weight: 400; }
.cn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 560px) { .cn-two { grid-template-columns: 1fr; } .cn-stat b { font-size: 24px; } }
.cn-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; margin: 6px 0 0 26px; }
.cn-params label { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 14px; }
.cn-params label.wide { grid-column: 1 / -1; }
.cn-params.all { opacity: .55; }
.cn-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cn-three label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.cn-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; width: 120px; }
.cn-bar i { display: block; height: 100%; background: var(--accent); }
.cn-ok { color: var(--ok); }
@media (max-width: 560px) { .cn-three { grid-template-columns: 1fr; } .cn-params { margin-left: 0; } }
.cn-form { grid-template-columns: minmax(0, 1fr); }
.cn-form select, .cn-form input { max-width: 100%; min-width: 0; }
.cn-radio label > span, .cn-params label { min-width: 0; overflow-wrap: anywhere; }
.cn-radio label > input, .cn-params label > input { flex: none; }

/* «Уведомления врачам» (connect.notify_pages) */
.cn-code { font: 700 44px/1.1 ui-monospace, monospace; letter-spacing: .12em; color: var(--accent); margin: 6px 0; }
.cn-code .cn-code-prefix { font-size: 24px; letter-spacing: .04em; color: var(--muted); }
.cn-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 400; }
.cn-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cn-switch i { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; display: inline-block; flex: none; }
.cn-switch i::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; }
.cn-switch input:checked + i { background: var(--accent); } .cn-switch input:checked + i::after { left: 16px; }
.cn-switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.cn-list { list-style: none; padding: 0; margin: 0; }
.cn-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cn-list li:last-child { border-bottom: 0; }
.cn-list li > :last-child { margin-left: auto; text-align: right; }
.cn-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--panel); color: var(--muted); white-space: nowrap; }
.cn-pill.ok { background: rgba(31, 157, 58, .12); color: var(--ok); } .cn-pill.warn { background: #fff6df; color: #d48a00; }
.cn-pill.bad { background: rgba(214, 50, 47, .12); color: var(--off); } .cn-pill.accent { background: var(--accent-soft); color: var(--accent); }
.cn-chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.cn-chain .step { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); display: grid; gap: 2px; min-width: 150px; }
.cn-chain .step b { font-size: 14px; } .cn-chain .step small { color: var(--muted); }
.cn-chain .arrow { color: var(--accent); font-size: 18px; }
.cn-mins { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.cn-mins input { width: 70px; text-align: right; }
.cn-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0 12px; }
.cn-filters form { display: contents; }
table.cn-t.cn-journal { font-size: 14px; } table.cn-journal td { vertical-align: middle; }
@media (max-width: 700px) { table.cn-journal th.opt, table.cn-journal td.opt { display: none; } table.cn-journal .cn-pill { white-space: normal; } }

/* «Интеграция»: the API's keys, journal and description (connect.api_pages) */
.cn-api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; align-items: stretch; }
.cn-api-grid > .card { margin-bottom: 0; }
table.cn-keys td { vertical-align: middle; } table.cn-journal td.sys { white-space: nowrap; }
@media (max-width: 700px) {
  table.cn-keys, table.cn-keys tbody { display: block; } table.cn-keys tr:first-child { display: none; }
  table.cn-keys tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.cn-keys td { display: block; border: 0; padding: 0; } table.cn-keys td.opt { display: block; color: var(--muted); font-size: 13px; }
  table.cn-keys td.act { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
}
.cn-method { display: inline-block; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .04em; padding: 4px 7px; border-radius: 6px; color: #fff; background: var(--muted); vertical-align: middle; }
.cn-method.get { background: #1f9d3a; } .cn-method.put { background: var(--accent); } .cn-method.del { background: var(--off); } .cn-method.post { background: #2563eb; }
.cn-secret { font: 500 15px/1.5 ui-monospace, monospace; background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 8px; padding: 10px 12px; word-break: break-all; user-select: all; }
.cn-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; align-items: baseline; }
.cn-kv dt { color: var(--muted); } .cn-kv dd { margin: 0; }
.cn-next { color: var(--muted); font-size: 13px; }
.cn-path { font: 500 13px/1.4 ui-monospace, monospace; word-break: break-all; }
.cn-docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.cn-toc { position: sticky; top: 12px; display: grid; gap: 2px; padding: 8px; }
.cn-toc a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.cn-toc a:hover, .cn-toc a.active { background: var(--accent-soft); color: var(--accent); }
.cn-toc a.next { color: var(--muted); }
.cn-docs h2 { margin: 0 0 8px; } .cn-docs section.card { scroll-margin-top: 12px; }
.cn-op { padding: 14px 0; border-top: 1px solid var(--line); }
.cn-op h3 { margin: 0 0 6px; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cn-op h3 code { font: 600 15px/1.3 ui-monospace, monospace; word-break: break-all; }
.cn-op pre { background: #2b2b2e; color: #f3f3f4; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-op pre.req { background: var(--panel); color: var(--ink); }
.cn-op table { font-size: 13px; border-collapse: collapse; margin: 6px 0; width: 100%; }
.cn-op td { padding: 4px 8px 4px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.cn-op td:first-child { font-family: ui-monospace, monospace; white-space: nowrap; }
.cn-docs .text p { margin: 0 0 8px; } .cn-docs .text code, .cn-op .desc code, .cn-api-grid code, .cn-api-hint code { font: 500 .92em ui-monospace, monospace; background: var(--panel); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 760px) { .cn-docs { grid-template-columns: 1fr; } .cn-toc { position: static; display: flex; flex-wrap: wrap; } }

/* «Запись кривых»: the module's page (connect/waves.html) */
.cn-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cn-grid2 .card { margin: 0; }
.cn-crumbs a { color: var(--accent); }
.cn-waves table.cn-t td.r { text-align: right; }
.cn-waves table.cn-t td:first-child { color: var(--muted); width: 40%; }
.cn-codes label.cn-pill { cursor: pointer; margin: 2px 0 2px 4px; }
.cn-codes label.cn-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cn-days { width: 80px; text-align: right; }
.cn-bar.wide { width: 100%; margin-top: 6px; }
.cn-waves .cn-pill { font-size: 13px; }
@media (max-width: 800px) { .cn-grid2 { grid-template-columns: 1fr; } .cn-waves table.cn-t td:first-child { width: auto; } }
/* stages 2–4 of the API: the webhooks, «Приём ADT», «Выгрузка в папку» */
.cn-hooks li > span:first-child { min-width: 0; } .cn-hooks .cn-path { display: inline-block; max-width: 100%; }
.cn-kv dd code { font-size: 13px; }
/* «Стенд: виртуальная реанимация» (connect.stand.pages, connect/stand.html) */
.cn-stand h1 .cn-pill { font-size: 13px; vertical-align: middle; margin-left: 6px; }
.cn-stand-stats { margin: 6px 0 14px; } .cn-stand-stats .cn-stat b { font-size: 24px; }
.cn-stand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.cn-tile { display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); color: var(--ink); text-decoration: none; font-size: 13px; }
.cn-tile:hover { text-decoration: none; border-color: var(--accent); } .cn-tile b { font-size: 14px; } .cn-tile small { font-size: 12px; }
.cn-tile.alarm { background: rgba(214, 50, 47, .10); border-color: rgba(214, 50, 47, .45); }
.cn-tile.warn { background: #fff6df; border-color: #d48a00; }
.cn-tile.off { color: var(--muted); background: var(--card); } .cn-tile.off b { color: var(--muted); }
.cn-tile.night { background: var(--card); }
.cn-tile.selected { outline: 2px solid var(--accent); outline-offset: -1px; }
.cn-scen form { display: contents; }
.cn-stand pre.cn-stand-report { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-stand table.cn-t td.r { text-align: right; } .cn-stand table.cn-t td:first-child { color: var(--muted); }
/* «Демо-режим» (connect.stand.demo_pages): the DEMO bar, the wizard, the floating remote */
.demo-bar { background: var(--accent); color: #fff; padding: 8px 20px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-bar b { letter-spacing: .04em; } .demo-bar span { flex: 1; min-width: 200px; }
.demo-bar-btn { background: #fff; color: var(--accent); border-radius: 999px; padding: 3px 12px; font-weight: 600; text-decoration: none; font-size: 13px; border: 0; font-family: inherit; cursor: pointer; }
.demo-bar-fire { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .demo-bar-fire-label { opacity: .85; font-size: 13px; }
.demo-bar-fire .demo-bar-btn:active { background: #ffe3cc; }
@media (max-width: 720px) { .demo-bar-fire { flex-basis: 100%; } }
.cn-demo h1 .cn-pill { font-size: 13px; vertical-align: middle; margin-left: 6px; }
.cn-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.cn-step { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--panel); color: var(--muted); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.cn-step.on { background: var(--accent); color: #fff; }
.cn-demo textarea { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 8px; border: 1px solid var(--line); font: inherit; background: var(--card); color: var(--ink); }
.cn-demo-form .cn-row input[type=text] { min-width: 0; }
.cn-dep { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.cn-dep-head input[type=text] { font-weight: 600; flex: 1; }
.cn-wards { margin: 4px 0 4px 12px; } .cn-ward-row input[type=text] { width: 140px; } .cn-ward-row input[type=number], .cn-dep input[type=number] { width: 64px; }
.cn-an input[type=text] { width: 180px; }
.cn-x { padding: 2px 8px; line-height: 1; }
.cn-eq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 10px 0; }
.cn-eq-tile { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); cursor: pointer; font-size: 14px; }
.cn-eq-tile > span:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cn-eq-tile input[type=checkbox], .cn-eq-tile input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
.cn-eq-tile.off { color: var(--muted); background: var(--panel); cursor: default; }
.cn-eq-tile:has(input:checked) { border-color: var(--accent); }
.cn-accounts { max-width: 420px; } .cn-accounts td { padding: 4px 8px; }
.cn-qr { display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; } .cn-qr svg { width: 140px; height: 140px; }
.cn-guest-link { overflow-wrap: anywhere; font-size: 13px; }
.cn-demo-now, .cn-remote-now { background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.cn-remote { position: fixed; right: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px); overflow: auto; z-index: 50;
  background: #1f2328; color: #e8eaed; border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); font-size: 13px; padding: 0 12px 10px; }
.cn-remote .cn-remote-head { position: sticky; top: 0; background: #1f2328; padding: 10px 0 6px; display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cn-remote-toggle { margin-left: auto; background: #343a40; color: #fff; border: 0; border-radius: 6px; width: 26px; height: 26px; font-size: 16px; cursor: pointer; }
.cn-remote.folded { overflow: hidden; padding-bottom: 0; } .cn-remote.folded .cn-live { display: none; } .cn-remote.folded .cn-remote-head { padding-bottom: 10px; }
.cn-remote .btn { background: #343a40; color: #fff; border-color: #343a40; } .cn-remote .btn.accent { background: var(--accent); border-color: var(--accent); } .cn-remote .btn.danger { background: #d6322f; border-color: #d6322f; }
.cn-remote .cn-row { margin: 6px 0; } .cn-remote select { background: #343a40; color: #fff; border: 0; border-radius: 6px; padding: 4px 6px; max-width: 100%; }
.cn-remote .muted { color: #9aa0a6; } .cn-remote .cn-remote-now, .cn-remote .cn-remote-next { background: #2b3036; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.cn-remote .cn-remote-now b, .cn-remote .cn-remote-next b { color: #ffb380; }
.cn-remote-feed { border-top: 1px solid #343a40; margin-top: 8px; padding-top: 6px; } .cn-remote-feed b { color: #ffb380; } .cn-remote-feed p { margin: 3px 0; }
.cn-remote .cn-pill { background: #343a40; color: #e8eaed; } .cn-remote .cn-pill.accent { background: var(--accent); color: #fff; } .cn-remote .cn-pill.bad { background: #d6322f; color: #fff; }
@media (max-width: 700px) { .cn-steps { grid-template-columns: 1fr 1fr; } .cn-remote { right: 8px; left: 8px; bottom: 64px; width: auto; max-height: 60vh; } }
/* «Подписи для проектора» (connect/demo_captions.js): a large caption of the event over the top of the page */
.cn-captions { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 1100px);
  background: rgba(20, 20, 24, .92); color: #fff; font-size: clamp(20px, 2.6vw, 34px); font-weight: 600; line-height: 1.25;
  padding: 16px 28px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border-left: 10px solid var(--accent);
  opacity: 0; transition: opacity .3s; pointer-events: none; text-align: center; }
.cn-captions.show { opacity: 1; } .cn-captions.bad { border-left-color: var(--off); }
.cn-captions-toggle { cursor: pointer; } .cn-captions-toggle input { vertical-align: middle; }
/* the public demo server (settings.DEMO_SERVER): the banner on every page */
.demo-server-bar { background: #1f2430; color: #fff; padding: 6px 20px; font-size: 13px; text-align: center; }
.demo-server-bar a { color: #ffd199; }
@media print { .demo-bar, .cn-remote, .cn-captions, .demo-server-bar { display: none !important; } }
.cn-dep > summary { cursor: pointer; font-size: 14px; } .cn-dep[open] > summary { margin-bottom: 6px; }
.cn-remote form, .cn-remote .cn-row form { display: contents; }
.cn-dep-head select, .cn-an select, .cn-dep-head input[type=text], .cn-an input[type=text] { width: auto; flex: 0 1 auto; }
.cn-dep-head input[type=text] { flex: 1 1 160px; }
.cn-speed { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 600; }
.cn-speed input { accent-color: var(--accent); margin: 0; } .cn-speed:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
