/* Часть стилей ЗамерПро. Исходный public/css/app.css разбит для надёжной загрузки через туннель. */
.sill-tag b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sill-tag.is-through { color: #a5f3fc; }
.sill-tag.is-through b { color: #a5f3fc; }
html[data-theme="light"] .sill-tag.is-through { color: #0e7490; }
html[data-theme="light"] .sill-tag.is-through b { color: #0e7490; }

/* ---------- материалы ---------- */
.mat-table th, .mat-table td { font-size: 11.5px; padding: 6px 10px; }
.mat-table tfoot td { background: var(--surface-2); font-size: 12px; }
.mat-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mat-foot {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline;
  padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.mat-foot b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mat-foot .hint { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.sill-mat { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: var(--muted-2); }
.sill-mat b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .mat-foot .hint { display: none; } }

/* ---------- пакет этикеток ---------- */
.labels-page { padding: 0; }
.labels-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.pl-card {
  border: 1.5px solid #0f172a; border-radius: 8px; padding: 5mm 6mm;
  display: grid; grid-template-columns: 1fr auto; gap: 2mm 4mm; align-items: center;
  color: #0f172a; background: #fff; break-inside: avoid;
}
.pl-top { grid-column: 1 / -1; font-size: 10px; font-weight: 700; border-bottom: 1px solid #cbd5e1; padding-bottom: 2mm; }
.pl-place { grid-column: 1; font-size: 9.5px; color: #475569; }
.pl-room { grid-column: 1; font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.pl-qr { grid-column: 2; grid-row: 2 / 4; display: grid; place-items: center; }
.pl-qr svg { width: 21mm; height: 21mm; }

/* ---------- уведомления ---------- */
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
[data-act="notifications"] { position: relative; }
.notif-list { display: flex; flex-direction: column; gap: 6px; }
.notif-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer;
}
.notif-row:hover { border-color: var(--line-2); background: var(--surface-3); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.notif-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-main b { font-size: 12.5px; color: var(--ink); }
.notif-main span { font-size: 11px; color: var(--muted); }
.notif-time { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }

/* ---------- редактирование типа ---------- */
.tp-row { display: grid; grid-template-columns: 70px 1fr 90px 28px; gap: 6px; align-items: center; }
.tp-row .tp-key { text-align: center; font-family: var(--mono); font-weight: 700; }
@media (max-width: 560px) { .tp-row { grid-template-columns: 54px 1fr 72px 26px; } }

.fr-row { display: grid; grid-template-columns: 1fr 60px 70px 1fr; gap: 6px; align-items: center; }
@media (max-width: 560px) { .fr-row { grid-template-columns: 1fr 46px 56px; } .fr-row select { grid-column: 1 / -1; } }

/* ---------- защита утверждённого замера ---------- */
.locked-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(52, 211, 153, .10); border: 1px solid rgba(52, 211, 153, .35);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 10px;
}
.lb-ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(52, 211, 153, .15); color: var(--ok); display: grid; place-items: center; flex: none; }
.lb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-text b { font-size: 12.5px; color: var(--ok); }
.lb-text span { font-size: 11.5px; color: var(--muted); }
html[data-theme="light"] .locked-banner { background: #ecfdf5; border-color: #a7f3d0; }

/* ---------- стены и предупреждения ---------- */
.wall-warn {
  padding: 9px 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px; color: var(--warn);
  background: var(--warn-soft);
}
.wall-warn svg { vertical-align: -2px; }

.sill-wall { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sill-wall label { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.sill-wall select { flex: 1; height: 30px; font-size: 12px; }

/* ---------- наследуемый левый пилон ---------- */
.param-card.is-inherited { border-style: dashed; border-color: rgba(59, 130, 246, .35); }
.param-card .inh {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-hi); background: var(--accent-soft);
  border-radius: 5px; padding: 1px 5px; margin-left: 4px; font-weight: 700; vertical-align: 1px;
}

/* ---------- сворачиваемая корзина ---------- */
.trash-caret { display: grid; place-items: center; color: var(--muted-2); transition: transform .18s; }
.trash-caret.is-open { transform: rotate(90deg); }
.ps-block { margin-top: 14px; }
.ps-block-head { font-size: 11.5px; font-weight: 700; margin-bottom: 4px; }

/* ---------- типоразмеры ---------- */
.size-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.size-filters label { font-size: 11px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.size-filters .input { width: 78px; height: 32px; font-size: 12.5px; }
.size-row { cursor: pointer; }
.size-row:hover td { background: var(--surface-2); }
.size-src { font-size: 11.5px; color: var(--muted); }
.size-detail td { background: var(--surface-2); padding: 8px 12px; }
.size-chip {
  display: inline-block; font-size: 11px; color: var(--ink-2);
  background: var(--surface-3); border-radius: 6px; padding: 2px 7px; margin: 0 5px 5px 0;
}

/* ---------- светлая тема: точечные исправления ---------- */
html[data-theme="light"] .panel-head { background: #fbfcfe; }
html[data-theme="light"] .mat-table tfoot td { background: #f4f7fb; }
html[data-theme="light"] .mat-table th { background: #fbfcfe; color: var(--muted); }
html[data-theme="light"] .size-row:hover td { background: #eef4fb; }
html[data-theme="light"] .size-chip { background: #e9eff7; color: var(--ink-2); }
html[data-theme="light"] .size-detail td { background: #f4f7fb; }
html[data-theme="light"] .type-row:hover { background: #f7fafd; }
html[data-theme="light"] .trash-caret { color: var(--muted); }
html[data-theme="light"] .wall-warn { background: #fdf6e9; color: #92400e; }
html[data-theme="light"] .checklist.is-done { background: #ecfdf5; border-color: #a7f3d0; }
html[data-theme="light"] .type-params span { background: #f4f7fb; }
html[data-theme="light"] .hint { color: var(--muted-2); }
html[data-theme="light"] .notif-row { background: #fff; }
html[data-theme="light"] .notif-row:hover { background: #f4f7fb; }
html[data-theme="light"] .notif-main b { color: var(--ink); }
html[data-theme="light"] .hist-item { background: #f7fafd; }
html[data-theme="light"] .hist-from { background: #eef4fb; }
html[data-theme="light"] .hist-to { background: #ecfdf5; }
html[data-theme="light"] .install-banner { background: #fff; border-color: var(--line-2); }
html[data-theme="light"] .ib-text b { color: var(--ink); }
html[data-theme="light"] .save-bar { background: rgba(255,255,255,.96); }
html[data-theme="light"] .sel-bar { background: rgba(255,255,255,.96); }
html[data-theme="light"] .topbar { background: rgba(255,255,255,.94); }
html[data-theme="light"] .label-url { color: var(--muted); }

/* ---------- iPhone: отступ под «челку» и статус-бар ---------- */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }

@supports (padding: env(safe-area-inset-top)) {
  .topbar {
    height: calc(56px + var(--safe-top));
    padding-top: var(--safe-top);
  }
  .sidebar {
    padding-top: var(--safe-top);
  }
  .sidebar-foot {
    padding-bottom: calc(12px + var(--safe-bottom));
  }
  .modal-backdrop { padding-top: calc(18px + var(--safe-top)); }
  .measure-overlay { padding-top: var(--safe-top); }
}

@media (max-width: 860px) {
  .topbar { height: calc(52px + var(--safe-top)); padding-top: var(--safe-top); }
  .node-nav { top: calc(52px + var(--safe-top)); }
  .content { padding-top: calc(12px + var(--safe-top)); }
  .bottom-nav { padding-bottom: var(--safe-bottom); }
}

/* ---------- общий вид кабинета: прокрутка и масштаб ---------- */
.elevation-tools {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 2px 2px 8px;
}
.elevation-tools .spacer { flex: 1; }
.et-hint { font-size: 11px; color: var(--muted-2); }
.elevation-scroll {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border-radius: 10px;
  padding-bottom: 4px;
}
.elevation-inner { max-width: none; }
.elevation-inner svg { display: block; width: 100%; height: auto; }
.elev-full-wrap { overflow: auto; max-height: 70vh; -webkit-overflow-scrolling: touch; }
.elev-full-inner { min-width: 900px; }
.elev-full-inner svg { display: block; width: 100%; height: auto; }
@media (max-width: 860px) {
  .elevation-inner { min-width: 640px; }
  .et-hint { font-size: 10.5px; }
}

/* ---------- спокойная подсказка вместо оранжевого предупреждения ---------- */
.wall-note {
  padding: 8px 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px; color: var(--muted-2);
  background: transparent;
}
.wall-note svg { vertical-align: -2px; opacity: .7; }
html[data-theme="light"] .wall-note { color: var(--muted); background: #fbfcfe; }

/* ---------- наследуемая левая колонна: без поля ввода ---------- */
.param-inherited {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; padding: 8px 10px;
  border: 1px dashed rgba(59, 130, 246, .35); border-radius: 11px;
  background: rgba(59, 130, 246, .06);
  font-size: 11.5px; color: var(--muted);
}
.param-inherited .pi-key {
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent-hi);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 6px;
}
.param-inherited .pi-text { flex: 1; min-width: 0; }
.param-inherited b { color: var(--ink); }
html[data-theme="light"] .param-inherited { background: #eff6ff; border-color: #bfdbfe; }

/* плашка утверждённого замера: для инженера/админа — не «замок», а справка */
.locked-banner.is-open { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.30); }
.locked-banner.is-open .lb-ico { background: rgba(59,130,246,.15); color: var(--accent-hi); }
.locked-banner.is-open .lb-text b { color: var(--accent-hi); }
html[data-theme="light"] .locked-banner.is-open { background: #eff6ff; border-color: #bfdbfe; }

/* каталог подиумов */
.podium-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.podium-card { background: var(--panel-2, #151f31); border: 1px solid var(--line, #24324a); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.podium-preview { background: #0d1524; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.podium-preview svg { width: 100%; height: 100%; }
.podium-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.podium-name { font-size: 13px; font-weight: 700; color: var(--text, #e6edf7); }
.podium-note { font-size: 11.5px; color: var(--muted, #93a4bd); line-height: 1.45; flex: 1; }
html[data-theme="light"] .podium-preview { background: #eef3fb; }
html[data-theme="light"] .podium-card { background: #fff; border-color: #dbe4f0; }

/* выбор кабинета для подиума */
