/* ===== Базовые ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f5f7;
  line-height: 1.5;
}

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #c0c0c0;
  background: #ffffff;
  border-radius: 6px;
  padding: 6px 12px;
  transition: background-color 0.15s;
}

button:hover {
  background: #f0f0f0;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

button.primary:hover {
  background: #1d4ed8;
}

button.danger {
  color: #dc2626;
  border-color: #dc2626;
}

button.danger:hover {
  background: #fef2f2;
}

input[type="text"],
textarea,
select {
  font: inherit;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  background: white;
}
textarea {
  overflow: hidden;
  resize: none;
  min-height: 48px;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid #2563eb;
  outline-offset: -1px;
  border-color: #2563eb;
}

/* ===== Шапка ===== */

.app-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* ===== Главный экран — плитки ===== */

.main-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.guides-wrap {
  position: relative;
}
.guides-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #6366f1;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}
.guides-btn:hover {
  background: #4f46e5;
}
.guides-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 20;
  min-width: 160px;
  overflow: hidden;
}
.guides-link {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.guides-link:last-child {
  border-bottom: none;
}
.guides-link:hover {
  background: #f3f4f6;
}
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #10b981;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}
.export-btn:hover {
  background: #059669;
}
.export-btn:disabled,
.export-btn[disabled] {
  background: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.8;
}
.export-btn:disabled:hover { background: #9ca3af !important; }
.export-icon {
  font-size: 16px;
}

.main-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.main-tile-wrap {
  position: relative;
}

.main-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 24px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  min-height: 170px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.tile-export {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: #10b981;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  z-index: 2;
  white-space: nowrap;
}
.main-tile-wrap:hover .tile-export {
  opacity: 1;
}
.tile-export:hover {
  background: #059669;
}
.tile-export:disabled,
.tile-export[disabled] {
  background: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none;
}
.tile-export:disabled:hover { background: #9ca3af !important; }

.main-tile:hover {
  border-color: #2563eb;
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.main-tile .tile-icon {
  font-size: 32px;
  line-height: 1;
}

.main-tile .tile-title {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.main-tile .tile-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}

/* ===== Заголовок раздела (заглушки) ===== */

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-header .back {
  background: transparent;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  color: #2563eb;
}

.section-header .back:hover {
  background: #eff6ff;
}

.section-header h2 {
  margin: 0;
  font-size: 22px;
}

.stub-card {
  background: white;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 28px 32px;
}

.stub-desc {
  margin: 0 0 18px 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
}

.stub-todo {
  background: #f9fafb;
  border-left: 3px solid #2563eb;
  padding: 14px 18px;
  border-radius: 4px;
}

.stub-todo-title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stub-todo ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #4b5563;
}

.stub-todo li {
  margin: 3px 0;
}

/* ===== Lock bar (этап 3) ===== */

.lock-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.lock-bar.readonly {
  background: #fef3c7;
  border-color: #fcd34d;
}

.lock-bar.dirty {
  background: #fef9c3;
  border-color: #fde047;
}

.lock-bar .badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  color: white;
}

.lock-bar .badge.edit {
  background: #059669;
}

.lock-bar .badge.readonly {
  background: #d97706;
}

.lock-bar .dirty-marker {
  font-size: 12px;
  color: #92400e;
  margin-left: 12px;
  font-weight: 500;
}

.lock-bar .lock-actions {
  display: flex;
  gap: 8px;
}

/* ===== Категории — табы ===== */

.cat-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.cat-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  font-size: 13px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-tab:hover {
  background: #f3f4f6;
  color: #111827;
}

.cat-tab.active {
  background: white;
  border-color: #e5e7eb;
  color: #111827;
  font-weight: 500;
  margin-bottom: -1px;
}

.cat-tab .cnt {
  background: #e5e7eb;
  color: #4b5563;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
}

.cat-tab.active .cnt {
  background: #dbeafe;
  color: #1e40af;
}

.cat-tab.add {
  color: #2563eb;
  font-weight: 500;
}

/* ===== Тулбар категории ===== */

.cat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: white;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: 16px;
}

.cat-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-toolbar-left strong {
  font-size: 16px;
}

.cat-id {
  font-family: monospace;
  font-size: 11px;
  color: #9ca3af;
}

.cat-toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.subtabs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
}

/* ===== Подвкладки ===== */

.subtab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.subtab {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.subtab.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  font-weight: 500;
}

.subtab .cnt {
  background: rgba(0, 0, 0, 0.08);
  padding: 0 6px;
  border-radius: 8px;
  font-size: 10px;
}

.subtab .subtab-actions {
  display: none;
  gap: 4px;
}

.subtab:hover .subtab-actions {
  display: inline-flex;
}

.subtab .subtab-actions span {
  cursor: pointer;
  padding: 0 3px;
  font-size: 12px;
}

.subtab .subtab-actions span:hover {
  color: #2563eb;
}

.subtab.add {
  color: #2563eb;
  border-style: dashed;
  background: white;
}

/* ===== Сводная таблица ===== */

.completion-section {
  margin-top: 20px;
}

.completion-section h3,
.items-section h3 {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.completion-table-wrap {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: auto;
}

.completion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.completion-table th,
.completion-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.completion-table th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  text-align: center;
}

.completion-table th:first-child {
  text-align: left;
}

.completion-table tbody tr {
  cursor: pointer;
}

.completion-table tbody tr:hover {
  background: #f9fafb;
}

.completion-table td.name {
  font-weight: 500;
}

.completion-table td.ok {
  color: #111827;
  font-size: 12px;
}

.completion-table td.ok.val {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.completion-table td.ok a {
  color: #2563eb;
  text-decoration: none;
}

.completion-table td.ok a:hover {
  text-decoration: underline;
}

.completion-table td.ok.file-cell {
  font-size: 11px;
  color: #6b7280;
}

.completion-table td.missing {
  color: #d1d5db;
  text-align: center;
}

.completion-table td.pct {
  text-align: center;
  font-size: 11px;
  font-family: monospace;
  color: #9ca3af;
}

.completion-table td.pct.full {
  color: #059669;
  font-weight: 700;
}

/* ===== Карточки элементов ===== */

.items-section {
  margin-top: 24px;
}

/* Подстили — блок в карточке стиля */
.sub-styles-editor {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px 14px;
  background: #fafbfc;
}
.sub-styles-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sub-styles-head h3 {
  margin: 0;
  font-size: 15px;
  color: #24292f;
}
.sub-style-cards {
  display: grid;
  gap: 10px;
}
.sub-style-card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}
.sub-style-card.base {
  border-left: 3px solid #6d3fa0;
}
.sub-style-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.sub-style-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sub-style-base-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: #f2e6fa;
  color: #6d3fa0;
  font-size: 11px;
  font-weight: 600;
}
.sub-style-name {
  font-weight: 600;
  color: #24292f;
}
.sub-style-id {
  color: #6a7480;
  font-family: monospace;
  font-size: 12px;
}
.sub-style-card-actions {
  display: flex;
  gap: 4px;
}
.sub-style-card-actions button {
  padding: 3px 8px;
  font-size: 12px;
}
.sub-style-card-body {
  display: grid;
  gap: 8px;
}

/* Textarea для aliases в карточке серии — один alias на строку. */
.aliases-textarea {
  font-family: "Segoe UI Mono", "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 8px 10px;
  resize: vertical;
  min-height: 60px;
  max-height: 400px;
  width: 100%;
  box-sizing: border-box;
}
.hint-inline {
  font-size: 11px;
  font-weight: normal;
  color: #6a7480;
  margin-left: 6px;
}

/* Мультивыбор подстилей в форме товара */
.sub-style-checks-groups {
  display: grid;
  gap: 10px;
  padding: 8px 10px;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  margin: -8px 0 12px;
}
.sub-style-check-group {
  display: grid;
  gap: 4px;
}
.sub-style-check-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.sub-style-check-group-head .code {
  font-family: monospace;
  font-weight: 700;
  color: #2563eb;
}
.sub-style-check-group-head .name {
  color: #55627a;
}
.sub-style-hint {
  color: #6d3fa0;
  font-size: 12px;
  font-style: italic;
}
.sub-style-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding-left: 12px;
}
.sub-style-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d0d7de;
  cursor: pointer;
  font-size: 12px;
}
.sub-style-check.checked {
  background: #f2e6fa;
  border-color: #6d3fa0;
  color: #6d3fa0;
}
.sub-style-check.implicit {
  /* Базовый подстиль, выбранный по умолчанию (когда ни один не отмечен явно).
     Полупрозрачный фон подсказывает: активен, но не «залочен» галкой. */
  background: #faf5fd;
  border-style: dashed;
}
.sub-style-check input { margin: 0; }
.sub-style-check .base-mark { color: #6d3fa0; font-weight: 700; }

/* Фильтр подстилей в корне Комплектации */
.picker-substyle-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.substyle-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f6f8fa;
}
.substyle-filter-code {
  font-family: monospace;
  font-weight: 700;
  color: #2563eb;
  font-size: 12px;
}
.substyle-check {
  padding: 1px 6px;
  font-size: 11px;
}

.items-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.items-head h3 {
  margin: 0;
}

.item-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.item-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.item-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 8px;
}

.item-card-name {
  font-weight: 600;
  font-size: 14px;
}

.item-card-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
}

.item-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.item-card-meta .styles {
  color: #2563eb;
  font-weight: 500;
}

.item-card-actions {
  display: flex;
  gap: 6px;
}

.item-card-actions button {
  font-size: 12px;
  padding: 4px 8px;
  flex: 1;
}

/* ===== Модалка v2 (сосуществует со старой) ===== */

.modal-md {
  min-width: 480px;
  max-width: 600px;
}

.modal-lg {
  min-width: 640px;
  max-width: 800px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.modal-close:hover {
  color: #1f2937;
  background: transparent;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.req {
  color: #dc2626;
}

/* ===== FileUpload ===== */

.file-upload {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  font-size: 12px;
}

.file-current.has-thumb {
  align-items: stretch;
  padding: 6px;
}

.file-thumb {
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  border-radius: 4px;
  overflow: hidden;
  background: white;
  border: 1px solid #cbd5e1;
  display: block;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f5f5;
  display: block;
}

.file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.file-meta a {
  color: #1e40af;
  text-decoration: none;
  word-break: break-all;
  font-weight: 500;
}

.file-meta a:hover {
  text-decoration: underline;
}

.file-current a {
  color: #1e40af;
  flex: 1;
  text-decoration: none;
  word-break: break-all;
}

.file-current a:hover {
  text-decoration: underline;
}

.file-current .file-size {
  color: #6b7280;
  flex-shrink: 0;
}

.file-current button {
  padding: 0 6px;
  font-size: 14px;
  line-height: 1;
  background: transparent;
  border: none;
  color: #6b7280;
}

.file-label {
  display: inline-block;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

.file-label:hover {
  border-color: #93c5fd;
  color: #2563eb;
}

.file-label input {
  display: none;
}

.file-error {
  font-size: 11px;
  color: #dc2626;
}

/* ===== Style checkboxes ===== */

.style-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.style-check.checked {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
}

.style-check input {
  margin: 0;
}

.style-check .code {
  font-weight: 600;
  font-family: monospace;
}

.style-check .name {
  color: #6b7280;
}

.style-check.checked .name {
  color: #1e40af;
}

.style-checks .empty {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

/* ===== Application checkboxes ===== */

.application-checks {
  display: flex;
  gap: 8px;
}

.app-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.app-check.checked {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.app-check input {
  margin: 0;
}

/* ===== Furniture Refs ===== */

.furniture-refs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fref-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.fref-card.broken {
  background: #fef2f2;
  border-color: #fecaca;
}

.fref-main {
  flex: 1;
  min-width: 0;
}

.fref-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.fref-meta {
  display: flex;
  gap: 6px 10px;
  font-size: 11px;
  color: #6b7280;
  margin-top: 3px;
  flex-wrap: wrap;
}

.fref-cat {
  color: #2563eb;
  font-weight: 500;
}

.fref-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
}

.fref-remove {
  padding: 4px 10px;
  font-size: 16px;
  line-height: 1;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  flex-shrink: 0;
}

.fref-remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ===== Key-Value Editor ===== */

.kv-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kv-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.kv-key {
  flex: 0 0 200px;
}

.kv-value {
  flex: 1;
}

.kv-remove {
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1;
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.kv-remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.kv-empty {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.kv-add {
  align-self: flex-start;
  font-size: 12px;
  color: #2563eb;
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
}

.kv-add:hover {
  text-decoration: underline;
}

/* ===== Error banner ===== */

.error-banner {
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid #fecaca;
}

/* ===== Zones layout (этап 4) ===== */

.zones-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.zones-sidebar {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

.zones-sidebar-head {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  color: #4b5563;
}

.zones-sidebar-head .small {
  padding: 2px 10px;
  font-size: 14px;
  line-height: 1;
}

.zones-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.zone-row {
  padding: 8px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.zone-row:hover {
  background: #f3f4f6;
}

.zone-row.active {
  background: #dbeafe;
  border-left-color: #2563eb;
}

.zone-row-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.zone-row-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}

.zones-main {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 400px;
}

.zone-form-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.zone-form-head h3 {
  margin: 0;
  font-size: 18px;
}

.zone-id-line {
  font-family: monospace;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.zone-form-actions {
  display: flex;
  gap: 6px;
}

.zone-tabs {
  display: flex;
  gap: 2px;
  padding: 0 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.zone-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 10px 18px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: -1px;
}

.zone-tab:hover {
  color: #111827;
  background: #f3f4f6;
}

.zone-tab.active {
  background: white;
  border-color: #e5e7eb;
  color: #2563eb;
  font-weight: 500;
}

.zone-tab-body {
  padding: 22px;
}

.zone-tab-body .hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

/* ===== Outlets ===== */

.outlet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.outlet-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.outlet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.outlet-kind-select {
  width: 150px;
  flex-shrink: 0;
  font-weight: 500;
}
.outlet-name {
  flex: 1;
  font-weight: 500;
}
.outlet-qty {
  width: 50px;
  text-align: center;
  flex-shrink: 0;
}
.outlet-qty-label {
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
}
.outlet-switch-row {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: 6px;
  border: 1px solid #fcd34d;
}
.outlet-height-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.outlet-height-row input[type="text"] {
  flex: 1;
}
.outlet-height-mode {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.hm-radio {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: white;
}
.hm-radio.active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 600;
}
.hm-radio input {
  display: none;
}
.placement-toggle {
  display: flex;
  gap: 4px;
}

.outlet-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
}

button.danger.small {
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1;
}

.outlet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.outlet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outlet-field label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.outlet-field input,
.outlet-field textarea,
.outlet-field select {
  width: 100%;
  font-family: inherit;
}

.outlet-field textarea {
  resize: vertical;
  min-height: 38px;
}

.outlet-empty {
  color: #9ca3af;
  font-size: 13px;
  padding: 16px;
  text-align: center;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
}

.outlet-add {
  align-self: flex-start;
  font-size: 13px;
}

/* ===== Subtypes ===== */

.subtypes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subtype-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.subtype-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.subtype-name {
  flex: 1;
  font-weight: 500;
}

.subtype-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
}

.subtype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.subtype-empty {
  color: #9ca3af;
  font-size: 13px;
  padding: 16px;
  text-align: center;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
}

.subtype-hint {
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
  margin-top: 6px;
}

/* ===== Dimensions list ===== */

.dimensions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dim-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dim-value {
  flex: 0 0 180px;
}

.dim-label {
  flex: 1;
}

.dim-remove {
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1;
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.dim-remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.dim-empty {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.dim-add {
  align-self: flex-start;
  font-size: 12px;
  color: #2563eb;
}

/* ===== Finish by style ===== */

.finish-by-style {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.style-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.style-tab {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.style-tab .code {
  font-family: monospace;
  font-weight: 700;
  color: #1f2937;
}

.style-tab .name {
  color: #6b7280;
  font-size: 11px;
}

.style-tab.active {
  background: #2563eb;
  border-color: #2563eb;
}

.style-tab.active .code,
.style-tab.active .name {
  color: white;
}

.style-tab.orphan {
  background: #f3f4f6;
  border-style: dashed;
  opacity: 0.6;
}

.style-tab.orphan.active {
  background: #6b7280;
  border-color: #6b7280;
}

.finish-block-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finish-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finish-cat {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.finish-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}

.finish-cat-head:hover {
  background: #f3f4f6;
}

.finish-cat .chev {
  color: #9ca3af;
  font-size: 12px;
  width: 14px;
}

.finish-cat-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.finish-cat-count {
  background: #e5e7eb;
  color: #4b5563;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 8px;
}

.finish-cat-actions {
  display: flex;
  gap: 4px;
}

.finish-cat-actions button {
  font-size: 11px;
  padding: 3px 8px;
}

.finish-cat-body {
  padding: 12px 14px 14px;
  border-top: 1px solid #e5e7eb;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finish-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.finish-item-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
}

.finish-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  gap: 8px;
}

.finish-item-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.finish-item-actions {
  display: flex;
  gap: 6px;
}

.finish-item-actions button {
  font-size: 11px;
  padding: 3px 6px;
  flex: 1;
}

.empty-state.small {
  padding: 16px;
  font-size: 13px;
}

button.primary.small {
  padding: 4px 10px;
  font-size: 13px;
}

/* ===== Apartment rules / placement preview ===== */

/* ===== Rooms (этап 7) ===== */

.nested-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.nested-head h3 {
  margin: 0;
  font-size: 18px;
}

.nested-head .back {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 14px;
}

.nested-head .back:hover {
  background: #eff6ff;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.scenario-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scenario-thumb {
  height: 140px;
  background: #f5f5f5;
  overflow: hidden;
}

.scenario-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.scenario-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.scenario-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.scenario-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}

.scenario-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: auto;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.type-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.type-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.type-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.walls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.wall-editor {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.wall-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wall-label {
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
}

.wall-count {
  font-size: 11px;
  color: #6b7280;
}

.wall-zones {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.wall-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.wall-zone.broken {
  background: #fef2f2;
  border-color: #fecaca;
}

.wall-zone-main {
  flex: 1;
}

.wall-zone-name {
  font-size: 13px;
  font-weight: 500;
}

.wall-zone-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  flex-wrap: wrap;
}

.wall-zone-meta .subtype {
  color: #2563eb;
}

.broken-mark {
  color: #dc2626;
  font-weight: 500;
}

.wall-add {
  font-size: 12px;
  background: white;
  border: 1px dashed #93c5fd;
  color: #2563eb;
  width: 100%;
}

.wall-add:hover {
  background: #eff6ff;
}

/* Lighting placements */

.lighting-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lighting-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.lighting-card.broken {
  background: #fef2f2;
  border-color: #fecaca;
}

.lighting-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.lighting-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
}

.lighting-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
}

.lighting-ref {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 10px;
}

/* Pickers */

.picker-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: 50vh;
  min-height: 300px;
}

.picker-list {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow-y: auto;
  background: #f9fafb;
}

.picker-list.compact {
  max-height: 50vh;
  min-height: 200px;
  border: 1px solid #e5e7eb;
  background: white;
}

.picker-row {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.picker-row-body {
  flex: 1;
  min-width: 0;
}

.picker-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  flex: none;
}

.zone-preview-image {
  margin: 10px 0;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.zone-preview-image img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 4px;
}

.zone-preview-caption {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

.picker-row:hover {
  background: #eff6ff;
}

.picker-row.active {
  background: #dbeafe;
}

.picker-row.clickable:hover {
  background: #dbeafe;
}

.picker-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.picker-id {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}

.picker-meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 3px;
}

.picker-detail {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px;
  background: white;
  overflow-y: auto;
}

.picker-detail h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.picker-counts {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #6b7280;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.general-rules-textarea {
  min-height: 320px;
  width: 100%;
  resize: vertical;
}

.finish-placeholder {
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  line-height: 1.6;
}

.finish-projection {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.finish-surface-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finish-item-card.readonly {
  opacity: 0.85;
  cursor: default;
}

.area-display {
  padding: 8px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #059669;
}

.section-media {
  margin-top: 8px;
}

.style-items-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.style-items-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtype-editor h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}

.picker-style-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.picker-style-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.picker-style-clear {
  font-size: 11px;
  color: #2563eb;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

.picker-style-clear:hover {
  text-decoration: underline;
}

.comp-projection {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}

.comp-projection-title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.readonly-card {
  opacity: 0.75;
  border-style: dashed;
}

.kind-badge {
  display: inline-block;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.placement-rules-preview {
  background: #fef9c3;
  border-left: 3px solid #fbbf24;
  padding: 6px 10px;
  font-size: 11px;
  color: #92400e;
  margin-bottom: 8px;
  border-radius: 0 4px 4px 0;
  white-space: pre-wrap;
  max-height: 80px;
  overflow-y: auto;
}

.app-header .subtitle {
  color: #6b7280;
  font-size: 13px;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-user-name {
  font-size: 13px;
  color: #374151;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-user-icon {
  opacity: 0.6;
}
.app-user-logout {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.app-user-logout:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}
.app-user-logout--exit:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* ===== Login page (form-based session auth) ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8faff 0%, #e5e7eb 100%);
  padding: 20px;
}
.login-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.08), 0 2px 4px rgba(0,0,0,0.05);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}
.login-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: -8px;
  margin-bottom: 8px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.login-field > span {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-field input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.login-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.login-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.login-submit {
  margin-top: 6px;
  padding: 11px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.login-submit:hover:not(:disabled) {
  background: #1d4ed8;
}
.login-submit:disabled {
  background: #9ca3af;
  cursor: wait;
}
.login-hint {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}
.login-hint code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

/* ===== Контейнер ===== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

/* ===== Сетка карточек комнат ===== */

.rooms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.rooms-toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.room-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.room-card .meta {
  color: #6b7280;
  font-size: 12px;
}

.room-card .room-type-id {
  color: #9ca3af;
  font-size: 11px;
  font-family: monospace;
}

.room-card .actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.room-card .actions button {
  font-size: 12px;
  padding: 4px 8px;
  flex: 1;
}

.empty-state {
  background: white;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 48px;
  text-align: center;
  color: #6b7280;
}

/* ===== Модалка ===== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 10px;
  padding: 24px;
  min-width: 420px;
  max-width: 90vw;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.modal h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.modal .field {
  margin-bottom: 14px;
}

.modal .field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.modal .field .hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

.modal .field .error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* ===== Тосты ===== */

.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  padding: 12px 16px;
  border-radius: 6px;
  background: #1f2937;
  color: white;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slide-in 0.2s;
}

.toast.error {
  background: #dc2626;
}

.toast.success {
  background: #059669;
}

@keyframes slide-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===== Загрузка ===== */

.loading {
  text-align: center;
  padding: 32px;
  color: #6b7280;
}

/* ===== Редактор: общая раскладка ===== */

.editor {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.editor-toolbar .back {
  background: transparent;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  color: #2563eb;
}

.editor-toolbar .title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.editor-toolbar .dirty-marker {
  color: #d97706;
  font-size: 12px;
  margin-left: 8px;
}

.editor-toolbar .lock-info {
  font-size: 11px;
  color: #6b7280;
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 4px;
}

.editor-toolbar .lock-info.readonly {
  background: #fef3c7;
  color: #92400e;
}

.editor-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.editor-tree {
  width: 360px;
  border-right: 1px solid #e5e7eb;
  background: white;
  overflow-y: auto;
  padding: 12px 0;
}

.editor-form {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  background: #fafafa;
}

/* ===== Дерево ===== */

.tree-node {
  user-select: none;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  margin: 1px 6px;
  min-height: 26px;
}

.tree-row:hover {
  background: #f3f4f6;
}

.tree-row.selected {
  background: #dbeafe;
}

.tree-row .chevron {
  width: 14px;
  text-align: center;
  color: #6b7280;
  font-size: 10px;
  flex-shrink: 0;
}

.tree-row .chevron.placeholder {
  visibility: hidden;
}

.tree-row .icon {
  width: 16px;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}

.tree-row .label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-row .count {
  color: #9ca3af;
  font-size: 11px;
  flex-shrink: 0;
}

.tree-row .row-actions {
  display: none;
  gap: 2px;
  flex-shrink: 0;
}

.tree-row:hover .row-actions {
  display: flex;
}

.tree-row .row-actions button {
  font-size: 10px;
  padding: 1px 5px;
  background: white;
  border: 1px solid #d1d5db;
}

.tree-children {
  padding-left: 16px;
}

/* ===== Форма редактирования ===== */

.form-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  max-width: 800px;
}

.form-card h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.form-card .breadcrumb {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.form-row > .form-field {
  flex: 1;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.form-field .hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

.form-field .error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
}

.form-field textarea {
  min-height: 60px;
  font-family: inherit;
  resize: vertical;
}

.form-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

.form-section h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Чекбоксы стен */
.walls-checks {
  display: flex;
  gap: 8px;
}

.wall-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  font-size: 13px;
}

.wall-check.checked {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
}

.wall-check input {
  display: none;
}

/* Specs key-value editor */
.specs-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.specs-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.specs-row input[type="text"]:first-child {
  flex: 0 0 200px;
}

.specs-row input[type="text"]:nth-child(2) {
  flex: 1;
}

.specs-row button {
  padding: 4px 8px;
  font-size: 12px;
}

.specs-add {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
}

/* JSON preview */
.json-preview {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

.json-preview summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  user-select: none;
}

.json-preview pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 14px;
  border-radius: 6px;
  font-size: 11px;
  overflow-x: auto;
  margin-top: 8px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

/* Списки в правой панели для категорий/зон */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.item-list .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.item-list .item:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.item-list .item-name {
  flex: 1;
  font-weight: 500;
}

.item-list .item-id {
  font-family: monospace;
  font-size: 11px;
  color: #9ca3af;
}

.item-list .item-empty {
  padding: 24px;
  text-align: center;
  color: #9ca3af;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.subcategory-card {
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.subcategory-card:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.subcategory-card .name {
  font-weight: 500;
  margin-bottom: 4px;
}

.subcategory-card .count {
  font-size: 12px;
  color: #6b7280;
}

.meta-readonly {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
}

.meta-readonly .meta-item {
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 4px;
}

/* ===== История изменений ===== */

.history-modal {
  min-width: 720px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.history-body {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 400px;
  max-height: 60vh;
}

.history-list {
  width: 280px;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  padding-right: 12px;
  flex-shrink: 0;
}

.history-item {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.history-item:hover {
  background: #f3f4f6;
}

.history-item.selected {
  background: #dbeafe;
  border-color: #2563eb;
}

.history-item .ts {
  font-size: 12px;
  font-weight: 500;
}

.history-item .user {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.history-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.history-preview-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}

.history-item.latest {
  border-color: #10b981;
}
.history-item .tag {
  font-size: 10px;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  flex-shrink: 0;
}
.history-head-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.history-mode {
  display: flex;
  gap: 4px;
}
.history-mode button {
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 4px;
  cursor: pointer;
}
.history-mode button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.history-json {
  flex: 1;
  overflow: auto;
  background: #1f2937;
  color: #e5e7eb;
  padding: 14px;
  margin: 0;
  font-size: 11px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Читаемый diff */
.diff-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
}
.diff-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 20px;
}
.diff-group {
  margin-bottom: 16px;
}
.diff-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.diff-add .diff-group-title { color: #059669; }
.diff-remove .diff-group-title { color: #dc2626; }
.diff-change .diff-group-title { color: #d97706; }

.diff-row {
  display: flex;
  align-items: baseline;
  font-size: 13px;
  padding: 3px 0;
  line-height: 1.45;
  border-radius: 3px;
}
.diff-row + .diff-row {
  border-top: 1px dashed #f3f4f6;
}
.diff-mark {
  display: inline-block;
  width: 18px;
  text-align: center;
  font-weight: 700;
  flex-shrink: 0;
}
.diff-add .diff-mark { color: #059669; }
.diff-remove .diff-mark { color: #dc2626; }
.diff-change .diff-mark { color: #d97706; }
.diff-path {
  color: #374151;
  font-weight: 500;
}
.diff-val {
  color: #6b7280;
  margin-left: 2px;
}

/* Заглушка правой панели */
.placeholder-form {
  padding: 24px;
  background: white;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #6b7280;
}

.placeholder-form h3 {
  margin-top: 0;
  color: #374151;
}

.placeholder-form pre {
  background: #f3f4f6;
  padding: 12px;
  border-radius: 4px;
  font-size: 12px;
  overflow-x: auto;
}

/* Lock banner */
.lock-banner {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.lock-banner h4 {
  margin: 0 0 8px 0;
  color: #92400e;
}

.lock-banner .actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ===== Дизайн-проект ===== */

.design-template-block,
.design-projects-block {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 20px;
}

.design-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.design-block-head h3 {
  margin: 0;
  font-size: 17px;
  color: #111827;
}
.design-block-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.design-template-block .design-block-head {
  display: block;
  margin-bottom: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.project-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
}
.project-card:hover {
  background: #eff6ff;
  border-color: #2563eb;
  transform: translateY(-1px);
}
.project-card-name {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
  margin-bottom: 6px;
}
.project-card-meta {
  font-size: 12px;
  color: #6b7280;
}
.project-card-date {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.design-project-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sheets-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.sheets-table th {
  background: #f3f4f6;
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}
.sheets-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.sheets-table tr:last-child td {
  border-bottom: none;
}
.sheets-table .cell-center {
  text-align: center;
}
.sheets-table .cell-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.sheets-table .sheet-num {
  width: 60px;
  font-family: monospace;
  text-align: center;
}
.sheets-table .sheet-name {
  width: 100%;
}
/* Список предупреждений перед сохранением */
.save-warnings {
  max-height: 360px;
  overflow-y: auto;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 10px 14px 10px 28px;
  margin: 10px 0;
  font-size: 13px;
  color: #78350f;
}
.save-warnings li {
  margin-bottom: 4px;
  line-height: 1.5;
}

/* Маркер незаполненности */
.incomplete-dot {
  color: #ef4444;
  font-size: 14px;
  margin-right: 6px;
  cursor: help;
}

/* 3D визуализация типов (L/R пары) */
.type-3d-pair {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.type-3d-pair-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.t3d-name {
  flex: 1;
  font-weight: 600;
}
.t3d-sep {
  font-size: 18px;
  color: #6b7280;
}
.type-3d-pair-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .type-3d-pair-body { grid-template-columns: 1fr; }
}

/* Визуальная развёртка стены */
.wall-elevation {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.elev-row-wrap {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.elev-label {
  flex: 0 0 70px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  display: flex;
  align-items: center;
}
.elev-row {
  flex: 1;
  display: flex;
  gap: 1px;
  min-height: 36px;
}
.elev-block {
  border-radius: 3px;
  padding: 2px 3px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  cursor: default;
  border: 1px solid;
  min-width: 16px;
}
.elev-floor .elev-block {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.elev-wall .elev-block {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.elev-endcap {
  opacity: 0.6;
  border-style: dashed;
}
.elev-block-name {
  font-size: 8px;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.elev-block-size {
  font-size: 7px;
  color: inherit;
  opacity: 0.7;
}

/* Пикер позиций на стене */
.wall-items-picker {
  width: 100%;
  margin-top: 8px;
}
.wip-selected {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.wip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
}
.wip-num {
  font-weight: 700;
  color: #6b7280;
  flex: 0 0 20px;
  text-align: center;
}
.wip-name {
  flex: 1;
  font-weight: 500;
}
.wip-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.wip-group {
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid #e5e7eb;
}
.wip-floor {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.wip-wall {
  background: #fefce8;
  border-color: #fde68a;
}
.wip-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.wip-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}
.wip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 11px;
}
.wip-chip-name {
  font-weight: 500;
  white-space: nowrap;
}
.wip-chip-actions {
  display: flex;
  gap: 2px;
}
.wip-chip-actions button {
  padding: 1px 4px;
  font-size: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
}
.wip-chip-actions button.danger {
  color: #dc2626;
  border-color: #fca5a5;
}
.wip-chip-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}
.wip-empty {
  font-size: 12px;
  color: #9ca3af;
}
.wip-palette {
  border-top: 1px dashed #d1d5db;
  padding-top: 6px;
}
.wip-palette-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 4px;
}
.wip-palette-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wip-palette-btn {
  padding: 3px 8px;
  font-size: 11px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  color: #1d4ed8;
  cursor: pointer;
  white-space: nowrap;
}
.wip-palette-btn:hover {
  background: #dbeafe;
}

.item-card-subtab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.item-card-subtab select {
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.check-yes {
  color: #059669;
  font-weight: 700;
  font-size: 16px;
}
.check-no {
  color: #d1d5db;
  font-size: 14px;
}

/* Редактор листа */
.sheet-editor .design-block {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.sheet-editor .design-block > h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #111827;
}
.sheet-editor textarea {
  width: 100%;
  font-family: inherit;
  resize: vertical;
}

.design-subblock {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.design-subblock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.design-subblock textarea {
  margin-bottom: 10px;
}
.remove-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  flex-shrink: 0;
  align-self: flex-end;
}
.picker-select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
  padding: 8px 0;
}
.checkbox-label input {
  margin: 0;
  width: 16px;
  height: 16px;
}
.sheet-editor-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-bottom: 30px;
}

/* CaptionedImageList */
.captioned-images {
  margin-top: 8px;
}
.captioned-images-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cil-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.cil-empty {
  font-size: 12px;
  color: #9ca3af;
  padding: 8px 0;
}
.cil-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.cil-image {
  flex: 0 0 250px;
}
.cil-caption {
  flex: 1;
}
.cil-caption textarea {
  width: 100%;
  font-family: inherit;
  resize: vertical;
}
.cil-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  flex-shrink: 0;
}

/* ==== Мини-планировка комнаты ==== */
.mini-plan {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
.mini-plan-grid {
  display: grid;
  grid-template-columns: 180px 220px 180px;
  grid-template-rows: auto 160px auto;
  grid-template-areas:
    ".    top     ."
    "left center right"
    ".    bottom  .";
  gap: 6px;
  width: 100%;
  max-width: 640px;
}
.mini-wall {
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #f9fafb;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 52px;
  overflow: hidden;
}
/* Чертежи всегда рисуются входной дверью вниз.
   Стена с окном D — почти всегда сверху, A — справа, B — снизу (вход), C — слева. */
.mini-wall-d { grid-area: top; }
.mini-wall-a { grid-area: right; }
.mini-wall-b { grid-area: bottom; }
.mini-wall-c { grid-area: left; }
.mini-room-center {
  grid-area: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
}
.mini-wall-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-wall-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mini-chip {
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-chip.missing {
  background: #fee2e2;
  color: #991b1b;
}
.mini-chip-extra {
  opacity: 0.7;
}
.mini-empty {
  color: #9ca3af;
  font-size: 11px;
  font-style: italic;
}
@media (max-width: 720px) {
  .mini-plan-grid {
    grid-template-columns: 120px 160px 120px;
    grid-template-rows: auto 120px auto;
  }
}

/* ==== Глобальный поиск ==== */
.search-results {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  margin-top: 8px;
}
.search-group-head {
  background: #f3f4f6;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
}
.search-result {
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.search-result:hover {
  background: #eff6ff;
}
.search-result-title {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
}
.search-result-subtitle {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

/* ==== Локи по комнатам: кто что редактирует ==== */
.room-card.locked-by-other {
  border-color: #fbbf24;
  background: linear-gradient(0deg, #fffbeb, #ffffff);
}
.lock-badge {
  display: inline-block;
  margin: 6px 0 0;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

/* ==== Зона v3.26: глобальный переключатель стилей + варианты отделки ==== */
.zone-style-switcher {
  margin: 14px 0 6px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}
.zone-style-switcher-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.zone-style-switcher .hint {
  margin-top: 6px;
  font-size: 11px;
}
.zone-style-tabs {
  margin: 0;
}
.zone-substyle-switcher {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #bfdbfe;
}
/* Одинаковый лейбл со стилями наверху */
.zone-substyle-switcher-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.zone-substyle-tabs {
  margin: 0;
}
/* Плашки подстилей = обычные .style-tab. Отличие только у базового —
   тонкая полоска слева для подсказки. Цвет активного = тот же синий что
   и у стилей (наследуется). */
.style-tab.substyle-tab.base {
  border-left: 3px solid #93c5fd;
}
.style-tab.substyle-tab .base-mark { display: none; }
.zone-style-images .captioned-images {
  margin-top: 4px;
}

.finish-variants .finish-variant {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.finish-variant-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
}
.finish-variant.open .finish-variant-head,
.finish-variants .finish-variant .finish-variant-head:hover {
  background: #f9fafb;
}
.fv-caret {
  color: #6b7280;
  font-size: 10px;
  width: 12px;
  flex: none;
}
.fv-desc {
  color: #6b7280;
  font-size: 12px;
}
.finish-variant-body {
  padding: 12px 14px 14px;
  border-top: 1px solid #f3f4f6;
}
.finish-variant-body h5 {
  margin: 12px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #374151;
}

/* ==== Inline-валидация ==== */
.validated-input {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
}
.field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
.field-error-msg {
  color: #dc2626;
  font-size: 11px;
  margin-top: 2px;
}

/* ==== Офлайн-индикатор ==== */
.offline-indicator {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
  border-radius: 14px;
  font-size: 12px;
}
.offline-indicator.offline {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

/* ==== Корзина ==== */
.trash-list {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.trash-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid #f3f4f6;
}
.trash-entry:first-child {
  border-top: none;
}
.trash-entry-main { flex: 1; min-width: 0; }
.trash-kind-label {
  display: inline-block;
  padding: 1px 6px;
  background: #e5e7eb;
  color: #374151;
  border-radius: 8px;
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.trash-name {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-meta {
  font-size: 11px;
  color: #6b7280;
}
.trash-entry-actions {
  display: flex;
  gap: 4px;
}

/* ==== Лента активности ==== */
.activity-feed {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
}
.activity-row {
  display: grid;
  grid-template-columns: 90px 100px 80px 120px 1fr;
  gap: 8px;
  padding: 5px 10px;
  border-top: 1px solid #f3f4f6;
}
.activity-row:first-child { border-top: none; }
.activity-time { color: #6b7280; font-family: monospace; font-size: 11px; }
.activity-user { color: #111827; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.activity-event { color: #374151; }
.activity-kind { color: #2563eb; font-size: 11px; padding-top: 1px; }
.activity-target { color: #6b7280; overflow: hidden; text-overflow: ellipsis; }

/* ==== Заметки-стикеры (note-field) ==== */
.note-field {
  margin: 8px 0;
  padding: 8px 10px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 6px;
}
.note-field.empty {
  padding: 0;
  background: transparent;
  border: 0;
}
.note-add-btn {
  background: transparent;
  border: 1px dashed #d1d5db;
  color: #6b7280;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}
.note-add-btn:hover {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}
.note-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.note-icon {
  font-size: 14px;
}
.note-label {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  flex: 1;
}
.note-clear {
  background: transparent;
  border: 0;
  color: #92400e;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
}
.note-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border: 0;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
  color: #451a03;
}

/* ==== Presence-badge в шапке ==== */
.presence-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.presence-badge:hover {
  background: #d1fae5;
}
.presence-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.presence-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 8px 10px;
  min-width: 220px;
  z-index: 100;
  color: #111827;
}
.presence-head {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}
.presence-row {
  padding: 4px 0;
  font-size: 13px;
  border-top: 1px solid #f3f4f6;
}
.presence-row:first-of-type {
  border-top: none;
}

/* ==== TOC ==== */
.with-toc {
  position: relative;
}
.section-toc {
  position: sticky;
  float: right;
  top: 80px;
  width: 190px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  margin-left: 16px;
  margin-bottom: 12px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
}
.toc-head {
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.toc-link {
  display: block;
  color: #2563eb;
  padding: 3px 0;
  text-decoration: none;
  border-radius: 3px;
}
.toc-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
@media (max-width: 900px) {
  .section-toc { display: none; }
}

/* ==== Dashboard статистика ==== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-card-wide {
  grid-column: 1 / -1;
}
.stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.stat-sub {
  font-size: 13px;
  color: #374151;
  margin-top: 2px;
}

/* ==== Недавние комнаты ==== */
.recent-rooms {
  margin: 6px 0 18px;
}
.recent-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 6px;
}
.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.recent-chip {
  display: inline-block;
  padding: 4px 12px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 14px;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #dbeafe;
}
.recent-chip:hover {
  background: #dbeafe;
}

/* ==== Неиспользуемые товары ==== */
.unused-list {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.unused-group-head {
  background: #f3f4f6;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 12px;
  color: #374151;
}
.unused-row {
  padding: 6px 12px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
}
.unused-name {
  color: #111827;
}
.unused-id {
  font-family: monospace;
  font-size: 11px;
  color: #9ca3af;
}

/* ==== Hover preview картинки ==== */
.hover-preview {
  pointer-events: none;
}
.hover-preview img {
  display: block;
  max-width: 220px;
  max-height: 200px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ==== Хлебные крошки ==== */
.breadcrumbs {
  font-size: 12px;
  color: #6b7280;
  padding: 6px 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}
.bc-item {
  display: inline-flex;
  align-items: center;
}
.bc-item.last {
  color: #111827;
  font-weight: 500;
}
.bc-link {
  background: none;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
  color: #2563eb;
  font-size: inherit;
}
.bc-link:hover {
  text-decoration: underline;
}
.bc-sep {
  color: #9ca3af;
  margin: 0 2px;
}

/* ==== Сворачиваемые секции ==== */
.form-section.collapsible {
  padding: 0;
}
.form-section.collapsible .collapsible-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  background: #f9fafb;
  border-bottom: 1px solid transparent;
  transition: background 0.1s;
}
.form-section.collapsible.open .collapsible-head {
  border-bottom-color: #e5e7eb;
}
.form-section.collapsible .collapsible-head:hover {
  background: #f3f4f6;
}
.form-section.collapsible .collapsible-caret {
  color: #6b7280;
  font-size: 10px;
  width: 12px;
  flex: none;
}
.form-section.collapsible .collapsible-title {
  margin: 0;
  flex: 1;
  font-size: 16px;
}
.form-section.collapsible .collapsible-extra {
  margin-left: auto;
}
.form-section.collapsible .collapsible-body {
  padding: 14px;
}

/* ==== Потолочное освещение по парам стилей ==== */
.ceiling-lighting-by-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cl-col {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  background: #fafafa;
}
.cl-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #111827;
}
.cl-col-hint {
  font-size: 12px;
  color: #6b7280;
  font-weight: normal;
}
.cl-rule {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
  margin-bottom: 10px;
}
.cl-rule-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cl-rule textarea {
  margin-top: 6px;
  width: 100%;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
@media (max-width: 900px) {
  .ceiling-lighting-by-pair {
    grid-template-columns: 1fr;
  }
}

/* ==== 3D визуализация по стилям (в сценарии) ==== */
.type-3d-by-style .type-3d-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.type-3d-by-style .t3d-col {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  background: #fafafa;
}
.type-3d-by-style .t3d-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #374151;
}
.type-3d-by-style .t3d-image {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
  margin-bottom: 10px;
}
.type-3d-by-style .t3d-image-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.type-3d-by-style .t3d-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  flex: 1;
}
.type-3d-by-style .t3d-range-label {
  font-size: 12px;
  color: #6b7280;
}
.type-3d-by-style .t3d-type-select {
  font-size: 12px;
  padding: 2px 6px;
  min-width: 70px;
}
.type-3d-by-style .t3d-image textarea {
  margin-top: 6px;
  width: 100%;
  font-family: inherit;
  resize: vertical;
  min-height: 42px;
}
@media (max-width: 900px) {
  .type-3d-by-style .type-3d-columns {
    grid-template-columns: 1fr;
  }
}

/* ==== Переключатель версии интерфейса v2.6 / v3.1 ==== */
.version-switcher {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin: 16px 0;
}
.version-card {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}
.version-card:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}
.version-card.active {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.version-card.v31.active {
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.18);
}
.version-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.version-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e5e7eb;
  color: #374151;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
}
.version-tag.v31 {
  background: #dcfce7;
  color: #15803d;
}
.version-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.version-dot {
  margin-left: auto;
  color: #2563eb;
  font-size: 16px;
}
.version-card.v31.active .version-dot {
  color: #16a34a;
}
.version-desc {
  font-size: 13px;
  color: #4b5563;
  margin: 4px 0 0;
}
.version-features {
  margin: 8px 0 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 16px;
  font-size: 12px;
  color: #374151;
  line-height: 1.55;
}
.version-features li {
  break-inside: avoid;
  margin-bottom: 2px;
}
@media (max-width: 720px) {
  .version-switcher { grid-template-columns: 1fr; }
  .version-features { columns: 1; }
}

/* ========== База серий домов ========== */

.bs-list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.bs-search {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
/* Префикс-фильтр (startsWith) — рядом с обычным поиском, чуть уже. */
.bs-search-prefix {
  flex: 0 0 300px;
}

/* ---------- Блок «Тип записи» на карточке серии/модификации ---------- */
.bs-type-block {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 10px 0 16px;
}
.bs-type-title {
  font-weight: 600;
  font-size: 13px;
  color: #55627a;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.bs-type-radios {
  display: flex;
  gap: 24px;
  margin-bottom: 10px;
  align-items: center;
}
.bs-type-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #24292f;
}
.bs-type-radios input[type="radio"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #2e6fdc;
}
.bs-parent-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.bs-parent-picker-label {
  flex-shrink: 0;
  font-size: 13px;
  color: #55627a;
  min-width: 80px;
}
.bs-parent-picker .searchable-select-wrap,
.bs-parent-picker .searchable-select-container {
  flex: 1;
}
.bs-ancestor-path {
  margin-top: 8px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px dashed #cfd3d8;
  border-radius: 4px;
  font-size: 13px;
  color: #55627a;
  overflow-wrap: anywhere;
}
.bs-ancestor-path-label {
  font-weight: 500;
  margin-right: 6px;
  color: #6a7480;
}
.bs-ancestor-sep {
  color: #adb5bd;
  padding: 0 4px;
}
.bs-ancestor-link {
  background: none;
  border: none;
  padding: 0;
  color: #2e6fdc;
  cursor: pointer;
  font: inherit;
}
.bs-ancestor-link:hover { text-decoration: underline; }
.bs-ancestor-current {
  font-weight: 500;
  color: #1f7a3a;
}

/* Быстрый селектор «подчинить модификации той же серии» */
.bs-parent-picker-sibling {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #cfd3d8;
}
.bs-parent-picker-sibling .bs-parent-picker-label {
  color: #55627a;
}
.bs-parent-picker-empty {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

/* ---------- Toggle Список / Планировки в Базе серий ---------- */
.bs-view-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 16px;
  border-bottom: 1px solid #ddd;
}
.bs-view-tab {
  padding: 8px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.bs-view-tab:hover { color: #222; }
.bs-view-tab.active {
  color: #2e6fdc;
  border-bottom-color: #2e6fdc;
  font-weight: 600;
}

/* ---------- Вкладка «Планировки» ---------- */
.bs-plans-wrap {
  overflow: auto;
  max-height: calc(100vh - 260px);
  border: 1px solid #e5e5e5;
}
.bs-plans-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: #fff;
}
.bs-plans-table th,
.bs-plans-table td {
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding: 5px 8px;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
}
.bs-plans-table th:first-child,
.bs-plans-table td:first-child { border-left: 1px solid #e5e5e5; }
.bs-plans-table thead th {
  position: sticky;
  top: 0;
  background: #f6f6f6;
  font-weight: 600;
  z-index: 3;
  box-shadow: inset 0 -1px 0 #d0d0d0;
}
.bs-plans-hier {
  min-width: 130px;
  max-width: 200px;
  text-align: left;
}
.bs-plans-col-plan { min-width: 76px; }
.bs-plans-num {
  min-width: 40px;
  max-width: 50px;
  text-align: center;
  color: #6a7480;
  font-variant-numeric: tabular-nums;
  background: #f7f8fa;
}
.bs-plans-name button { text-align: left; }
.bs-plans-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #24292f;
}
.bs-plans-empty { background: #fafbfc; }
.bs-plans-row-mod { background: #fbfcfe; }
/* Жирный разделитель между корневыми сериями */
.bs-plans-row-new-root td,
.bs-plans-row-new-root th {
  border-top: 6px solid #2f3944 !important;
}
.bs-plans-legend {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 13px;
  color: #55627a;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bs-plans-legend strong { color: #24292f; }
.bs-plans-legend code {
  background: #fff;
  padding: 1px 5px;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  font-size: 12px;
}

/* Нумерация планировок «Планировка №N» в карточке. */
.bs-plan-number {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6a7480;
  margin-bottom: 4px;
}

/* Панель управления добавлением: «+ Своя» и dropdown «+ Привязать» */
.bs-plans-add-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bs-plan-link-select {
  max-width: 340px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

/* Ссылочная планировка (linked_from установлен) — только просмотр. */
.bs-plan-linked {
  background: #f0f7ff;
  border: 1px solid #b3d7ff;
}
.bs-plan-linked-broken {
  background: #ffeeed;
  border: 1px solid #f0b0a0;
}
.bs-plan-linked-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #dbeafe;
  color: #1c60b0;
  border-radius: 3px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.bs-plan-linked-error {
  padding: 6px 10px;
  color: #925a00;
  font-size: 13px;
}
.bs-plan-linked-fields {
  display: flex;
  gap: 16px;
  margin: 6px 0;
}
.bs-plan-linked-image img {
  max-height: 120px;
  border: 1px solid #d5d9e0;
  border-radius: 4px;
}
.bs-plan-linked-info { font-size: 13px; }
.bs-plan-linked-info span { color: #6a7480; margin-right: 4px; }
.bs-plan-linked-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* Иконка ссылки в клетке аналитики */
.bs-plans-cell-linked::after {
  content: " ↗";
  color: #1c60b0;
  font-size: 10px;
}
.bs-plans-cell-clickable {
  cursor: pointer;
  transition: box-shadow 80ms, filter 80ms;
}
.bs-plans-cell-clickable:hover {
  filter: brightness(0.95);
  box-shadow: inset 0 0 0 2px #1c60b0;
}

/* Отступ и tree-brunch для модификаций глубже 1 уровня. */
.bs-mod-cell { display: block; }
.bs-tree-branch {
  color: #adb5bd;
  font-family: "Segoe UI Mono", "SF Mono", Consolas, monospace;
  font-size: 12px;
  user-select: none;
}
/* Имя серии/мод + бейдж под ним (не в одну строку). */
.bs-name-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.bs-name-stack .bs-badge { margin-left: 0; }

/* Таблица — самостоятельный скролл-контейнер: и по X, и по Y. Без max-height
   sticky-заголовки не липнут (они пиннятся к верху ближайшего скроллящегося
   предка; когда предок сам не скроллится вертикально — «прилипать» некуда). */
.bs-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 260px);
}
.bs-table {
  width: 100%;
  border-collapse: separate;    /* collapse ломает sticky-границы */
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
}
.bs-table th,
.bs-table td {
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 10px;
  vertical-align: middle;
  text-align: left;
}
.bs-table th:first-child,
.bs-table td:first-child { border-left: 1px solid #e5e5e5; }
.bs-table thead th { border-top: 1px solid #e5e5e5; }
.bs-table th {
  background: #f6f6f6;
  font-weight: 600;
  white-space: normal;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.2;
}
/* Sticky-заголовки — не уезжают при скролле таблицы вертикально. */
.bs-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f6f6f6;
  box-shadow: inset 0 -1px 0 #d0d0d0;
}
.bs-table tbody tr:hover { background: #fafafa; }
.bs-col-num { text-align: center; width: 36px; color: #888; }
.bs-col-flag {
  text-align: center;
  white-space: nowrap;
  font-size: 15px;
  width: 62px;         /* фиксируем узкие технические колонки */
  min-width: 62px;
}
.bs-table th.bs-col-flag { font-size: 11px; padding: 6px 4px; }  /* заголовки этих колонок ещё компактнее */
.bs-col-aliases { color: #555; font-size: 13px; width: 160px; max-width: 160px; }
.bs-col-name { font-weight: 500; width: 180px; min-width: 140px; }
.bs-col-mods { width: 220px; min-width: 160px; }
.bs-col-comment {
  color: #555;
  font-size: 13px;
  max-width: 240px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bs-series-link {
  background: none;
  border: none;
  padding: 0;
  color: #2e6fdc;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.bs-series-link:hover { text-decoration: underline; }

/* Бейдж классификации серии из master-файла: рядом с именем в списке. */
.bs-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  vertical-align: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  user-select: none;
}
.bs-badge-etalon    { background: #eef2f7; color: #55627a; }
.bs-badge-stitched  { background: #e3f0ff; color: #1c60b0; }
.bs-badge-review    { background: #fff2cf; color: #925a00; }
.bs-badge-verified  { background: #d7f5d9; color: #1f7a3a; }
.bs-badge-enriched  { background: #f2e6fa; color: #6d3fa0; }

/* Чекбокс «проверено» рядом с бейджем. Виден только у наш-модиф / наш-новая-серия. */
.bs-verify-check {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: 1px;
  cursor: pointer;
}
.bs-verify-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #1f7a3a;
}
.bs-verify-check input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Блок «Проверка» на карточке серии — виден только у наш-модиф / наш-новая-серия. */
.bs-verify-block {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid;
}
.bs-verify-block.pending  { background: #fff7de; border-color: #f0d270; }
.bs-verify-block.verified { background: #ecf9ec; border-color: #94ce9c; }
.bs-verify-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  color: #24292f;
}
.bs-verify-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1f7a3a;
  cursor: pointer;
}
.bs-verify-label input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.5; }
.bs-verify-hint {
  margin-top: 6px;
  font-size: 13px;
  color: #6a7480;
}

/* Блок «Данные из адресной базы Москвы» на карточке серии. */
.bs-moscow-block {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.bs-moscow-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 14px;
}
.bs-moscow-row:last-child { margin-bottom: 0; }
.bs-moscow-label {
  color: #6a7480;
  min-width: 130px;
  flex-shrink: 0;
}
.bs-moscow-value {
  color: #24292f;
  font-weight: 500;
}
.bs-moscow-yandex {
  color: #2e6fdc;
  text-decoration: none;
  font-weight: 500;
}
.bs-moscow-yandex:hover { text-decoration: underline; }

/* Карточка серии */
.bs-card { margin-top: 8px; }
.bs-breadcrumbs {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.bs-card-body { display: flex; flex-direction: column; gap: 20px; }
.bs-section-title {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

.bs-card .form-row { display: flex; flex-direction: column; gap: 6px; }
.bs-card .form-row label { font-weight: 500; font-size: 13px; color: #555; }
.bs-card .form-row input[type="text"],
.bs-card .form-row textarea {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.bs-card .form-hint { font-size: 12px; color: #888; }

/* 14 полей описания — двухколоночная форма (label слева 250px + input справа) */
.bs-desc-form {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 8px 16px;
  align-items: center;
}
.bs-desc-row {
  display: contents;
}
.bs-desc-row.is-textarea {
  align-items: start;
}
.bs-desc-label {
  text-align: right;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  padding-top: 2px;
}
.bs-desc-row.is-textarea .bs-desc-label {
  padding-top: 8px;
}
.bs-desc-field input[type="text"],
.bs-desc-field textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
@media (max-width: 720px) {
  .bs-desc-form { grid-template-columns: 1fr; }
  .bs-desc-label { text-align: left; padding-top: 0; }
}

/* Превью кликабельных ссылок под textarea */
.bs-links-preview {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f7f9fc;
  border: 1px solid #e0e6ee;
  border-radius: 6px;
  font-size: 13px;
}
.bs-links-preview-head {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 4px;
}
.bs-links-preview ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bs-links-preview a {
  color: #2e6fdc;
  text-decoration: none;
  word-break: break-all;
}
.bs-links-preview a:hover { text-decoration: underline; }

/* Галерея фото дома */
.bs-gallery { display: flex; flex-direction: column; gap: 10px; }
.bs-gallery-empty { color: #888; font-style: italic; padding: 12px 0; }
.bs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.bs-gallery-cell {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}
.bs-gallery-cell img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.bs-gallery-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.bs-gallery-remove:hover { background: rgba(200, 0, 0, 0.85); }
.bs-gallery-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px dashed #aaa;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  width: max-content;
  background: #fafafa;
}
.bs-gallery-add:hover { background: #f0f0f0; }
.bs-gallery-add input { display: none; }

/* Планировки/перепланировки */
.bs-plans { display: flex; flex-direction: column; gap: 12px; }
.bs-plans-head { display: flex; align-items: center; gap: 12px; }
.bs-plans-head h3 { margin: 0; font-size: 16px; }
.bs-plans-empty { color: #888; font-style: italic; }

/* mode="floor" — компактная строка с площадью и ориентацией */
.bs-plan-row {
  display: grid;
  grid-template-columns: 140px 90px 110px 130px 1fr 32px;
  gap: 10px;
  align-items: end;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}
.bs-plan-row-image .file-current { padding: 0; }
.bs-plan-row-image .file-thumb img { max-width: 120px; max-height: 80px; }
.bs-plan-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bs-plan-cell-grow { min-width: 0; }
.bs-plan-label { font-size: 11px; color: #6b7280; }
.bs-plan-cell select,
.bs-plan-cell input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.bs-plan-row-remove {
  width: 28px;
  height: 28px;
  align-self: end;
  margin-bottom: 4px;
}

/* mode="renovation" — старый блочный layout */
.bs-plan-card {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr 40px;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}
.bs-plan-fields { display: flex; flex-direction: column; gap: 8px; }
.bs-plan-rooms { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bs-plan-rooms select {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.bs-plan-comment {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.bs-plan-remove {
  width: 32px; height: 32px;
  align-self: start;
}

.bs-links {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

@media (max-width: 720px) {
  .bs-plan-card { grid-template-columns: 1fr; }
  .bs-plan-row { grid-template-columns: 1fr; }
}

/* Табы фильтра типов зданий */
.bs-types { margin: 12px 0 8px; }
.bs-types-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.bs-type-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}
.bs-type-tab:hover { background: #f5f5f5; }
.bs-type-tab.active {
  background: #2e6fdc;
  color: #fff;
  border-color: #2e6fdc;
}
.bs-type-tab .cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
  height: 18px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 600;
}
.bs-type-tab.active .cnt { background: rgba(255, 255, 255, 0.25); }
.bs-type-tab.add {
  border-style: dashed;
  color: #555;
}
.bs-type-toolbar {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f6f8fb;
  border: 1px solid #e5eaf2;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bs-type-toolbar .bs-type-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #777;
}

/* Модификации в карточке и в ячейке таблицы */
.bs-card-badge {
  display: inline-block;
  margin-left: 12px;
  padding: 3px 10px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #806000;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.bs-mods-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.bs-mods-empty { color: #888; font-style: italic; }
.bs-mods-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* ========== База адресов ========== */
.addr-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.addr-list-toolbar { display: flex; gap: 12px; margin-bottom: 12px; }

.addr-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.addr-filters input,
.addr-filters select {
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.addr-search { font-family: inherit; }
@media (max-width: 720px) {
  .addr-filters { grid-template-columns: 1fr; }
  .addr-stats { grid-template-columns: 1fr; }
}

.addr-table-wrap { overflow-x: auto; }
.addr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
.addr-table th, .addr-table td {
  border: 1px solid #e5e5e5;
  padding: 8px 10px;
  vertical-align: middle;
  text-align: left;
}
.addr-table th {
  background: #f6f6f6;
  font-weight: 600;
  white-space: nowrap;
}
.addr-table tbody tr:hover { background: #fafafa; }
.addr-table-empty { text-align: center; color: #888; padding: 24px 12px !important; }
.addr-col-num { text-align: center; width: 40px; color: #888; }
.addr-col-actions { width: 60px; text-align: center; }
.addr-col-city, .addr-col-series, .addr-col-status { white-space: nowrap; }
.addr-link {
  background: none;
  border: none;
  padding: 0;
  color: #2e6fdc;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.addr-link:hover { text-decoration: underline; }
.addr-dash { color: #aaa; }

.addr-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 13px;
  color: #555;
}
.addr-pagination button {
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.addr-pagination button:disabled { color: #aaa; cursor: default; }

/* Карточка/форма адреса */
.addr-card { display: flex; flex-direction: column; gap: 16px; }
.addr-card-head { display: flex; align-items: center; gap: 12px; }
.addr-card-head h3 { margin: 0; font-size: 18px; }
.addr-form { display: flex; flex-direction: column; gap: 14px; }
.addr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.addr-form-grid .form-row { display: flex; flex-direction: column; gap: 4px; }
.addr-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #eee;
}
@media (max-width: 720px) {
  .addr-form-grid { grid-template-columns: 1fr; }
}

/* Импорт Excel */
.import-step { display: flex; flex-direction: column; gap: 14px; }
.import-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  font-size: 13px;
  color: #555;
  background: #f7f7f7;
  border-radius: 6px;
  padding: 10px 12px;
}
.import-mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}
.import-map-row { display: flex; flex-direction: column; gap: 4px; }
.import-map-row label { font-size: 13px; color: #555; }
.import-map-row label.required::after { content: " *"; color: #c33; }
.import-map-row select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.import-options { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.import-skip-row { display: inline-flex; align-items: center; gap: 8px; }
.import-skip-row input[type="number"] {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.import-preview-wrap { overflow-x: auto; max-height: 320px; }
.import-preview {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}
.import-preview th, .import-preview td {
  border: 1px solid #e5e5e5;
  padding: 4px 6px;
  vertical-align: top;
  text-align: left;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-preview th { background: #f6f6f6; }
.import-preview .col-letter {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #888;
  text-align: center;
}
.import-preview .col-header { font-weight: 600; }

.import-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.import-result-stat {
  text-align: center;
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}
.import-result-stat .num { font-size: 22px; font-weight: 700; }
.import-result-stat .lbl { font-size: 12px; color: #666; margin-top: 2px; }
.import-result-stat.ok   { background: #ecf8ec; border-color: #b6e0b6; }
.import-result-stat.skip { background: #f3f3f3; }
.import-result-stat.err  { background: #fde8e6; border-color: #f3b3ad; }
.import-result-stat.warn { background: #fff5d8; border-color: #f5da7a; }

.import-list-block { font-size: 13px; color: #444; padding: 8px 12px; border-radius: 6px; background: #f6f8fa; margin-top: 8px; }
.import-list-block strong { display: block; margin-bottom: 2px; }
.import-list-block.warn { background: #fff7de; border: 1px solid #f0d270; }
.import-list-block.ok   { background: #ecf9ec; border: 1px solid #94ce9c; }
.import-list-block .hint { font-size: 12px; color: #6a7480; margin-top: 4px; }
.import-new-series {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 13px;
}
.import-new-series th, .import-new-series td {
  border: 1px solid #e1e4e8;
  padding: 4px 8px;
  text-align: left;
}
.import-new-series th { background: #eef2f7; font-weight: 600; }
.import-new-series td.num, .import-new-series th.num { text-align: right; }
.import-new-series code { background: #fff; padding: 1px 4px; border-radius: 3px; }
.import-detail summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.import-detail ul { margin: 4px 0 12px 18px; font-size: 13px; }

@media (max-width: 720px) {
  .import-mapping { grid-template-columns: 1fr; }
  .import-result { grid-template-columns: repeat(2, 1fr); }
  .import-meta { grid-template-columns: 1fr; }
}

/* Переключатель list/analytics */
.addr-view-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
  border-bottom: 1px solid #ddd;
}
.addr-view-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.addr-view-tab:hover { color: #222; }
.addr-view-tab.active {
  color: #2e6fdc;
  border-bottom-color: #2e6fdc;
  font-weight: 600;
}

/* Аналитика */
.addr-analytics { display: flex; flex-direction: column; gap: 16px; }
.addr-analytics-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: #555;
}
.addr-analytics-chips strong { margin-right: 4px; }
.addr-chip {
  display: inline-block;
  padding: 3px 10px;
  background: #f0f4fb;
  border: 1px solid #d8e3f3;
  border-radius: 12px;
  font-size: 12px;
  color: #2e6fdc;
}
.addr-analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.addr-analytics-toolbar h3 { margin: 0; font-size: 16px; }
.addr-analytics-toolbar select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.addr-matrix-wrap { overflow-x: auto; }
.addr-matrix {
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  min-width: 100%;
}
.addr-matrix th, .addr-matrix td {
  border: 1px solid #e5e5e5;
  padding: 6px 10px;
  vertical-align: middle;
}
.addr-matrix-corner {
  background: #f6f6f6;
  color: #555;
  font-weight: 600;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  white-space: nowrap;
}
.addr-matrix-city {
  background: #f6f6f6;
  text-align: center;
  white-space: nowrap;
  font-weight: 600;
}
.addr-matrix-city-total {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  margin-top: 2px;
}
.addr-matrix-region {
  font-size: 11px;
  color: #888;
  font-weight: 400;
}
.addr-matrix-series {
  background: #fafafa;
  text-align: left;
  font-weight: 500;
  position: sticky;
  left: 0;
  z-index: 1;
  white-space: nowrap;
}
.addr-matrix-series.is-none { color: #888; font-style: italic; }
.addr-matrix-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
}
.addr-matrix-total, .addr-matrix-total-col {
  text-align: center;
  background: #f0f4fb;
  font-weight: 600;
  color: #2e6fdc;
}
.addr-matrix-totals-row th, .addr-matrix-totals-row td {
  background: #f0f4fb;
  font-weight: 600;
}
.addr-matrix-grand {
  background: #2e6fdc !important;
  color: #fff !important;
  text-align: center;
  font-weight: 700;
}

.addr-matrix-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
  color: #777;
}
.addr-matrix-legend-cell {
  display: inline-block;
  width: 22px;
  height: 14px;
  border: 1px solid #ddd;
}

/* ========== Адреса v2 ========== */

/* Сводная вкладка */
.addr-summary-tab { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.addr-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1000px) {
  .addr-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.addr-summary-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.addr-summary-col-head h3 { margin: 0; font-size: 15px; }
.addr-summary-controls {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.addr-summary-controls select {
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.import-list-block.warn {
  background: #fff5d8;
  border: 1px solid #f5da7a;
  padding: 8px;
  border-radius: 6px;
}
.import-list-block.warn .hint {
  font-size: 12px;
  color: #806000;
  margin-top: 4px;
}

/* Перепланировки внутри планировки */
.bs-plan-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}
.bs-plan-block .bs-plan-row {
  border: none;
  padding: 0;
}
.bs-renovations {
  margin-left: 24px;
  padding: 6px 8px;
  border-left: 2px solid #e5e7eb;
}
.bs-renovations-toggle {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}
.bs-renovations-toggle:hover { color: #2e6fdc; }
.bs-renovations-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.bs-renovation-row {
  background: #fafafa;
}

/* Readonly-поля «География» и «Кол-во построенных домов» */
.bs-desc-readonly {
  padding: 6px 8px;
  background: #f7f8fa;
  border: 1px dashed #d1d5db;
  border-radius: 5px;
  font-size: 13px;
  color: #374151;
}
.bs-desc-source {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}
.bs-desc-hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
}
.addr-summary-cards.small .stat-card { padding: 10px; }
.addr-summary-cards.small .stat-num { font-size: 22px; }
.addr-summary-cards .stat-card.clickable {
  cursor: pointer;
  text-align: left;
  border: 1px solid #e5e7eb;
  font: inherit;
}
.addr-summary-cards .stat-card.clickable:hover {
  background: #f0f4fb;
  border-color: #2e6fdc;
}
.addr-summary-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
.addr-summary-col h3 { margin: 0 0 8px; font-size: 15px; color: #333; }
.addr-summary-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.addr-summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #eee;
  border-radius: 5px;
  background: #fff;
}
.addr-summary-num {
  display: inline-block;
  min-width: 28px;
  color: #9ca3af;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  margin-right: 6px;
}
.addr-summary-link {
  background: none; border: none; padding: 0;
  color: #2e6fdc; cursor: pointer; font: inherit; text-align: left;
  flex: 1;
}
.addr-summary-link:hover { text-decoration: underline; }
.addr-summary-count {
  font-variant-numeric: tabular-nums;
  color: #6b7280;
  font-size: 13px;
}
.addr-summary-locations {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.addr-summary-locations th,
.addr-summary-locations td {
  border: 1px solid #e5e5e5;
  padding: 6px 10px;
}
.addr-summary-locations th { background: #f6f6f6; font-weight: 600; }
.addr-summary-locations .num { text-align: center; font-variant-numeric: tabular-nums; }
.addr-summary-locations .addr-loc-unknown td {
  background: #fafafa;
  font-style: italic;
  border-top: 2px solid #d0d0d0;
}
.addr-summary-locations .addr-dim {
  color: #888;
  font-style: italic;
}

@media (max-width: 720px) {
  .addr-summary-cards { grid-template-columns: 1fr; }
  .addr-summary-grid { grid-template-columns: 1fr; }
}

/* Третий ряд плашек по цвету (ColorStatsRow) */
.addr-color-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.addr-color-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: default;
  text-align: left;
}
.addr-color-stat.clickable { cursor: pointer; }
.addr-color-stat.clickable:hover { background: #f9fafb; border-color: #cbd5e1; }
.addr-color-stat-num { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.addr-color-stat-pct { color: #6b7280; font-size: 13px; }
.addr-color-stat-label { color: #6b7280; font-size: 13px; margin-left: auto; }
.addr-color-swatch {
  width: 24px; height: 24px; border-radius: 4px;
  border: 1px solid;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .addr-color-stats { grid-template-columns: 1fr; }
}

/* Страница «Адреса локации» */
.addr-location-page { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.addr-location-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.addr-location-head h2 { margin: 0; }
.addr-location-descr { color: #6b7280; font-size: 14px; }
.addr-location-main-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
}
.addr-location-main-card .stat-num { font-size: 32px; font-weight: 600; }
.addr-location-main-card .stat-label { color: #6b7280; font-size: 14px; }

/* Модалка экспорта адресов */
.addr-export-form { display: flex; flex-direction: column; gap: 12px; }
.addr-export-series-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
}
.addr-export-series-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
}
.addr-export-series-item:hover { background: #fff; }

/* Вкладка «Список» */
.addr-list-tab { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.addr-list-toolbar { display: flex; gap: 12px; }
.addr-filters-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.addr-filters-row input,
.addr-filters-row select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.addr-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.addr-filter-search { font-family: inherit; }

@media (max-width: 1000px) {
  .addr-filters-row { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 720px) {
  .addr-filters-row { grid-template-columns: 1fr; }
}

/* Таблица v2 */
.addr-table-v2 {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.addr-table-v2 th, .addr-table-v2 td {
  border: 1px solid #e5e5e5;
  padding: 5px 8px;
  vertical-align: middle;
}
.addr-table-v2 th {
  background: #f6f6f6;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}
.addr-table-v2 th.center { text-align: center; }
.addr-table-v2 th.sortable { cursor: pointer; user-select: none; }
.addr-table-v2 th.sortable:hover { background: #eef0f3; }
.addr-table-v2 td.num { text-align: center; font-variant-numeric: tabular-nums; }
.addr-table-v2 tbody tr:hover { background: #fafafa; }
.addr-table-v2 tbody tr.is-duplicate { background: #fff0f0; }
.addr-table-v2 tbody tr.is-duplicate:hover { background: #ffe6e6; }
.addr-table-v2 tbody tr.is-not-suitable td { color: #888; }

.addr-color-cell { text-align: center; }
.addr-color-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #999;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.addr-color-btn:hover { border-color: #2e6fdc; }

.addr-dup-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  background: #fecaca;
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}
.addr-series-bound {
  color: #2e6fdc;
  font-weight: 500;
}
.addr-series-link {
  color: #2e6fdc;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.addr-series-link:hover {
  text-decoration: none;
  border-bottom-color: #2e6fdc;
}
.addr-series-link::after {
  content: " ↗";
  font-size: 10px;
  color: #6a7480;
}

/* Мини-бейджи возле имени серии в списке адресов: статус источника ЕГРН. */
.addr-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  line-height: 12px;
  font-weight: 600;
  vertical-align: 1px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  user-select: none;
}
.addr-badge-known { background: #eef2f7; color: #55627a; }
.addr-badge-dobor { background: #fff2cf; color: #925a00; }

.addr-cell-view {
  display: inline-block;
  min-width: 30px;
  min-height: 18px;
  cursor: text;
}
.addr-cell-input {
  width: 100%;
  padding: 3px 6px;
  border: 1px solid #2e6fdc;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

/* Карточка адреса (модалка) */
.addr-card-form { display: flex; flex-direction: column; gap: 14px; }
.addr-card-row { display: flex; flex-direction: column; gap: 4px; }
.addr-card-row input,
.addr-card-form textarea {
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.addr-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.addr-card-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #555;
}
.addr-card-grid input,
.addr-card-grid select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
}
.addr-card-section {
  padding: 10px 0;
  border-top: 1px solid #eee;
}
.addr-card-section h3 { margin: 0 0 8px; font-size: 14px; }
.addr-card-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.addr-card-entrances {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 6px;
}
.addr-card-entrance-row {
  display: flex;
  gap: 8px;
  align-items: end;
}
.addr-card-entrance-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #555;
}
.addr-card-entrance-row input {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  width: 90px;
}

@media (max-width: 720px) {
  .addr-card-grid { grid-template-columns: 1fr; }
}

/* Аналитика — pivot */
.addr-analytics-tab { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.addr-analytics-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.addr-analytics-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.addr-analytics-controls select,
.addr-analytics-controls input {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
}
.addr-analytics-controls .hint {
  color: #6b7280;
  font-style: italic;
}

.addr-pivot-wrap {
  overflow-x: auto;
  max-height: 70vh;
  border: 1px solid #e5e5e5;
}
.addr-pivot {
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
  min-width: 100%;
}
.addr-pivot th, .addr-pivot td {
  border: 1px solid #e5e5e5;
  padding: 5px 8px;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}
.addr-pivot thead th {
  background: #f6f6f6;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}
.addr-pivot .sticky-left {
  position: sticky;
  left: 0;
  background: #f6f6f6;
  z-index: 1;
  text-align: left;
  font-weight: 600;
  /* Ограничиваем ширину первой колонки — иначе серии добора с слитыми
     вариантами написания («1-510-4/М37 1-510-4/Ю37») раздувают её
     и вытесняют данные регионов вправо. Длинные — с многоточием,
     полное название по hover через title=. */
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.addr-pivot thead .sticky-left { z-index: 3; }
.addr-pivot-cell .bld { font-weight: 600; }
.addr-pivot-cell .apt { font-size: 10px; color: #6b7280; }
.addr-pivot-cell.highlight {
  background: #fff5d8;
  border-color: #f5da7a;
}
.addr-pivot-total {
  background: #f0f4fb !important;
  font-weight: 600;
}
.addr-pivot-totals-row td,
.addr-pivot-totals-row th { background: #f0f4fb; font-weight: 600; }
/* Закреплённый низ Аналитики — видим при вертикальном скролле */
.addr-pivot-totals-sticky td,
.addr-pivot-totals-sticky th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #f0f4fb !important;
  box-shadow: 0 -1px 0 #cbd5e1;
}
.addr-pivot-totals-sticky .addr-pivot-grand {
  z-index: 3;
}

/* Закреплённая правая колонка Σ по серии */
.addr-pivot-total-sticky {
  position: sticky !important;
  right: 0;
  z-index: 2;
  background: #f0f4fb !important;
  box-shadow: -1px 0 0 #cbd5e1;
}
/* Заголовок Σ по серии в шапке — залипает и по верху, и по правому краю
   (пересечение вертикальной шапки и правого столбца) */
.addr-pivot thead th.addr-pivot-total-sticky {
  position: sticky !important;
  top: 0;
  right: 0;
  z-index: 5;
  background: #f6f6f6 !important;
  box-shadow: inset 0 -1px 0 #d0d0d0, -1px 0 0 #cbd5e1;
}
.addr-pivot-totals-sticky .addr-pivot-total-sticky {
  /* пересечение горизонтального и вертикального sticky — поверх всего */
  z-index: 4 !important;
}
.addr-pivot-num {
  display: inline-block;
  min-width: 22px;
  color: #9ca3af;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}
/* Серии Базы без адресов — приглушённый текст в первой колонке */
.addr-pivot-empty-row .sticky-left {
  color: #9ca3af;
  font-weight: 400;
}
.addr-pivot-empty-row .addr-pivot-num {
  color: #cbd5e1;
}
/* Чекбокс «скрыть пустые» в контролах Аналитики */
.addr-analytics-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}
.addr-analytics-checkbox input { margin: 0; }

/* Архив фото — лимит */
.bs-gallery-limit {
  margin-top: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-style: italic;
}

/* Импорт — плашка warning для дублей в файле */
.import-result-stat.warn .num { color: #c2410c; }
.import-result-stat.warn .lbl { color: #c2410c; }

/* Searchable Select — input с выпадающим списком и фильтрацией */
.searchable-select {
  position: relative;
  display: inline-block;
  min-width: 160px;
}
.searchable-select-input {
  width: 100%;
  padding: 6px 28px 6px 8px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}
.searchable-select-input:focus {
  outline: none;
  border-color: #2e6fdc;
  box-shadow: 0 0 0 2px rgba(46, 111, 220, 0.15);
}
.searchable-select-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}
.searchable-select-clear:hover { color: #c2410c; }
.searchable-select-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 10;
}
.searchable-select-option {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2937;
}
.searchable-select-option:hover,
.searchable-select-option.highlight {
  background: #eef2f9;
}
.searchable-select-option.active {
  background: #2e6fdc;
  color: #fff;
}
.searchable-select-empty {
  padding: 8px 10px;
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}
.addr-pivot-grand {
  background: #e8eef8 !important;
  color: #24292f !important;
  font-weight: 700;
}
.addr-pivot-grand .apt { color: #55627a; }

/* Клик по названию серии в аналитике — переход в Базу серий (target=_blank). */
.addr-pivot-series-link {
  color: #2e6fdc;
  text-decoration: none;
  font-weight: 500;
}
.addr-pivot-series-link:hover { text-decoration: underline; }
.addr-pivot-divider th {
  background: #eef2f9 !important;
  color: #6b7280 !important;
  font-weight: 600;
  font-style: italic;
  text-align: left !important;
  padding-top: 10px !important;
  padding-bottom: 6px !important;
  border-top: 2px solid #cbd5e1 !important;
}

/* hint-list для импорта */
.hint-list {
  margin: 0 0 0 18px;
  padding: 0;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}
.hint-list em { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; color: #2e6fdc; }
