/*
 * Базовые стили UI базы знаний (Propshaft).
 */
body { font-family: system-ui, sans-serif; line-height: 1.45; color: #1a2332; }
.flash.notice { background: #e8f5e9; padding: 0.5rem 0.75rem; border-radius: 4px; margin: 0.75rem 0; }
.flash.alert { background: #ffebee; padding: 0.5rem 0.75rem; border-radius: 4px; margin: 0.75rem 0; }
.kb-site #flash-messages {
  max-width: 960px;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
}
.kb-site #flash-messages .flash { margin: 0.35rem 0; }
.hint { color: #555; font-size: 0.9rem; margin: 0.5rem 0 1rem; }
.btn-secondary {
  margin-left: 0.25rem;
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #0d3b66;
  background: #fff;
  color: #0d3b66;
  cursor: pointer;
}
.btn-secondary:hover { background: #e8f0f8; }
turbo-frame[busy] { opacity: 0.65; pointer-events: none; }
turbo-frame#object_panel {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}
turbo-frame#object_panel:empty { display: none; padding: 0; border: none; }
turbo-frame#object_edit_panel {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}
turbo-frame#object_edit_panel:empty { display: none; padding: 0; border: none; }
turbo-frame#project_panel {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}
turbo-frame#project_panel:empty { display: none; padding: 0; border: none; }
input[readonly] { background: #f0f0f0; color: #555; }
.hvac-category-field .link-inline { margin-left: 0.75rem; font-size: 0.9rem; }
.field-row--nested { margin-top: 0.75rem; margin-bottom: 0; }
.project-links__list { margin: 0.5rem 0; }
.field-row--project-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.project-links__name { flex: 1 1 14rem; margin: 0; cursor: pointer; }
.project-links__role { flex: 1 1 16rem; max-width: 100%; }
.project-section { margin: 2rem 0; padding-top: 1rem; border-top: 1px solid #e0e0e0; }
.project-section h2 { margin-top: 0; }
.upload-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #bbb;
  border-radius: 6px;
  background: #fafafa;
  max-width: 42rem;
}
.upload-panel--secondary { background: #f5f5f5; margin-top: 0.75rem; }
.upload-panel--compact {
  margin-top: 0;
  padding: 0.5rem 0.65rem;
  max-width: none;
  border-style: solid;
  border-color: #e0e0e0;
}
.upload-panel--compact .upload-panel__title { font-size: 0.9rem; font-weight: 600; }
.upload-panel--compact .upload-panel__body { margin-top: 0.5rem; padding-top: 0.5rem; }
.equipment-issues-cell .upload-panel { background: transparent; }
.equipment-copy-hint {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
}
.equipment-table .doc-actions { white-space: normal; line-height: 1.6; }
.upload-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}
.upload-panel__header::-webkit-details-marker { display: none; }
.upload-panel__header::marker { content: ""; }
.upload-panel__title { font-size: 1rem; font-weight: 600; }
.upload-panel__hint {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  color: inherit;
}
.upload-panel[open] .upload-panel__hint { background: #eee; }
.upload-panel__header h3 { margin: 0; font-size: 1rem; }
.upload-panel__body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8e8e8;
}
.upload-panel__toggle {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: inherit;
}
.upload-panel__toggle:hover,
.upload-panel__toggle:focus-visible {
  background: #eee;
  border-color: #888;
  outline: none;
}
.upload-form input[type=file] { max-width: 100%; }
.documents-table { margin-bottom: 1rem; }
.doc-actions { white-space: nowrap; }
.doc-actions form { display: inline; margin-left: 0.5rem; }
.btn-link-danger {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}
.btn-link-danger:hover { color: #b71c1c; }
.document-editor-cell { padding: 0.5rem 0.75rem 1rem; background: #fafafa; }
.document-edit-panel {
  padding: 0.75rem 1rem;
  border: 1px dashed #aaa;
  border-radius: 6px;
  background: #fff;
}
.document-edit-panel h4 { margin: 0 0 0.75rem; font-size: 1rem; }
.hvac-category-panel {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed #aaa;
  border-radius: 6px;
  background: #fff;
}
.hint-success { color: #2e7d32; }
table { border-collapse: collapse; width: 100%; max-width: 56rem; margin-top: 1rem; }
th, td { border: 1px solid #ccc; padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
th { background: #f4f4f4; }
code { font-size: 0.9em; background: #f0f0f0; padding: 0.1em 0.3em; border-radius: 3px; }
.wiki-body { max-width: 56rem; margin-top: 1rem; }
.wiki-body h1 { font-size: 1.5rem; }
.wiki-body h2 { font-size: 1.25rem; margin-top: 1.25rem; }
input[type=text], select, textarea { padding: 0.35rem; margin-right: 0.5rem; }
.field-row { margin-bottom: 0.85rem; max-width: 40rem; }
.field-row--checkbox { display: flex; align-items: flex-start; gap: 0.4rem; }
.field-label-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.25rem; }
.field-label-text { font-weight: 600; }
.field-label-inline { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; cursor: pointer; }
.field-actions { margin-top: 1rem; }
.field-help { position: relative; display: inline-flex; vertical-align: middle; }
.field-help__btn {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid #888;
  border-radius: 50%;
  background: #f5f5f5;
  color: #444;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.field-help__btn:hover,
.field-help__btn:focus-visible { background: #e3f2fd; border-color: #1976d2; outline: none; }
.field-help__popover {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 14rem;
  max-width: 22rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  color: #222;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.field-help__popover:not([hidden]) { display: block; }
.hvac-category-field .field-row-actions { margin-top: 0.35rem; }
.pagy-meta { margin: 0.75rem 0; color: #444; }
.pagy.series-nav, nav[aria-label="Страницы"] .pagy { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin: 1rem 0; }
.pagy.series-nav a, nav[aria-label="Страницы"] .pagy a {
  padding: 0.35rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
}
.pagy.series-nav a[aria-current="page"], nav[aria-label="Страницы"] .pagy a[aria-current="page"] {
  font-weight: 700;
  background: #eee;
}

.equipment-table { margin-bottom: 1rem; }
.equipment-issues-inline { margin: 0; padding-left: 1rem; list-style: disc; }
.equipment-issues-inline li { margin: 0.2rem 0; }
.equipment-extra-cell,
.equipment-issues-cell { padding: 0.5rem 0.75rem; background: #fafafa; }
.equipment-extra-cell { border-top: 1px solid #eee; }
.equipment-extra-cell .upload-panel { margin-bottom: 0.5rem; }
.equipment-commissioning-snippet {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 4px;
  font-size: 0.9rem;
}
.equipment-commissioning-form { margin-top: 0.25rem; }
.equipment-commissioning-title-row { margin-bottom: 0.5rem; }
.equipment-commissioning-title-row label { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.equipment-commissioning-title-row input { width: 100%; max-width: 100%; box-sizing: border-box; }
.equipment-commissioning-form trix-editor { width: 100%; max-width: 100%; min-height: 7rem; }
.equipment-commissioning-hint { margin: 0 0 0.5rem; }
.equipment-catalog-commissioning-title { margin: 0.25rem 0 0.75rem; font-size: 1.1rem; }
.equipment-brand-analogs-hint { font-style: italic; margin-top: 0.15rem; }
.equipment-catalog-brand-analogs { max-width: 42rem; }
.equipment-catalog-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
}
.equipment-catalog-badge--large { margin-right: 0.5rem; vertical-align: middle; }
.equipment-catalog-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline; }
.equipment-catalog-form { max-width: 52rem; }
.manual-library-hint { margin-bottom: 1rem; }
.manual-upload-form { max-width: 42rem; }
.manual-library-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #fff3e0;
  color: #e65100;
  font-weight: 600;
}
.manual-library-badge--large { margin-bottom: 0.75rem; }
.equipment-analogs-field { margin-bottom: 0.75rem; }
/* Форма оборудования: блок загрузки мануала сразу под полем «Мануалы» (отдельная <form> в DOM). */
.equipment-form-layout {
  display: flex;
  flex-direction: column;
  max-width: 40rem;
}
.equipment-form-layout__form {
  display: contents;
}
.equipment-form-block--before-manuals { order: 1; }
.equipment-form-layout #project_equipment_manual_field { order: 2; }
.equipment-form-layout > .equipment-manual-extras { order: 3; }
.equipment-form-block--after-manuals { order: 4; }
.equipment-form-layout__actions { order: 5; margin-top: 0.75rem; }

.equipment-manual-upload-flash { margin: 0 0 0.5rem; }
.file-input-label__name { margin: 0.25rem 0 0; font-size: 0.9rem; }

.equipment-manual-upload-hint { margin-top: 0; }
.equipment-manual-extras { margin-top: 0; max-width: none; }
.equipment-manual-extras .upload-panel { margin-top: 0.25rem; }

.equipment-manuals-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.equipment-manuals-list li { margin: 0.15rem 0; }

.equipment-analog-picker { max-width: 40rem; }
.equipment-analog-picker__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  min-height: 0.25rem;
}
.equipment-analog-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 4px;
  font-size: 0.88rem;
}
.equipment-analog-picker__chip-link { font-size: 0.8rem; }
.equipment-analog-picker__chip-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  color: #666;
}
.equipment-analog-picker__search-wrap { position: relative; }
.equipment-analog-picker__search {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border: 1px solid #bbb;
  border-radius: 4px;
}
.equipment-analog-picker__dropdown {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 12rem;
  overflow-y: auto;
  margin: 0.15rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.equipment-analog-picker__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}
.equipment-analog-picker__option:hover,
.equipment-analog-picker__option:focus {
  background: #e3f2fd;
  outline: none;
}
.equipment-analog-picker__empty {
  padding: 0.5rem 0.65rem;
  color: #666;
  font-size: 0.88rem;
}
.equipment-analogs-list { margin: 0.2rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.equipment-analogs-inline .equipment-analogs-list { margin: 0; padding-left: 0; list-style: none; }
.equipment-analogs-inline .equipment-analogs-list li { display: inline; }
.equipment-analogs-inline .equipment-analogs-list li + li::before { content: "; "; }
.equipment-analogs-actions { margin-top: 0.5rem; }
.equipment-extra-cell trix-toolbar .trix-button-row { flex-wrap: wrap; }
.equipment-issue-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.equipment-issue-details { margin: 0.75rem 0; padding: 0.5rem; border: 1px dashed #ccc; border-radius: 4px; }
.equipment-manual-field__empty { margin: 0.35rem 0 0.5rem; }
.equipment-manual-link-form { margin-top: 0.5rem; padding: 0.5rem 0; border-top: 1px dashed #ddd; }

.file-viewer-cell { padding: 0; border: none; background: transparent; }
.file-viewer-cell turbo-frame { display: block; }
.file-viewer-panel {
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #b0bec5;
  border-radius: 6px;
  background: #f5f7f8;
}
.file-viewer-panel--missing { padding: 0.75rem; }
.file-viewer-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.file-viewer-panel__title { font-size: 0.95rem; }
.file-viewer-panel__actions { display: flex; gap: 0.75rem; align-items: center; }
.file-viewer-panel__fallback { margin: 0.25rem 0 0; }
.file-viewer__iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  height: min(72vh, 880px);
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.file-viewer__image {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 880px);
  margin: 0 auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
tr.file-viewer-row--active td { background: #e3f2fd; }

.faq-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.faq-card {
  padding: 1rem 1.1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}
.faq-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.faq-card__title { margin: 0; font-size: 1.1rem; }
.faq-card__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.faq-card__meta dt { margin: 0; color: #555; font-weight: 600; }
.faq-card__meta dd { margin: 0; }
.faq-card__block { margin: 0.5rem 0; }
.faq-card__block h3 { margin: 0 0 0.25rem; font-size: 0.85rem; color: #555; text-transform: uppercase; letter-spacing: 0.02em; }
.faq-card__block--solution { background: #f1f8e9; padding: 0.5rem 0.65rem; border-radius: 4px; }
.faq-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
}
.faq-show-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.faq-show-header h1 { margin: 0; }
.faq-show-links dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.35rem 1rem; }
.faq-show-links dt { font-weight: 600; color: #444; }
.faq-show-links dd { margin: 0; }
.faq-show-section { margin: 1.25rem 0; }
.faq-show-section h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.faq-show-section--solution {
  padding: 0.75rem 1rem;
  background: #f1f8e9;
  border-radius: 6px;
  border: 1px solid #c5e1a5;
}
.faq-show-footer { margin-top: 2rem; color: #666; }
.faq-show-section--reflections {
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}
.faq-comments-list { margin: 0.75rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-comments-empty { margin: 0.5rem 0; }
.faq-comment {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
}
.faq-comment__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #666;
}
.faq-comment__body { margin: 0; font-size: 0.95rem; }
.faq-comment__body p { margin: 0.25rem 0; }
.faq-comment-form { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #ddd; }
.faq-solution-display { margin-bottom: 1rem; }
.faq-solution-form { margin-top: 0.5rem; }

.error-codes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
}
.error-codes-table { margin-top: 0.5rem; }
.error-code-tag {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.1rem 0.35rem;
  background: #fff3e0;
  border-radius: 3px;
}
.error-code-tag--large { font-size: 1.5rem; padding: 0.2rem 0.5rem; }
.error-code-show-header { margin: 1rem 0 1.5rem; }
.error-code-show-brand { margin: 0; color: #555; font-weight: 600; }
.error-code-show-title { margin: 0.5rem 0 0; font-size: 1.1rem; }
.error-code-section { margin: 1.25rem 0; }
.error-code-section h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.error-code-section--solution {
  padding: 0.75rem 1rem;
  background: #f1f8e9;
  border-radius: 6px;
  border: 1px solid #c5e1a5;
}
.error-code-source-cell { font-size: 0.9rem; max-width: 14rem; }

.project-issues-section { margin-top: 2rem; }
.project-issues-stats { margin: 0.5rem 0 1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.project-issues-filters { margin-bottom: 1rem; }
.project-issues-list .faq-card__title { font-size: 1rem; margin: 0; }
.project-issues-list h4 { font-size: 0.9rem; margin: 0 0 0.35rem; }
.project-issues-empty { color: #666; }
.project-issue-form { margin-top: 0.5rem; }

.equipment-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
}
.equipment-catalog-filter-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}
.equipment-catalog-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #e8f4fc;
  border: 1px solid #90caf9;
  border-radius: 6px;
}
.equipment-catalog-sort-bar__label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-right: 0.25rem;
}
.equipment-catalog-sort-btn {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
}
.equipment-catalog-sort-btn:hover { background: #f5f5f5; border-color: #888; }
.equipment-catalog-sort-btn.is-active {
  background: #1976d2;
  border-color: #1565c0;
  color: #fff;
  font-weight: 600;
}
.equipment-catalog-table { margin-top: 0.5rem; }
.equipment-catalog-sort-link { font-weight: 600; text-decoration: none; font-size: 0.85rem; }
.equipment-catalog-sort-link:hover { text-decoration: underline; }
.equipment-catalog-th-sortable { white-space: nowrap; }
.equipment-catalog-th-sort-actions {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.equipment-catalog-th-sort-actions a {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #333;
}
.equipment-catalog-th-sort-actions a.is-active {
  background: #1976d2;
  border-color: #1565c0;
  color: #fff;
}
.equipment-catalog-name { font-weight: 600; }
.equipment-catalog-show-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.equipment-catalog-show-header h1 { margin: 0; }
.equipment-catalog-show-type {
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  background: #e3f2fd;
  border-radius: 4px;
}
.equipment-catalog-show-section { margin: 1.25rem 0; }
.equipment-catalog-show-section h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.equipment-catalog-show-dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 1rem;
}
.equipment-catalog-show-dl dt { font-weight: 600; color: #444; }
.equipment-catalog-show-dl dd { margin: 0; }
.equipment-catalog-issues { margin: 0; padding-left: 1.25rem; }
.equipment-catalog-issues li { margin: 0.35rem 0; }
.equipment-catalog-show-footer { margin-top: 2rem; color: #666; }
.equipment-catalog-show-section--commissioning {
  padding: 0.75rem 1rem;
  background: #f1f8e9;
  border-radius: 6px;
  border: 1px solid #c5e1a5;
}
.issue-status { font-size: 0.75rem; padding: 0.1rem 0.35rem; border-radius: 3px; margin-right: 0.25rem; }
.issue-status-open { background: #fff3e0; color: #e65100; }
.issue-status-resolved { background: #e8f5e9; color: #2e7d32; }
.inline-delete-form { display: inline; margin-left: 0.25rem; }

/* --- Публичный сайт building-clima.ru --- */
.public-site { margin: 0; background: #f4f7fb; color: #1a2332; }
.public-site .public-main { max-width: 960px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  background: #0d3b66;
  color: #fff;
  margin-bottom: 0;
}
.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand { color: inherit; text-decoration: none; }
.site-brand:hover { opacity: 0.92; }
.site-brand__name { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; }
.site-brand__tagline { display: block; font-size: 0.78rem; opacity: 0.85; margin-top: 0.15rem; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); }
.site-nav__link--active { background: rgba(255, 255, 255, 0.18); font-weight: 600; }
.site-nav__kb {
  margin-left: 0.25rem;
  padding: 0.35rem 0.65rem !important;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font-size: 0.88rem !important;
}
.site-nav__kb--active {
  background: rgba(255, 255, 255, 0.22) !important;
  font-weight: 600;
}

.kb-nav {
  background: #0a2d4d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kb-nav__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
}
.kb-nav__link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}
.kb-nav__link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.kb-nav__link--active { background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 600; }
.kb-nav__logout {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.kb-nav__logout:hover { background: rgba(255, 255, 255, 0.12); }

.admin-login-form label { display: block; font-weight: 600; margin-bottom: 0.25rem; color: #0d3b66; }
.admin-login-form p { margin-bottom: 1rem; }
.admin-login-form input[type="email"],
.admin-login-form input[type="password"] {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c5d4e4;
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}
.hero--compact { padding: 2.5rem 1rem 3rem; }

.kb-main { padding-top: 1.25rem; }
.kb-content {
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: 10px;
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 1px 3px rgba(13, 59, 102, 0.06);
}
.kb-content h1 { color: #0d3b66; margin-top: 0; font-size: 1.5rem; }
.kb-content h2 { color: #0d3b66; }
.kb-content a { color: #0d3b66; }
.kb-content a:hover { color: #1a5a8a; }

@media (max-width: 640px) {
  .kb-content { padding: 1rem; border-radius: 8px; }
}

.hero {
  background: linear-gradient(135deg, #0d3b66 0%, #1a5a8a 100%);
  color: #fff;
  margin: 0 -1.25rem 2rem;
  padding: 2.5rem 1.25rem 2.75rem;
  border-radius: 0 0 12px 12px;
}
.hero h1 { margin: 0 0 1rem; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; max-width: 28rem; }
.hero__lead { margin: 0 0 1.5rem; max-width: 36rem; opacity: 0.92; font-size: 1.05rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: #fff; color: #0d3b66; }
.btn-primary:hover { background: #e8f0f8; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

.features { margin: 2rem 0; }
.features__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(13, 59, 102, 0.06);
}
.feature-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: #0d3b66; }
.feature-card p { margin: 0; color: #444; font-size: 0.95rem; }

.cta-band {
  text-align: center;
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}
.cta-band h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.cta-band p { margin: 0 0 1.25rem; color: #555; }
.cta-band .btn-primary { background: #0d3b66; color: #fff; }
.cta-band .btn-primary:hover { background: #1a5a8a; }

.page-intro { margin: 2rem 0 1.5rem; }
.page-intro h1 { margin: 0 0 0.5rem; color: #0d3b66; }
.page-intro__lead { margin: 0; color: #444; font-size: 1.05rem; max-width: 40rem; }

.services-list { display: flex; flex-direction: column; gap: 1.25rem; }
.service-block {
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}
.service-block h2 { margin: 0 0 0.75rem; font-size: 1.1rem; color: #0d3b66; }
.service-block ul { margin: 0; padding-left: 1.25rem; }
.service-block li { margin: 0.35rem 0; }
.page-outro { margin: 2rem 0; }

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.contact-card {
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  padding: 1.25rem;
}
.contact-card h2 { margin: 0 0 0.5rem; font-size: 1rem; color: #0d3b66; }
.contact-card p { margin: 0 0 0.5rem; }
.contact-card ul { margin: 0; padding-left: 1.25rem; }
.contact-card__value { font-size: 1.05rem; font-weight: 600; }
.contact-link { color: #0d3b66; }
.contacts-hint { margin-top: 1.5rem; }

.site-footer {
  background: #0a2d4d;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2rem;
  font-size: 0.88rem;
}
.site-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem;
  text-align: center;
}
.site-footer__copy { margin: 0 0 0.35rem; }
.site-footer__links { margin: 0; }
.site-footer a { color: #fff; }

@media (max-width: 640px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; }
}

/* --- KB UI: таблицы, формы, turbo-панели (Building Clima) --- */
.kb-content {
  --kb-primary: #0d3b66;
  --kb-primary-light: #1a5a8a;
  --kb-border: #dde4ee;
  --kb-border-strong: #c5d3e0;
  --kb-surface: #fff;
  --kb-surface-muted: #f4f7fb;
  --kb-surface-accent: #e8f0f8;
  --kb-success-bg: #eef6e8;
  --kb-success-border: #c5e1a5;
  --kb-warning-bg: #fff8e6;
  --kb-warning-border: #ffe082;
}

.kb-content table {
  width: 100%;
  max-width: none;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.kb-content th,
.kb-content td {
  border: 1px solid var(--kb-border);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}
.kb-content th {
  background: var(--kb-surface-accent);
  color: var(--kb-primary);
  font-weight: 600;
}
.kb-content tbody tr:nth-child(even) { background: var(--kb-surface-muted); }
.kb-content tbody tr:hover { background: #eef3f9; }

.kb-content input[type="text"],
.kb-content input[type="email"],
.kb-content input[type="url"],
.kb-content input[type="number"],
.kb-content input[type="search"],
.kb-content input[type="file"],
.kb-content select,
.kb-content textarea {
  padding: 0.45rem 0.6rem;
  margin-right: 0.5rem;
  border: 1px solid var(--kb-border-strong);
  border-radius: 6px;
  background: var(--kb-surface);
  color: #1a2332;
  font: inherit;
  max-width: 100%;
  box-sizing: border-box;
}
.kb-content input:focus,
.kb-content select:focus,
.kb-content textarea:focus {
  outline: none;
  border-color: var(--kb-primary);
  box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}
.kb-content input[readonly] {
  background: var(--kb-surface-muted);
  color: #555;
}
.kb-content input[type="submit"],
.kb-content button[type="submit"],
.kb-content .btn-primary {
  background: var(--kb-primary);
  color: #fff;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
.kb-content input[type="submit"]:hover,
.kb-content button[type="submit"]:hover {
  background: var(--kb-primary-light);
}
.kb-content .btn-secondary {
  margin-left: 0;
  margin-right: 0.35rem;
}
.kb-content code {
  background: var(--kb-surface-accent);
  color: var(--kb-primary);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}

.kb-content .field-label-text,
.kb-content .field-label-inline { color: var(--kb-primary); }
.kb-content .field-help__btn {
  border-color: var(--kb-border-strong);
  background: var(--kb-surface-accent);
  color: var(--kb-primary);
}
.kb-content .field-help__btn:hover,
.kb-content .field-help__btn:focus-visible {
  background: var(--kb-surface-accent);
  border-color: var(--kb-primary);
}
.kb-content .field-help__popover {
  border-color: var(--kb-border);
  box-shadow: 0 4px 16px rgba(13, 59, 102, 0.12);
}

.kb-content .faq-filters,
.kb-content .error-codes-filters,
.kb-content .equipment-catalog-filters,
.kb-content .project-issues-filters,
.kb-content form[method="get"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--kb-surface-muted);
  border: 1px solid var(--kb-border);
  border-radius: 8px;
}

.kb-content turbo-frame#object_panel,
.kb-content turbo-frame#object_edit_panel,
.kb-content turbo-frame#project_panel {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--kb-border);
  border-radius: 8px;
  background: var(--kb-surface-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.kb-content .upload-panel {
  border: 1px dashed var(--kb-border-strong);
  border-radius: 8px;
  background: var(--kb-surface-muted);
}
.kb-content .upload-panel--compact {
  border-style: solid;
  border-color: var(--kb-border);
  background: var(--kb-surface);
}
.kb-content .upload-panel__title,
.kb-content .upload-panel__header h3 { color: var(--kb-primary); }
.kb-content .upload-panel__body { border-top-color: var(--kb-border); }
.kb-content .upload-panel__hint,
.kb-content .upload-panel__toggle {
  border-color: var(--kb-border-strong);
  color: var(--kb-primary);
}
.kb-content .upload-panel__hint:hover,
.kb-content .upload-panel__toggle:hover {
  background: var(--kb-surface-accent);
  border-color: var(--kb-primary);
}

.kb-content .document-editor-cell,
.kb-content .equipment-extra-cell,
.kb-content .equipment-issues-cell {
  background: var(--kb-surface-muted);
  border-color: var(--kb-border);
}
.kb-content .document-edit-panel,
.kb-content .hvac-category-panel {
  border: 1px dashed var(--kb-border-strong);
  border-radius: 8px;
  background: var(--kb-surface);
}
.kb-content .document-edit-panel h4 { color: var(--kb-primary); }

.kb-content .project-section {
  border-top-color: var(--kb-border);
}
.kb-content .project-section h2 { color: var(--kb-primary); }

.kb-content .faq-card {
  border: 1px solid var(--kb-border);
  border-radius: 8px;
  background: var(--kb-surface);
  box-shadow: 0 1px 2px rgba(13, 59, 102, 0.04);
}
.kb-content .faq-card__title { color: var(--kb-primary); }
.kb-content .faq-card__footer { border-top-color: var(--kb-border); }
.kb-content .faq-comment {
  border-color: var(--kb-border);
  background: var(--kb-surface-muted);
}
.kb-content .faq-comment-form { border-top-color: var(--kb-border); }
.kb-content .faq-show-section--reflections {
  background: var(--kb-surface-muted);
  border-color: var(--kb-border);
}

.kb-content .file-viewer-panel {
  border-color: var(--kb-border-strong);
  background: var(--kb-surface-muted);
}
.kb-content .file-viewer__iframe,
.kb-content .file-viewer__image { border-color: var(--kb-border); }
.kb-content tr.file-viewer-row--active td { background: var(--kb-surface-accent); }

.kb-content .equipment-copy-hint {
  background: var(--kb-warning-bg);
  border-color: var(--kb-warning-border);
}
.kb-content .equipment-commissioning-snippet,
.kb-content .faq-card__block--solution,
.kb-content .faq-show-section--solution,
.kb-content .error-code-section--solution,
.kb-content .equipment-catalog-show-section--commissioning {
  background: var(--kb-success-bg);
  border: 1px solid var(--kb-success-border);
  border-radius: 6px;
}

.kb-content .equipment-catalog-sort-bar {
  background: var(--kb-surface-accent);
  border-color: var(--kb-border-strong);
}
.kb-content .equipment-catalog-sort-btn.is-active,
.kb-content .equipment-catalog-th-sort-actions a.is-active {
  background: var(--kb-primary);
  border-color: var(--kb-primary);
  color: #fff;
}
.kb-content .equipment-catalog-sort-btn:hover {
  background: var(--kb-surface-accent);
  border-color: var(--kb-primary);
}
.kb-content .equipment-catalog-badge {
  background: var(--kb-surface-accent);
  color: var(--kb-primary);
}
.kb-content .equipment-catalog-show-type {
  background: var(--kb-surface-accent);
  color: var(--kb-primary);
}

.kb-content .equipment-analog-picker__chip {
  background: var(--kb-success-bg);
  border-color: var(--kb-success-border);
}
.kb-content .equipment-analog-picker__search {
  border-color: var(--kb-border-strong);
}
.kb-content .equipment-analog-picker__search:focus {
  border-color: var(--kb-primary);
  box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}
.kb-content .equipment-analog-picker__dropdown {
  border-color: var(--kb-border);
}
.kb-content .equipment-analog-picker__option:hover,
.kb-content .equipment-analog-picker__option:focus {
  background: var(--kb-surface-accent);
}

.kb-content .equipment-issue-details,
.kb-content .equipment-manual-link-form {
  border-color: var(--kb-border-strong);
}

.kb-content .pagy-meta { color: #555; }
.kb-content .pagy.series-nav a,
.kb-content nav[aria-label="Страницы"] .pagy a {
  border-color: var(--kb-border-strong);
  border-radius: 6px;
  color: var(--kb-primary);
}
.kb-content .pagy.series-nav a:hover,
.kb-content nav[aria-label="Страницы"] .pagy a:hover {
  background: var(--kb-surface-accent);
  border-color: var(--kb-primary);
}
.kb-content .pagy.series-nav a[aria-current="page"],
.kb-content nav[aria-label="Страницы"] .pagy a[aria-current="page"] {
  background: var(--kb-primary);
  border-color: var(--kb-primary);
  color: #fff;
  font-weight: 600;
}

.kb-content .error-code-tag {
  background: var(--kb-warning-bg);
  color: #b45309;
}
.kb-content .manual-library-badge {
  background: var(--kb-warning-bg);
  color: #b45309;
}

.kb-content .wiki-body h1,
.kb-content .wiki-body h2,
.kb-content .wiki-body h3 { color: var(--kb-primary); }

.kb-content trix-toolbar {
  border: 1px solid var(--kb-border);
  border-radius: 6px 6px 0 0;
  background: var(--kb-surface-muted);
}
.kb-content trix-editor {
  border: 1px solid var(--kb-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  min-height: 6rem;
}
.kb-content .trix-content { color: #1a2332; }
