/* Часть стилей ЗамерПро. Исходный public/css/app.css разбит для надёжной загрузки через туннель. */
html[data-theme="light"] .viewer-toolbar .tool-btn { background: rgba(255, 255, 255, .85); border-color: var(--line-2); color: var(--ink-2); }
html[data-theme="light"] .viewer-toolbar .tool-btn:hover { background: #fff; color: var(--ink); }
html[data-theme="light"] .viewer-tabs { background: var(--surface-3); border-color: var(--line); }
html[data-theme="light"] .viewer-tabs button.is-active { background: #fff; color: var(--ink); }
html[data-theme="light"] .viewer-hint { background: rgba(255, 255, 255, .9); border-color: var(--line); color: var(--muted); }
html[data-theme="light"] .viewer-hint b { color: var(--ink-2); }
html[data-theme="light"] .measure-panel { background: var(--surface); }
html[data-theme="light"] .param-card { background: var(--surface-2); border-color: var(--line); }
html[data-theme="light"] .param-input { background: #fff; }
html[data-theme="light"] .param-input input { color: var(--ink); }
html[data-theme="light"] .param-note input { background: #fff; }
html[data-theme="light"] .param-note-btn { background: #fff; }
html[data-theme="light"] .status-select { background: var(--surface-2); }
html[data-theme="light"] .status-select button.is-active { background: #fff; color: var(--ink); }
html[data-theme="light"] .step-pick { background: var(--surface-2); }
html[data-theme="light"] .step-pick button.is-active { background: #fff; color: var(--accent); }
html[data-theme="light"] .summary-strip { background: linear-gradient(180deg, #ffffff, #f3f7fc); border-color: var(--line-2); }
html[data-theme="light"] .ss-value { color: var(--ink); }
html[data-theme="light"] .node-nav { background: linear-gradient(180deg, #ffffff, #f4f8fc); }
html[data-theme="light"] .nn-btn { background: var(--surface-2); }
html[data-theme="light"] .nn-dot { background: var(--surface-2); }
html[data-theme="light"] .photo-add { background: var(--surface-2); }
html[data-theme="light"] .modal { background: var(--surface); }
html[data-theme="light"] .modal-backdrop { background: rgba(15, 23, 42, .45); }
html[data-theme="light"] .demo-btn { background: var(--surface-2); }
html[data-theme="light"] .toast { background: #1e293b; border-color: #334155; }
html[data-theme="light"] .toast.ok { background: #065f46; }
html[data-theme="light"] .toast.err { background: #991b1b; }
html[data-theme="light"] .toast.warn { background: #92400e; }
html[data-theme="light"] .bottom-nav { background: rgba(255, 255, 255, .96); }
html[data-theme="light"] .save-bar { background: rgba(255, 255, 255, .94); }
html[data-theme="light"] .drawer-veil { background: rgba(15, 23, 42, .35); }
html[data-theme="light"] .login-wrap { background: radial-gradient(900px 520px at 14% -10%, #cfe0f7 0%, transparent 58%), radial-gradient(760px 460px at 108% 108%, #dbe6f8 0%, transparent 55%), #eef2f7; }
html[data-theme="light"] .login-card { background: var(--surface); }
html[data-theme="light"] .elevation-scroll .room-svg { filter: none; }
html[data-theme="light"] .photo-badge { background: rgba(180, 83, 9, .92); color: #fff; }
html[data-theme="light"] .measure-overlay { background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #eef3fa 70%); }
html[data-theme="light"] .mo-node, html[data-theme="light"] .mo-value span, html[data-theme="light"] .mo-label { color: var(--ink); }
html[data-theme="light"] .mo-btn { background: linear-gradient(180deg, #ffffff, #eef3fa); color: var(--ink); border-color: var(--line-2); }
html[data-theme="light"] .mo-close { background: var(--surface-2); }
html[data-theme="light"] .mo-nav { background: var(--surface-2); color: var(--ink-2); }
html[data-theme="light"] .mo-nav.mo-primary { color: #fff; }
html[data-theme="light"] .mo-step { background: var(--surface-2); }
html[data-theme="light"] .mo-preset { background: #fff; }
html[data-theme="light"] .mo-key { background: linear-gradient(160deg, #ede9fe, #e0e7ff); color: #4c1d95; }

.theme-btn { width: 36px; height: 36px; }
@media (max-width: 860px) { .theme-btn { width: 32px; height: 32px; } }

/* ---------- чек-лист готовности кабинета ---------- */
.checklist {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, #121d2e, #0b121b);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
}
.checklist.is-done { border-color: rgba(52, 211, 153, .35); background: linear-gradient(180deg, #0f2a25, #0b1a18); }
.cl-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--warn); }
.checklist.is-done .cl-title { color: var(--ok); }
.cl-items { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.cl-item { display: flex; flex-direction: column; gap: 1px; }
.cl-item span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 700; }
.cl-item b { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 650; }
.cl-item.warn b { color: var(--warn); }
.cl-item.ok b { color: var(--ok); }
.node-lacks { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.node-lacks span {
  font-size: 10px; font-weight: 650; color: var(--warn);
  background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, .25);
  border-radius: 5px; padding: 1px 6px;
}

/* ---------- этикетка кабинета ---------- */
.label-sheet { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.label-card {
  width: 100%; max-width: 430px; border: 2px solid #0f172a; border-radius: 14px;
  background: #fff; color: #0f172a; padding: 16px 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
}
.label-head { grid-column: 1 / -1; border-bottom: 1px solid #cbd5e1; padding-bottom: 7px; }
.label-school { font-size: 13px; font-weight: 700; }
.label-place { font-size: 11px; color: #475569; }
.label-room { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.label-kind { font-size: 12px; color: #475569; margin-top: 2px; }
.label-resp { font-size: 11px; color: #475569; margin-top: 6px; }
.label-qr { display: grid; place-items: center; }
.qr-svg { border-radius: 6px; }
.label-url { font-family: var(--mono); font-size: 10.5px; color: var(--muted); word-break: break-all; text-align: center; max-width: 430px; }
.label-hint { font-size: 11px; color: var(--muted-2); text-align: center; }

@media print {
  body.printing-label * { visibility: hidden !important; }
  body.printing-label #label-sheet,
  body.printing-label #label-sheet * { visibility: visible !important; }
  body.printing-label #label-sheet { position: fixed; inset: 0; padding: 20mm; background: #fff; }
  body.printing-label .label-card { border-color: #000; }
}

/* ---------- баннер установки ---------- */
.install-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 250;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, 94vw);
  background: rgba(17, 26, 40, .97); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 10px 12px; box-shadow: var(--shadow-3);
}
.ib-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-hi); display: grid; place-items: center; flex: none; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-text b { font-size: 12.5px; color: var(--ink); }
.ib-text span { font-size: 11px; color: var(--muted); }
@media (max-width: 860px) { .install-banner { bottom: 72px; } }

html[data-theme="light"] .checklist { background: #fff; }
html[data-theme="light"] .install-banner { background: #fff; }
html[data-theme="light"] .label-card { border-color: #0f172a; }

/* ---------- выбор узлов и массовые операции ---------- */
.node-card.is-selectable { cursor: pointer; position: relative; }
.node-card.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pick-box {
  position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px;
  border-radius: 7px; border: 2px solid var(--line-2); background: rgba(8, 13, 21, .8);
  display: grid; place-items: center; color: #fff;
}
.node-card.is-picked .pick-box { background: var(--accent); border-color: var(--accent); }
.sel-bar {
  position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 14px -18px -18px; padding: 11px 18px;
  background: rgba(8, 13, 21, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: max(11px, env(safe-area-inset-bottom));
}
.sel-count { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.sel-bar .spacer { flex: 1; }

/* ---------- история изменений ---------- */
.history { display: flex; flex-direction: column; gap: 9px; }
.hist-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.hist-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.hist-head .avatar { width: 22px; height: 22px; font-size: 9px; }
.hist-head b { color: var(--ink-2); font-size: 12px; }
.hist-head .spacer { flex: 1; }
.hist-time { color: var(--muted-2); font-size: 11px; }
.hist-row { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-top: 5px; flex-wrap: wrap; }
.hist-lbl { color: var(--ink-2); }
.hist-from { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-3); border-radius: 5px; padding: 1px 6px; }
.hist-arrow { color: var(--muted-2); }
.hist-to { font-family: var(--mono); font-size: 11px; color: var(--ok); background: var(--ok-soft); border-radius: 5px; padding: 1px 6px; }

/* ---------- печатные документы ---------- */
#print-area { display: none; }
body.printing-sheet > *:not(#print-area) { display: none !important; }
body.printing-sheet #print-area { display: block !important; padding: 14mm 12mm; background: #fff; color: #000; font-family: "Segoe UI", Arial, sans-serif; font-size: 11.5px; }
body.printing-sheet .ps-head { margin-bottom: 10px; border-bottom: 2px solid #000; padding-bottom: 8px; }
body.printing-sheet .ps-title { font-size: 18px; font-weight: 800; letter-spacing: .04em; }
body.printing-sheet .ps-org { font-size: 12px; margin-top: 3px; color: #333; }
body.printing-sheet .ps-meta { width: 100%; border-collapse: collapse; margin-top: 8px; }
body.printing-sheet .ps-meta td { border: 1px solid #999; padding: 5px 7px; font-size: 11px; width: 25%; vertical-align: top; }
body.printing-sheet .ps-meta span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: #666; }
body.printing-sheet .ps-meta b { font-size: 12px; }
body.printing-sheet .ps-elev { border: 1px solid #999; padding: 6px; margin: 10px 0; }
body.printing-sheet .ps-elev svg { display: block; width: 100%; height: auto; }
body.printing-sheet .ps-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
body.printing-sheet .ps-table th, body.printing-sheet .ps-table td { border: 1px solid #999; padding: 4px 6px; font-size: 10.5px; }
body.printing-sheet .ps-table th { background: #eef2f7; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
body.printing-sheet .ps-table .num { text-align: right; font-variant-numeric: tabular-nums; }
body.printing-sheet .ps-table tfoot td { font-weight: 700; background: #f6f8fb; }
body.printing-sheet .ps-sign { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 11.5px; }
@page { margin: 10mm; }

/* ---------- тип подоконника ---------- */
.sill-block {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px; margin-bottom: 10px;
}
.sill-title { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 700; margin-bottom: 7px; }
.sill-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sill-pick button {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 8px 9px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer; text-align: left;
  font-size: 12px; font-weight: 650; line-height: 1.2;
}
.sill-pick button small { font-size: 10px; font-weight: 500; color: var(--muted-2); }
.sill-pick button:hover { border-color: var(--accent); }
.sill-pick button.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hi); }
.sill-pick button.is-active small { color: var(--accent-hi); opacity: .8; }
.sill-pick button[disabled] { opacity: .55; cursor: default; }
.sill-len { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sill-len b { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.sill-len span { font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
.sill-tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted);
}
