@property --ws-editor-left-overlay {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

@property --ws-editor-right-inset {
  syntax: "<length>";
  inherits: true;
  initial-value: 72px;
}

:root {
  color-scheme: dark;
  --bg: #030308;
  --bg-soft: #0a1628;
  --glass: rgba(8, 14, 28, 0.72);
  --glass-strong: rgba(10, 18, 34, 0.82);
  --glass-soft: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #00d2ff;
  --accent-strong: #22d3ee;
  --accent-soft: rgba(0, 210, 255, 0.18);
  --accent-glow: 0 8px 32px rgba(0, 210, 255, 0.28);
  --danger: #ff5d75;
  --warning: #ffae3c;
  --success: #34d399;
  --info: #67c8ff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --easing: cubic-bezier(0.32, 0.72, 0, 1);
  --ws-split-duration: 0.5s;
  --ws-split-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ws-smeta-compact-peek: 240px;
  --ws-smeta-agent-peek: 140px;
  --ws-smeta-divider-y: 20px;
  --ws-panel-glass-alpha: 0.05;
  --ws-smeta-glass-alpha: 1;
  --ws-smeta-bg: #0a1220;
  --ws-smeta-bg-head: #0f1524;
  --ws-right-rail-w: 72px;
  --ws-right-stack-w: clamp(300px, 28vw, 380px);
  --ws-left-rail-w: var(--catalog-sidebar-w-collapsed, 72px);
  --ws-left-stack-w: var(--catalog-sidebar-w, 248px);
  --ws-editor-right-inset: var(--ws-right-rail-w);
  --ws-editor-left-overlay: 0px;
  --ws-sidebar-duration: 0.28s;
  --ws-sidebar-ease: ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Loader */
.ws-loader {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background: var(--bg); z-index: 999;
}
.ws-loader__pulse {
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.55) 0%, rgba(0, 210, 255, 0) 65%);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}
.ws-loader__label { color: var(--text-secondary); font-size: 13px; letter-spacing: 0.04em; }

/* Hub sidebar — общий стиль из catalog.css; только z-index для редактора */
.ws-body #ws-hub-sidebar.catalog-sidebar {
  z-index: 90;
}

.ws-shell {
  box-sizing: border-box;
  display: block;
  margin-left: var(--ws-left-rail-w);
  width: calc(100vw - var(--ws-left-rail-w));
  height: 100dvh;
  padding: 12px;
  overflow: hidden;
  transition: margin-left var(--ws-sidebar-duration) var(--ws-sidebar-ease);
}
.ws-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: calc(100dvh - 24px);
  gap: 0;
  position: relative;
}
/* Правая колонка: агент + смета, прикреплены к краю */
.ws-ai-stack--docked {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  left: auto;
  width: clamp(300px, 28vw, 380px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 9;
  pointer-events: auto;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(0, 210, 255, 0.14);
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, var(--ws-panel-glass-alpha)),
    rgba(5, 8, 16, calc(var(--ws-panel-glass-alpha) + 0.04))
  );
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  transition:
    width 0.28s ease,
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}
.ws-ai-stack--docked.is-collapsed {
  width: var(--ws-right-rail-w, 72px);
  min-width: var(--ws-right-rail-w, 72px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ws-ai-stack--docked.is-collapsed > .ws-ai-panel,
.ws-ai-stack--docked.is-collapsed > .ws-smeta-panel {
  display: none !important;
}
.ws-ai-stack__rail {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  padding: 20px 8px 16px;
  overflow-y: auto;
  scrollbar-width: none;
}
.ws-ai-stack__rail::-webkit-scrollbar { display: none; }
.ws-ai-stack--docked.is-collapsed .ws-ai-stack__rail {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 8px;
  min-height: 0;
}
.ws-ai-stack__rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background 160ms var(--easing),
    border-color 160ms var(--easing),
    color 160ms var(--easing),
    box-shadow 160ms var(--easing);
}
.ws-ai-stack__rail-btn:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.2);
  color: var(--text);
}
.ws-ai-stack__rail-btn.is-active {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.35);
  color: #bae6fd;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.12);
}
.ws-ai-stack__rail-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 18px;
  line-height: 1;
  transition: inherit;
}
.ws-ai-stack__rail-btn:hover .ws-ai-stack__rail-icon {
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.1);
}
.ws-ai-stack__rail-btn.is-active .ws-ai-stack__rail-icon {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.16);
  color: #7ee8ff;
}
.ws-ai-stack__rail-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-ai-stack--docked.is-focus-agent > .ws-ai-panel {
  box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.28);
}
.ws-ai-stack--docked.is-focus-smeta > .ws-smeta-panel {
  box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.28);
}
.ws-ai-stack__toggle {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 3;
  width: 14px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.28);
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    transform 0.28s ease,
    width 0.28s ease;
}
.ws-ai-stack__toggle:hover {
  background: rgba(0, 210, 255, 0.42);
}
.ws-ai-stack__toggle:focus-visible {
  outline: 2px solid rgba(0, 210, 255, 0.55);
  outline-offset: 2px;
}
.ws-ai-stack__toggle-lines {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 14px;
}
.ws-ai-stack__toggle-lines span {
  width: 1.5px;
  height: 12px;
  border-radius: 1px;
  background: rgba(224, 247, 255, 0.92);
}
.ws-ai-stack--docked.is-collapsed .ws-ai-stack__toggle {
  transform: translate(-50%, -50%);
}
.ws-ai-stack--docked > .ws-ai-panel,
.ws-ai-stack--docked > .ws-smeta-panel {
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  border-radius: 0;
  box-shadow: none;
}
.ws-ai-stack--docked > .ws-ai-panel {
  position: relative;
  bottom: auto !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  z-index: 1;
  border: none;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, var(--ws-panel-glass-alpha)),
    rgba(5, 8, 16, calc(var(--ws-panel-glass-alpha) + 0.02))
  );
  box-sizing: border-box;
  transition: padding-bottom var(--ws-split-duration) var(--ws-split-ease);
}
.ws-ai-stack--docked:not(.is-smeta-expanded) > .ws-ai-panel {
  padding-bottom: var(--ws-smeta-compact-peek);
}
.ws-ai-stack--docked > .ws-ai-panel .ws-ai-panel__body,
.ws-ai-stack--docked > .ws-ai-panel .ws-ai-hints,
.ws-ai-stack--docked > .ws-ai-panel .ws-ai-compose {
  flex: 1 1 auto;
  min-height: 0;
}
.ws-ai-stack--docked > .ws-ai-panel .ws-ai-compose__search,
.ws-ai-stack--docked > .ws-ai-panel .ws-ai-compose__modes {
  flex-shrink: 0;
}
.ws-ai-stack--docked .ws-ai-hints--compose {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-compose {
  flex: 1 1 auto;
  min-height: 0;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-compose__content {
  flex: 1 1 auto;
  min-height: 0;
  justify-content: flex-end;
  overflow: hidden;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-hints__pane--active {
  flex: 0 1 auto;
  width: 100%;
  max-height: 100%;
  min-height: 0;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-hints__actions {
  flex-shrink: 0;
  margin-bottom: 6px;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-hints__list {
  flex: 0 1 auto;
  max-height: min(280px, 42vh);
  margin-bottom: 2px;
}
.ws-ai-stack--docked .ws-ai-hints--compose .ws-ai-hints__chat-log {
  flex: 0 1 auto;
  max-height: min(280px, 42vh);
  margin-bottom: 0;
}
.ws-ai-stack--docked > .ws-smeta-panel {
  position: absolute;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex;
  flex-direction: column;
  flex: none;
  height: var(--ws-smeta-compact-peek);
  min-height: 0;
  margin-top: 0;
  border: none;
  z-index: 2;
  background: var(--ws-smeta-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  transform: none;
  transition: height var(--ws-split-duration) var(--ws-split-ease);
  will-change: height;
  overflow: hidden;
}
.ws-ai-stack--docked > .ws-smeta-panel::before {
  content: "";
  position: absolute;
  top: var(--ws-smeta-divider-y);
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 210, 255, 0.14);
  z-index: 3;
  pointer-events: none;
}
.ws-ai-stack--docked.is-smeta-expanded > .ws-smeta-panel {
  height: calc(100% - var(--ws-smeta-agent-peek));
}
.ws-ai-stack--docked.is-smeta-expanded > .ws-smeta-panel::before {
  background: rgba(0, 210, 255, 0.22);
}
.ws-ai-stack--docked.is-smeta-split-instant > .ws-smeta-panel,
.ws-ai-stack--docked.is-smeta-split-instant > .ws-ai-panel {
  transition: none;
}
.ws-ai-stack--docked.is-smeta-expanded > .ws-smeta-panel .ws-smeta-panel__body {
  min-height: 0;
}
.ws-ai-stack--docked.is-smeta-expanded > .ws-smeta-panel .ws-smeta-panel__scroll {
  overflow-y: auto;
}
.ws-smeta-split__toggle {
  position: absolute;
  top: var(--ws-smeta-divider-y);
  left: 50%;
  z-index: 4;
  width: 42px;
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.28);
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    transform 0.28s ease,
    width 0.28s ease;
}
.ws-smeta-split__toggle:hover {
  background: rgba(0, 210, 255, 0.42);
}
.ws-smeta-split__toggle:focus-visible {
  outline: 2px solid rgba(0, 210, 255, 0.55);
  outline-offset: 2px;
}
.ws-smeta-split__toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  width: 14px;
}
.ws-smeta-split__toggle-lines span {
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(224, 247, 255, 0.92);
}
.ws-ai-stack--docked.is-collapsed .ws-smeta-split__toggle {
  display: none;
}
.ws-ai-stack--docked .ws-ai-hints__drag,
.ws-ai-stack--docked .ws-smeta-panel__drag,
.ws-ai-stack--docked .ws-ai-hints__resize,
.ws-ai-stack--docked .ws-smeta-panel__resize {
  display: none !important;
}
.ws-shell[data-collapse-ai="1"] .ws-ai-stack .ws-ai-panel__body {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.ws-shell[data-collapse-ai="1"] .ws-ai-stack > .ws-ai-panel {
  width: auto !important;
  height: auto !important;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
.ws-shell[data-collapse-ai="1"] .ws-ai-stack .ws-ai-panel__expand {
  display: flex !important;
  pointer-events: auto;
  top: 0;
  right: 0;
}
.ws-shell[data-collapse-ai="0"] .ws-ai-stack .ws-ai-panel__expand {
  display: none !important;
}

/* Смета — плавающее окно поверх холста */
.ws-smeta-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--ws-smeta-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-card);
  position: relative;
}
.ws-smeta-panel.glass {
  background: var(--ws-smeta-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ws-smeta-panel__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  transition: opacity 220ms var(--easing), transform 240ms var(--easing);
}
.ws-smeta-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 12px 10px;
  cursor: default;
  user-select: none;
  border-bottom: 1px solid var(--border);
  background: var(--ws-smeta-bg-head);
}
.ws-smeta-panel--docked .ws-smeta-panel__drag { display: none; }
.ws-smeta-panel--docked .ws-smeta-panel__head {
  padding-top: 42px;
  background: var(--ws-smeta-bg-head);
}
.ws-smeta-panel__title {
  flex: 1;
  min-width: 0;
}
.ws-smeta-panel__title .ws-h1 {
  font-size: 15px;
  line-height: 1.2;
}
.ws-smeta-panel__title .ws-h1-sub {
  font-size: 11px;
  margin-top: 2px;
}
.ws-smeta-panel__dismiss {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--easing), color 160ms var(--easing), border-color 160ms var(--easing);
}
.ws-smeta-panel__dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border-strong);
}
.ws-smeta-panel__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.ws-smeta-panel__scroll::-webkit-scrollbar { width: 8px; }
.ws-smeta-panel__scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 4px; }
.ws-smeta-panel__resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  border-radius: 0 0 10px 0;
  opacity: 0.45;
  background: linear-gradient(135deg, transparent 50%, rgba(148, 163, 184, 0.55) 50%);
  z-index: 2;
}
.ws-smeta-panel__resize:hover { opacity: 0.85; }
.ws-smeta-panel--resizing { user-select: none; }
.ws-smeta-panel--docked .ws-smeta-panel__resize {
  cursor: ns-resize;
}
/* Компактная смета — заголовок, круг и доли категорий */
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-detail,
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-breakdown,
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-subtotals,
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-right__rooms,
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-right__footer {
  display: none !important;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-smeta-panel__head {
  flex-shrink: 0;
  padding: 40px 12px 8px;
  cursor: pointer;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-smeta-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 12px 10px;
  overflow: hidden;
  gap: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-donut {
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  cursor: pointer;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-donut svg {
  width: 96px;
  height: 96px;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-donut__legend {
  gap: 6px;
}
.ws-smeta-panel--docked.ws-smeta-panel--expanded .ws-smeta-panel__head,
.ws-smeta-panel--docked.ws-smeta-panel--expanded .ws-donut {
  cursor: default;
}

body.ws-body {
  transition:
    --ws-editor-left-overlay var(--ws-sidebar-duration) var(--ws-sidebar-ease),
    --ws-editor-right-inset var(--ws-sidebar-duration) var(--ws-sidebar-ease);
}
body.ws-hub-sidebar-open {
  --ws-editor-left-overlay: calc(var(--ws-left-stack-w) - var(--ws-left-rail-w));
}
body:not(.ws-hub-sidebar-open) {
  --ws-editor-left-overlay: 0px;
}
body.ws-right-stack-open {
  --ws-editor-right-inset: var(--ws-right-stack-w);
}
body:not(.ws-right-stack-open) {
  --ws-editor-right-inset: var(--ws-right-rail-w);
}

/* Новый проект / опрос — левое меню в свёрнутом виде, правая панель скрыта */
body.ws-new-project-wizard-pending,
body.ws-wizard-active {
  --ws-editor-right-inset: 0px;
}
body.ws-new-project-wizard-pending .ws-ai-stack--docked,
body.ws-wizard-active .ws-ai-stack--docked {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

/* Опрос нового проекта — прозрачный оверлей сверху редактора */
.ws-wizard {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  padding: 224px calc(var(--ws-editor-right-inset) + 14px) 14px calc(var(--ws-editor-left-overlay) + 14px);
}
.ws-wizard[hidden] { display: none; }
body.ws-wizard-upload .ws-wizard {
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}
body.ws-wizard-welcome .ws-wizard {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--ws-left-rail-w, 72px);
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}
body.ws-hub-sidebar-open.ws-wizard-welcome .ws-wizard {
  left: var(--ws-left-stack-w, 248px);
}
body.ws-wizard-welcome .ws-wizard__panel {
  transform: none;
  transform-origin: top center;
  align-items: stretch;
  width: min(var(--catalog-shell-max, 1100px), 100%);
  max-height: none;
  margin: 0 auto;
  overflow: visible;
  pointer-events: auto;
}
body.ws-wizard-welcome .ws-wizard__body {
  display: block;
  width: 100%;
  overflow: visible;
}

body.ws-wizard-welcome #ws-floor-tabs,
body.ws-wizard-upload #ws-floor-tabs,
body.ws-new-project-wizard-pending:not(.ws-wizard-step-floors):not(.ws-wizard-step-area) #ws-floor-tabs {
  display: none !important;
}

body.ws-wizard-active .ws-cat-rail,
body.ws-wizard-active .ws-cat-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
body.ws-wizard-active .ws-bottom-dock,
body.ws-new-project-wizard-pending .ws-bottom-dock {
  display: none;
}
body.ws-wizard-active .ws-inspector {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Опрос: сетка редактора на всех шагах; содержимое холста (план) — только на «Контуре» */
body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload):not(.ws-wizard-step-area) #ws-canvas {
  visibility: hidden;
  pointer-events: none;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload):not(.ws-wizard-step-area) .ws-wizard-area-viewport {
  display: none !important;
}
.ws-wizard__panel {
  pointer-events: auto;
  width: min(1280px, 100%);
  max-height: calc(100% - 28px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: none;
  transform: scale(0.84);
  transform-origin: top center;
}
.ws-wizard__panel::-webkit-scrollbar {
  display: none;
}
.ws-wizard__stepper {
  flex-shrink: 0;
}
.ws-wizard__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.ws-wizard__body::-webkit-scrollbar {
  display: none;
}

/* Опрос шагов (план / площадь / бюджет) — крупнее и по центру окна редактора */
body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) {
  --ws-wizard-anchor-left: var(--ws-left-rail-w, 72px);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--ws-wizard-anchor-left);
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(28px, 4vw, 56px);
}

body.ws-hub-sidebar-open.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) {
  --ws-wizard-anchor-left: var(--ws-left-stack-w, 248px);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__panel {
  transform: none;
  width: min(820px, 100%);
  max-height: min(88dvh, 920px);
  margin: 0 auto;
  gap: clamp(16px, 2.5vh, 28px);
  overflow: visible;
  transition:
    width 0.58s cubic-bezier(0.33, 1, 0.68, 1),
    max-height 0.58s cubic-bezier(0.33, 1, 0.68, 1),
    gap 0.48s cubic-bezier(0.33, 1, 0.68, 1);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body {
  transition: opacity 0.42s ease;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper {
  padding: 6px 0 2px;
  overflow: visible;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper {
  justify-content: center;
  margin-bottom: clamp(20px, 3vh, 36px);
  padding-top: 2px;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__dot {
  width: 36px;
  height: 36px;
  font-size: 0.82rem;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__dot.is-active {
  transform: none;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.22);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__label {
  font-size: 0.78rem;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__line {
  width: clamp(32px, 6vw, 56px);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel {
  max-width: 720px;
  margin: 0 auto;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel__head {
  margin-bottom: clamp(8px, 1.5vh, 16px);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel__title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel__title--sm {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel__lead {
  max-width: none;
  font-size: clamp(1rem, 1.45vw, 1.14rem);
  line-height: 1.65;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-btn {
  min-height: 50px;
  padding: 0 24px;
  font-size: 0.94rem;
  border-radius: 14px;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-actions--area-nav .cfg-btn--area-nav {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.82rem;
  border-radius: 11px;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-actions--area-nav .cfg-btn--area-nav.cfg-btn--primary {
  padding: 0 16px;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-actions {
  margin-top: clamp(24px, 3vh, 36px);
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-plan-step__hint {
  font-size: 0.63rem;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-budget__presets {
  display: none !important;
}

body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-budget {
  margin-top: clamp(12px, 2vh, 20px);
}

/* Шаг 3 — площадь: слева прозрачная панель как на других шагах, справа холст */
body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) {
  --ws-area-split-half: calc((100vw - var(--ws-wizard-anchor-left, var(--ws-left-rail-w, 72px))) / 2);
  --ws-area-panel-max: 574px;
  --ws-area-content-max: 504px;
  --ws-area-panel-offset-x: 100px;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard {
  position: fixed;
  display: flex;
  flex-direction: column;
  top: 0;
  right: auto;
  bottom: 0;
  left: var(--ws-wizard-anchor-left, var(--ws-left-rail-w, 72px));
  width: var(--ws-area-split-half);
  max-width: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(28px, 4vw, 56px);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 19;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__panel {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  width: min(var(--ws-area-panel-max), calc(var(--ws-area-split-half) * 0.7 - 28px));
  max-width: min(var(--ws-area-panel-max), calc(var(--ws-area-split-half) * 0.7 - 28px));
  max-height: min(88dvh, 920px);
  height: auto;
  margin: 0 0 0 var(--ws-area-panel-offset-x, 0);
  overflow: visible;
  pointer-events: auto;
  transform: none;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  gap: clamp(16px, 2.5vh, 28px);
}

.ws-center > .ws-wizard {
  z-index: 20;
}

.ws-center > .ws-wizard-area-viewport {
  z-index: 17;
}

body.ws-wizard-step-area .ws-wizard__stepper,
body.ws-wizard-step-area .cfg-area-split__left,
body.ws-wizard-step-area .cfg-area-split__left .cfg-actions {
  pointer-events: auto;
}

body.ws-wizard-step-area .ws-wizard__body {
  overflow: visible;
  flex: 0 1 auto;
  min-height: 0;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__body .cfg-panel {
  max-width: var(--ws-area-content-max, 504px);
  margin: 0;
  width: 100%;
  height: auto;
  overflow: visible;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper {
  width: 100%;
  align-self: stretch;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px 10px;
  width: 100%;
  margin-bottom: clamp(14px, 2vh, 22px);
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__item {
  gap: 8px;
  flex: 0 0 auto;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__dot {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__dot.is-active {
  transform: none;
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.22);
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__stepper .cfg-stepper__line {
  width: clamp(16px, 3vw, 28px);
  flex-shrink: 1;
}

body.ws-wizard-step-area .cfg-area-split__left {
  height: auto;
  min-height: 0;
}

.ws-wizard-area-viewport {
  display: none;
  position: fixed;
  z-index: 17;
  top: clamp(24px, 4vh, 48px);
  right: clamp(28px, 4vw, 56px);
  bottom: clamp(24px, 4vh, 48px);
  left: calc(var(--ws-wizard-anchor-left, var(--ws-left-rail-w, 72px)) + var(--ws-area-split-half, 50vw) + 12px);
  width: auto;
  border: 1px solid rgba(0, 210, 255, 0.28);
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  box-sizing: border-box;
}

body.ws-wizard-step-area .ws-wizard-area-viewport:not([hidden]) {
  display: block;
}

body.ws-wizard-step-area .ws-canvas-wrap {
  z-index: 2;
}

body.ws-wizard-step-area #ws-canvas {
  pointer-events: auto;
}

body.ws-wizard-step-area .ws-floor-tabs:not([hidden]) {
  z-index: 25;
}

body.ws-wizard-step-area .cfg-panel__head {
  margin-bottom: 0;
}

body.ws-wizard-step-area .cfg-panel__lead {
  max-width: none;
}

.ws-wizard-area-outline-dock {
  position: fixed;
  z-index: 25;
  pointer-events: auto;
}

.ws-wizard-area-outline-dock[hidden] {
  display: none !important;
}

body.ws-wizard-contour-scale #ws-scale-panel {
  display: none !important;
}

.ws-wizard-contour-hud {
  position: fixed;
  z-index: 26;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: min(280px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

body.ws-wizard-contour-draw .ws-wizard-contour-hud:not([hidden]) {
  display: flex;
}

@keyframes wsContourHudReveal {
  from {
    opacity: 0;
    margin-top: -10px;
  }
  to {
    opacity: 1;
    margin-top: 0;
  }
}

.ws-wizard-contour-hud--reveal {
  animation: wsContourHudReveal 0.45s ease-out;
}

.ws-wizard-bg-opacity {
  position: fixed;
  z-index: 26;
  display: none;
  pointer-events: auto;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 255, 0.22);
  background: rgba(8, 12, 22, 0.88);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

body.ws-wizard-step-area .ws-wizard-bg-opacity:not([hidden]) {
  display: block;
}

.ws-wizard-bg-opacity__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: default;
}

.ws-wizard-bg-opacity__text {
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
  white-space: nowrap;
}

.ws-wizard-bg-opacity__slider {
  width: min(160px, 28vw);
  accent-color: #00d2ff;
}

.ws-wizard-bg-opacity__value {
  min-width: 2.5em;
  font-size: 12px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.95);
  text-align: right;
}

.ws-wizard-contour-hud[hidden] {
  display: none !important;
}

.ws-wizard-contour-hud__hint {
  margin: 0;
  color: #fde68a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.ws-wizard-contour-hud__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(253, 230, 138, 0.85);
}

.ws-wizard-contour-hud__field[hidden] {
  display: none !important;
}

.ws-wizard-contour-hud__input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
  color: #fef3c7;
  font-size: 15px;
  font-weight: 700;
}

.ws-wizard-contour-hud__input:disabled {
  opacity: 0.45;
}

.ws-wizard-contour-hud__input:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}

body.ws-wizard-step-area #ws-scale-panel {
  display: none !important;
}

body.ws-wizard-step-plan-pages.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__panel {
  width: min(1100px, 100%);
}

body.ws-wizard-step-plan-pages .cfg-panel--plan-pages {
  max-width: none;
}

/* Нижняя зона: подсказки слева + бар инструментов по центру редактора */
.ws-bottom-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50px;
  z-index: 8;
  pointer-events: none;
}
.ws-bottom-bar-anchor {
  position: absolute;
  left: calc((100% + var(--ws-editor-left-overlay) - var(--ws-editor-right-inset)) / 2);
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: auto;
  transition: left var(--ws-sidebar-duration) var(--ws-sidebar-ease);
}
.ws-room-mode-minibar {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 220;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  width: max-content;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}
.ws-room-mode-minibar[hidden] {
  display: none !important;
}
.ws-room-mode-minibar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ws-room-mode-minibar__btn i {
  font-size: 18px;
  line-height: 1;
}
.ws-room-mode-minibar__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border);
}
.ws-room-mode-minibar__btn--active {
  color: #fff;
  background: rgba(0, 210, 255, 0.16);
  border-color: rgba(0, 210, 255, 0.45);
}
.ws-room-mode-minibar__btn--active:hover {
  background: rgba(0, 210, 255, 0.22);
}
.ws-bg-minibar {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: max-content;
  max-width: min(420px, calc(100vw - 48px));
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}
.ws-bg-minibar[hidden] {
  display: none !important;
}
.ws-bg-minibar__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ws-bg-minibar__remove:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
}
.ws-bg-minibar__remove i {
  font-size: 16px;
  line-height: 1;
}
.ws-bg-minibar__replace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.ws-bg-minibar__replace:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.ws-bg-minibar__replace i {
  font-size: 18px;
  line-height: 1;
}
.ws-bg-minibar__sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.ws-bg-minibar__opacity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  cursor: default;
}
.ws-bg-minibar__opacity-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.ws-bg-minibar__slider {
  width: 120px;
  height: 4px;
  margin: 0;
  accent-color: #00d2ff;
  cursor: pointer;
  flex-shrink: 0;
}
.ws-bg-minibar__opacity-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ws-bottom-bar {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  height: 60px;
  padding: 10px 14px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}
.ws-bottom-bar::-webkit-scrollbar {
  display: none;
}
.ws-bottom-bar .ws-rail__btn,
.ws-bottom-bar .ws-rail__menu-wrap {
  flex: 0 0 auto;
}
.ws-bottom-bar .ws-rail__btn {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 2px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-secondary);
}
.ws-bottom-bar .ws-rail__btn:hover {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--text);
  transform: scale(1.08);
}
.ws-bottom-bar .ws-rail__btn--active {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #00d2ff;
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.55));
}
.ws-bottom-bar .ws-rail__btn--active:hover {
  color: #7ee8ff;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.7));
}
.ws-bottom-bar .ws-rail__btn--accent {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #00d2ff;
}
.ws-bottom-bar .ws-rail__btn--accent:hover {
  filter: none;
  box-shadow: none;
  color: #7ee8ff;
}
.ws-bottom-bar .ws-rail__btn i {
  font-size: 24px;
  line-height: 1;
}
.ws-bar-tooltip {
  position: fixed;
  z-index: 9999;
  padding: 7px 12px;
  background: rgba(15, 17, 25, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  white-space: pre-line;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ws-bar-tooltip[hidden] {
  display: none !important;
}
.ws-bottom-bar__sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* AI panel — плавающее окно поверх холста */
.ws-ai-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  position: relative;
}
.ws-ai-panel--float {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  z-index: auto;
  pointer-events: auto;
  touch-action: none;
}
.ws-ai-stack.ws-ai-stack--dragging {
  touch-action: none;
}
.ws-ai-panel__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  transition: opacity 220ms var(--easing), transform 240ms var(--easing);
}
.ws-ai-panel--float .ws-ai-hints {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: none;
  flex: 1;
  min-height: 0;
  z-index: auto;
  padding: 12px 14px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.ws-ai-panel--float .ws-ai-hints__list,
.ws-ai-panel--float .ws-ai-hints__chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}

/* AI compose — как поле ввода каталога */
.ws-ai-hints--compose {
  gap: 0;
}
.ws-ai-stack--docked .ws-ai-compose__head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  cursor: default;
  user-select: none;
}
.ws-ai-compose__head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.ws-ai-compose__head:active { cursor: grabbing; }
.ws-ai-compose__head .ws-ai-hints__drag {
  margin-top: 18px;
  opacity: 0.35;
}
.ws-ai-compose__logo {
  display: block;
  flex: 1;
  min-width: 0;
  height: 52px;
  overflow: hidden;
  line-height: 0;
  text-align: center;
}
.ws-ai-compose__logo img {
  display: block;
  height: 88px;
  width: auto;
  margin: -8px auto -28px;
  pointer-events: none;
}
.ws-ai-compose__dismiss {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.ws-ai-compose__dismiss:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}
.ws-ai-compose {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}
.ws-ai-compose__content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ws-ai-compose__search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 52px;
  padding: 8px 8px 8px 14px;
  background: rgba(8, 10, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.ws-ai-compose__search:focus-within {
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.ws-ai-compose__input {
  flex: 1;
  min-width: 0;
  min-height: 24px;
  max-height: 96px;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  resize: none;
}
.ws-ai-compose__input:focus { outline: none; }
.ws-ai-compose__input::placeholder {
  color: var(--text-muted);
  text-align: left;
}
.ws-ai-compose__send {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.18);
  color: #7ee8ff;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.ws-ai-compose__send:hover:not(:disabled) {
  background: rgba(0, 210, 255, 0.32);
  color: #fff;
  transform: scale(1.04);
}
.ws-ai-compose__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ws-ai-compose__modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  flex-shrink: 0;
}
.ws-ai-compose__progress {
  display: none !important;
}
.ws-ai-compose__modes .ws-ai-hints__tab {
  flex: 0 0 auto;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: rgba(163, 163, 163, 0.95);
}
.ws-ai-compose__modes .ws-ai-hints__tab:hover {
  color: #e5e5e5;
  background: rgba(255, 255, 255, 0.05);
}
.ws-ai-compose__modes .ws-ai-hints__tab--active {
  color: #7ee8ff;
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: none;
}
.ws-ai-hints--compose .ws-ai-hints__tabs { display: none; }
.ws-ai-hints--compose .ws-ai-hints__chat-form { display: none; }
.ws-ai-hints--compose .ws-ai-hints__summary-wrap { display: none !important; }
.ws-ai-hints--compose .ws-ai-hints__chat-log {
  margin-bottom: 0;
  min-height: 0;
}
.ws-ai-hints--compose .ws-ai-hints__chat-log[hidden] { display: none !important; }
.ws-ai-hints--compose .ws-ai-hints__chat-log:not([hidden]) {
  min-height: 72px;
}
.ws-ai-panel__expand {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.ws-ai-stack .ws-ai-panel__expand {
  top: 0;
  right: 0;
  left: auto;
  transform: none;
}

.ws-rail {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: visible;
}
.ws-rail__expand,
.ws-rail__btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all 160ms var(--easing);
}
.ws-rail__expand i,
.ws-rail__btn i { font-size: 16px; }
.ws-rail__expand:hover,
.ws-rail__btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.07); }
.ws-rail__expand {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.32), rgba(0, 210, 255, 0.12));
  color: #fff;
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.28);
}
.ws-rail__expand:hover { box-shadow: 0 10px 28px rgba(0, 210, 255, 0.4); }
.ws-rail__sep { width: 24px; height: 1px; background: var(--border); margin: 2px 0; }
.ws-rail__cats { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; flex: 0 0 auto; overflow: visible; padding-bottom: 2px; }
.ws-rail__cats::-webkit-scrollbar { width: 0; }
.ws-rail__cat {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 17px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: transform 160ms var(--easing), background 160ms var(--easing), border-color 160ms var(--easing), color 160ms var(--easing);
}
.ws-rail__cat:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-strong);
  color: var(--text);
}
.ws-rail__cat--active {
  background: var(--accent-soft);
  border-color: rgba(0, 210, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.25), 0 6px 18px rgba(0, 210, 255, 0.25);
}
.ws-rail__cat__tip {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  padding: 4px 8px;
  background: rgba(15, 17, 25, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 11px; color: var(--text); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 140ms var(--easing);
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ws-rail--right .ws-rail__cat__tip { left: auto; right: calc(100% + 8px); }
.ws-rail__cat:hover .ws-rail__cat__tip { opacity: 1; }
.ws-rail__total {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.25;
  padding: 4px 2px;
  max-width: 44px;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: color 160ms var(--easing), background 160ms var(--easing);
}
.ws-rail__total:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}
.ws-rail__grow { flex: 0 0 4px; min-height: 4px; }
.ws-rail__tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.ws-rail__btn--active {
  color: var(--text);
  border-color: rgba(0, 210, 255, 0.55);
  background: rgba(0, 210, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.25);
}
.ws-rail__btn--accent {
  color: #fff;
  border-color: rgba(0, 210, 255, 0.65);
  background: linear-gradient(180deg, rgba(0, 210, 255, 0.95), rgba(8, 145, 178, 0.95));
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.35);
}
.ws-rail__btn--accent:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 24px rgba(0, 210, 255, 0.45);
}
.ws-rail__menu-wrap { position: relative; z-index: 50; }
.ws-rail__menu {
  position: fixed;
  min-width: 168px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ws-rail__menu[hidden] { display: none !important; }
.ws-rail__menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}
.ws-rail__menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.ws-rail__menu-item i { font-size: 15px; color: var(--text-secondary); }
.ws-rail__menu-item .ws-pill { margin-left: auto; }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}

/* Top bar — single horizontal row */
.ws-topbar {
  grid-area: topbar;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px) saturate(160%);
}
.ws-topbar__main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ws-topbar__main > .ws-topbar__brand { flex-shrink: 0; }
.ws-topbar__main > .ws-toolgroup[aria-label="Инструмент"] { flex-shrink: 0; }
.ws-topbar__right {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.ws-topbar__zoomrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  padding-top: 0;
  border-top: none;
}
.ws-topbar__zoomrow .ws-toolgroup--zoom {
  flex: 0 1 auto;
  min-width: 0;
}
/* Строка опций редактирования под сводкой (перенесена из верхней панели). */
.ws-editrow {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.ws-editrow .ws-toolgroup--zoom {
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}
/* Item 10: одинаковая длина центральных кнопок инструментов. */
.ws-topbar .ws-toolgroup[aria-label="Инструмент"] .ws-tool {
  min-width: 104px;
  justify-content: center;
}
.ws-topbar__brand { display: flex; align-items: center; gap: 12px; }
.ws-brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.7);
}
.ws-brand-stack { display: flex; flex-direction: column; line-height: 1.1; }
.ws-brand-title { font-weight: 700; font-size: 13px; letter-spacing: 0.01em; }
.ws-brand-sub { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.04em; }

.ws-toolgroup {
  display: flex; align-items: center; gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ws-toolsep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.ws-topbar .ws-tool {
  padding: 6px 10px;
}
.ws-tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: transparent; color: var(--text-secondary);
  border: none; border-radius: 8px;
  font-size: 12.5px; font-weight: 500;
  transition: all 160ms var(--easing);
}
.ws-tool i { font-size: 15px; }
.ws-tool:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.ws-tool--active {
  background: var(--accent-soft); color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.45);
}
.ws-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; color: var(--text-secondary);
  border: 1px solid transparent; border-radius: 8px;
  transition: all 160ms var(--easing);
}
.ws-iconbtn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--border); }
.ws-iconbtn i { font-size: 16px; }
.ws-iconbtn--ghost { width: 28px; height: 28px; }
.ws-iconbtn--on { background: var(--accent-soft); color: #fff; border-color: rgba(0, 210, 255, 0.45); }
.ws-toolgroup--pane { margin-right: 4px; }
.ws-zoom-label {
  min-width: 52px; padding: 0 6px;
  font-size: 11.5px; color: var(--text-secondary);
  text-align: center; font-variant-numeric: tabular-nums;
}
.ws-toolgroup--zoom {
  flex-wrap: nowrap;
  align-items: center;
  max-width: 100%;
}
.ws-zoom-slider {
  flex: 0 1 140px;
  width: 140px;
  min-width: 64px;
  max-width: 180px;
  height: 20px;
  margin: 0 0 0 6px;
  cursor: pointer;
  accent-color: var(--accent);
}
.ws-zoom-slider:focus-visible {
  outline: 2px solid rgba(0, 210, 255, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}
.ws-draw-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 2px;
}
.ws-draw-tools[hidden] { display: none !important; }
.ws-draw-shape.ws-draw-shape--active {
  background: rgba(0, 210, 255, 0.22);
  color: #cffafe;
  border-color: rgba(0, 210, 255, 0.45);
}

.ws-topbar .ws-action {
  padding: 6px 10px;
  font-size: 12px;
}
.ws-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12.5px; font-weight: 500;
  transition: all 180ms var(--easing);
  text-decoration: none;
}
.ws-action i { font-size: 15px; }
.ws-action:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.ws-action--ghost { background: transparent; color: var(--text-secondary); }
.ws-action--ghost:hover { color: var(--text); }
.ws-action--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff; border-color: transparent;
  box-shadow: var(--accent-glow);
}
.ws-action--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(0, 210, 255, 0.42); }
.ws-action--block { width: 100%; justify-content: center; padding: 10px; font-size: 13px; }
.ws-pill {
  font-style: normal; font-size: 9.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(0, 210, 255, 0.25); color: #bae6fd;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* Headings */
.ws-h1 { font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.ws-h1-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.04em; }

/* Left sidebar */
.ws-left {
  grid-area: left;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 14px;
  gap: 12px;
  overflow: hidden;
}
.ws-left__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ws-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 160ms var(--easing);
}
.ws-search:focus-within { border-color: rgba(0, 210, 255, 0.6); box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15); }
.ws-search i { color: var(--text-muted); font-size: 15px; }
.ws-search input { flex: 1; background: transparent; border: 0; outline: 0; font-size: 13px; min-width: 0; }
.ws-search input::placeholder { color: var(--text-muted); }
.ws-kbd {
  font-family: var(--font-sans);
  font-size: 10px; padding: 2px 6px;
  border-radius: 4px; border: 1px solid var(--border-strong);
  color: var(--text-muted); background: rgba(255, 255, 255, 0.04);
}

.ws-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ws-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  transition: all 160ms var(--easing);
  white-space: nowrap;
}
.ws-tab i { font-size: 13px; }
.ws-tab:hover { color: var(--text); border-color: var(--border-strong); }
.ws-tab--active { background: var(--accent-soft); color: #fff; border-color: rgba(0, 210, 255, 0.55); }
.ws-tab__count { font-size: 10px; opacity: 0.7; }

.ws-cards {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  margin: 0 -4px 0 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.ws-cards::-webkit-scrollbar { width: 8px; }
.ws-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.ws-cards::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

.ws-card {
  position: relative;
  display: grid;
  grid-template-columns: 14px 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 180ms var(--easing);
  cursor: grab;
  user-select: none;
}
.ws-card__handle {
  width: 14px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  transition: color 160ms var(--easing);
}
.ws-card:hover .ws-card__handle { color: rgba(255, 255, 255, 0.4); }
.ws-card__ai {
  position: absolute; left: 6px; bottom: -8px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px;
  background: linear-gradient(135deg, #00d2ff, #22d3ee);
  color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.45);
}
.ws-card__ai i { font-size: 10px; }
/* Резервируем место под бейдж AI, чтобы карточка не «прыгала». */
.ws-card[data-ai="1"] { margin-bottom: 12px; }
.ws-card--pinned {
  border-color: rgba(251, 191, 36, 0.65) !important;
  background: rgba(251, 191, 36, 0.1) !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 6px 18px rgba(251, 191, 36, 0.12);
}
.ws-card--in-room {
  border-color: rgba(52, 211, 153, 0.45) !important;
  background: rgba(52, 211, 153, 0.06) !important;
}
.ws-card:hover {
  border-color: rgba(0, 210, 255, 0.4);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 6px 18px rgba(0, 210, 255, 0.15);
}
.ws-card:active { cursor: grabbing; }
.ws-card__thumb {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
/* Фото товаров обычно на белом фоне — даём светлую подложку и паддинг,
   чтобы не выглядели «пустыми белыми квадратами». */
.ws-card__thumb:has(img) { background: #f4f5f7; padding: 3px; }
.ws-card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ws-card__thumb i { font-size: 22px; }
.ws-card__body { min-width: 0; }
.ws-card__name {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ws-card__meta {
  font-size: 11px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.ws-card__chips { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.ws-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ws-chip--cat { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.ws-chip--ai { background: rgba(0, 210, 255, 0.2); color: #bae6fd; }
.ws-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ws-card__price { font-size: 12.5px; font-weight: 700; }
.ws-card__add {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); border: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 160ms var(--easing);
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.4);
}
.ws-card__add:hover { background: var(--accent-strong); }
.ws-card__add i { font-size: 14px; }
.ws-card__btns { display: flex; align-items: center; gap: 5px; }
.ws-card__icon {
  width: 24px; height: 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background 160ms var(--easing), color 160ms var(--easing), border-color 160ms var(--easing);
}
.ws-card__icon i { font-size: 13px; }
.ws-card__info:hover { background: rgba(0, 210, 255, 0.18); color: #bae6fd; border-color: rgba(0, 210, 255, 0.4); }
.ws-card__del { display: none; }
.ws-card--scheme .ws-card__del {
  display: flex;
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.3);
}
.ws-card--scheme .ws-card__del:hover { background: rgba(248, 113, 113, 0.25); color: #fff; }

/* Фильтры каталога (AI / Выбранные) */
.ws-cat-filters { display: flex; gap: 6px; margin: 2px 0 2px; flex-wrap: wrap; }
.ws-cat-filter {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: background 160ms var(--easing), color 160ms var(--easing), border-color 160ms var(--easing);
}
.ws-cat-filter i { font-size: 13px; }
.ws-cat-filter:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.ws-cat-filter--active {
  background: var(--accent-soft);
  border-color: rgba(0, 210, 255, 0.5);
  color: #fff;
}

.ws-cards-empty {
  margin: auto; padding: 24px 12px; text-align: center;
  color: var(--text-muted); font-size: 12px; line-height: 1.5;
}

.ws-left__footer {
  display: flex; align-items: center; justify-content: flex-end;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
}
.ws-link { color: var(--accent-strong); font-weight: 600; font-size: 11.5px; }
.ws-link:hover { color: #b5a4ff; }
.ws-link--center { display: block; text-align: center; margin-top: 6px; }

/* Center column — см. shell layout выше */
.ws-stats-panel { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ws-stats-panel__toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  min-height: 30px;
  padding: 0 2px;
  border-radius: var(--radius-lg);
  transition: background 180ms var(--easing), border-color 180ms var(--easing), padding 180ms var(--easing);
}
.ws-stats-panel[data-collapsed="1"] .ws-stats-panel__toolbar {
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}
.ws-stats-panel__summary {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.ws-stats-panel[data-collapsed="1"] .ws-stats-panel__summary { display: block; }
.ws-stats-panel[data-collapsed="0"] .ws-stats-panel__summary { display: none !important; }
.ws-stats-panel__content { min-width: 0; }
.ws-stats-panel[data-collapsed="1"] .ws-stats-panel__content {
  display: none;
}

.ws-foot-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
.ws-foot-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 30px;
  padding: 0 2px;
  border-radius: var(--radius-lg);
  transition: background 180ms var(--easing), border-color 180ms var(--easing), padding 180ms var(--easing);
}
.ws-foot-panel[data-collapsed="1"] .ws-foot-panel__toolbar {
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}
.ws-foot-panel__summary {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.ws-foot-panel[data-collapsed="1"] .ws-foot-panel__summary { display: block; }
.ws-foot-panel[data-collapsed="0"] .ws-foot-panel__summary { display: none !important; }
.ws-foot-panel__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.ws-foot-panel[data-collapsed="1"] .ws-foot-panel__content { display: none; }

.ws-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ws-stat {
  padding: 12px 16px;
  cursor: default;
  transition: all 180ms var(--easing);
}
.ws-stat:hover { border-color: var(--border-strong); }
.ws-stat__label { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.ws-stat__value { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-stat__value em { font-size: 13px; font-weight: 500; color: var(--text-secondary); font-style: normal; }
.ws-stat__sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ws-stat--accent {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.18), rgba(0, 210, 255, 0.04));
  border-color: rgba(0, 210, 255, 0.35);
  cursor: pointer;
}
.ws-stat--accent:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0, 210, 255, 0.2); }
.ws-stat__vat { font-size: 10.5px; color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.ws-stat__chart { position: absolute; right: 14px; top: 14px; width: 80px; height: 28px; opacity: 0.85; pointer-events: none; }
.ws-stat__chart svg { width: 100%; height: 100%; display: block; }

.ws-canvas-wrap {
  flex: 1; min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  height: 100%;
  background: transparent;
}
.ws-canvas-wrap.glass {
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.ws-canvas-wrap::before {
  content: none;
}
.ws-canvas { width: 100%; height: 100%; display: block; user-select: none; position: relative; z-index: 1; overflow: visible; }
.ws-placement-pulse {
  animation: ws-placement-pulse 0.9s ease-in-out 2;
}
@keyframes ws-placement-pulse {
  0%, 100% { stroke: #fbbf24; stroke-width: 2.5; }
  50% { stroke: #fde68a; stroke-width: 4; }
}
.ws-canvas-wrap { overflow: hidden; }

.ws-room-label-editor {
  position: absolute;
  z-index: 30;
  transform: translate(-50%, -50%);
  min-width: 120px;
  max-width: min(280px, 42vw);
  padding: 4px 10px;
  border: 1px solid rgba(0, 210, 255, 0.65);
  border-radius: 8px;
  background: rgba(8, 12, 22, 0.92);
  color: #fff;
  font: 600 14px/1.3 Inter, system-ui, sans-serif;
  text-align: center;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ws-placement-info {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 24;
  width: min(300px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  pointer-events: none;
}
.ws-placement-info[hidden] { display: none !important; }
.ws-placement-info__thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}
.ws-placement-info__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ws-placement-info__thumb-fb { font-size: 32px; color: var(--accent-strong); }
.ws-placement-info__thumb-fb[hidden],
.ws-placement-info__thumb img[hidden] { display: none !important; }
.ws-placement-info__room {
  font-size: 10px;
  font-weight: 600;
  color: #67e8f9;
  margin-bottom: 2px;
}
.ws-placement-info__cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ws-placement-info__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
}
.ws-placement-info__meta,
.ws-placement-info__pn,
.ws-placement-info__qty {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}
.ws-placement-info__price {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.ws-canvas-foot {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

/* Вкладки категорий — по центру зоны редактора */
.ws-cat-rail {
  position: absolute;
  top: 14px;
  left: calc((100% + var(--ws-editor-left-overlay) - var(--ws-editor-right-inset)) / 2);
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px;
  max-width: min(720px, calc(100% - var(--ws-editor-left-overlay) - var(--ws-editor-right-inset) - 24px));
  padding: 0;
  scrollbar-width: none;
  pointer-events: auto;
  transition: left var(--ws-sidebar-duration) var(--ws-sidebar-ease);
}
.ws-cat-rail::-webkit-scrollbar { display: none; }
.ws-cat-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 58px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transition: transform 160ms var(--easing);
}
.ws-cat-rail__item:hover { transform: translateY(-1px) scale(1.02); }
.ws-cat-rail__item--active .ws-cat-rail__icon {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 8px 22px color-mix(in srgb, var(--cat-color) 45%, transparent);
  transform: scale(1.06);
}
.ws-cat-rail__icon {
  --cat-color: #00d2ff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--cat-color) 24%, rgba(8, 10, 18, 0.55));
  border: 2px solid color-mix(in srgb, var(--cat-color) 62%, transparent);
  color: var(--cat-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 160ms var(--easing), box-shadow 160ms var(--easing);
}
.ws-cat-rail__icon i {
  font-size: 20px;
  line-height: 1;
}
.ws-cat-rail__label {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--text-secondary);
  max-width: 58px;
  word-break: break-word;
}
.ws-cat-rail__item--active .ws-cat-rail__label { color: var(--text-primary); }

.ws-cat-panel {
  position: absolute;
  left: 14px;
  right: auto;
  top: 92px;
  bottom: 120px;
  width: min(340px, calc(100% - 28px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  pointer-events: auto;
  animation: ws-cat-panel-in 200ms var(--easing);
}
.ws-cat-panel[hidden] { display: none !important; }
@keyframes ws-cat-panel-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.ws-cat-panel.ws-left {
  grid-area: unset;
  border-radius: var(--radius-lg);
}
.ws-cat-panel .ws-tabs { display: none !important; }

.ws-draw-tools--float {
  position: absolute;
  left: 14px;
  top: 78px;
  z-index: 4;
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 4px;
  background: rgba(10, 12, 22, 0.78);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}
.ws-draw-tools--float[hidden] { display: none !important; }
.ws-draw-tools--float .ws-iconbtn { width: 30px; height: 30px; border-radius: 9px; }

.ws-dock-flyout {
  position: absolute;
  left: 8px;
  right: auto;
  bottom: 12px;
  max-width: min(720px, calc(100% - 80px));
  z-index: 6;
  padding: 10px 12px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ws-dock-flyout[hidden] { display: none !important; }
.ws-dock-flyout__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ws-dock-flyout .ws-dock {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
  justify-content: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0;
}
.ws-dock-flyout .ws-rooms-strip {
  justify-content: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
}

.ws-inspector {
  position: absolute;
  left: 16px;
  top: 16px;
  right: auto;
  box-sizing: border-box;
  width: 280px;
  height: 460px;
  min-width: 220px;
  min-height: 220px;
  max-height: calc(100% - 32px);
  display: flex; flex-direction: column;
  background: rgba(15, 18, 28, 0.82);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
  z-index: 7;
  overflow: hidden;
  overscroll-behavior: contain;
  animation: insp-in 180ms var(--easing);
}
.ws-inspector.ws-inspector--dragging { animation: none; }
.ws-inspector.ws-inspector--resizing { animation: none; user-select: none; }
.ws-inspector__body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.ws-inspector__body .ws-field { flex: 0 0 auto; }
@keyframes insp-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ws-inspector[hidden] { display: none; }
.ws-inspector__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ws-inspector__head-actions {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.ws-iconbtn--danger-soft { color: #ff8aa0; }
.ws-iconbtn--danger-soft:hover {
  background: rgba(255, 93, 117, 0.14);
  border-color: rgba(255, 93, 117, 0.35);
  color: #ffb4c0;
}
.ws-inspector__head--drag {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ws-inspector.ws-inspector--dragging .ws-inspector__head--drag { cursor: grabbing; }
.ws-inspector__title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ws-inspector__swatch {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--ins-c, var(--accent));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 14px var(--ins-c, var(--accent));
}
.ws-inspector__label {
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600;
}
.ws-inspector__sub {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.ws-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ws-field > span {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
}
.ws-field > span em { font-style: normal; color: var(--text-muted); opacity: 0.7; margin-left: 2px; text-transform: none; }
.ws-field input[type="text"],
.ws-field input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: 0;
  transition: border-color 140ms var(--easing), box-shadow 140ms var(--easing);
  font-variant-numeric: tabular-nums;
}
.ws-field input:focus { border-color: rgba(0, 210, 255, 0.6); box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15); }
.ws-field input[type="number"]::-webkit-outer-spin-button,
.ws-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ws-field input[type="number"] { -moz-appearance: textfield; }
.ws-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ws-inspector__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ws-inspector__stats > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.ws-inspector__stats span {
  font-size: 9px; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.ws-inspector__stats b {
  font-size: 12px; color: var(--text);
  font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.ws-inspector__palette { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-palette-dot {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--c, var(--accent));
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 140ms var(--easing), border-color 140ms var(--easing);
  box-shadow: 0 0 12px var(--c, var(--accent)) inset, 0 4px 10px rgba(0,0,0,0.3);
}
.ws-palette-dot:hover { transform: scale(1.1); }
.ws-palette-dot--active { border-color: #fff; box-shadow: 0 0 0 2px rgba(124,92,255,0.4), 0 4px 12px rgba(0,0,0,0.3); }
.ws-inspector__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 16, 0.55);
}
.ws-inspector__resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 9;
  touch-action: none;
  border-radius: 0 0 12px 0;
}
.ws-inspector__resize::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255, 255, 255, 0.35);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.ws-inspector__resize:hover::after {
  border-color: rgba(255, 255, 255, 0.55);
}
.ws-action--danger {
  background: rgba(255, 93, 117, 0.12);
  color: #ff8aa0;
  border-color: rgba(255, 93, 117, 0.3);
}
.ws-action--danger:hover { background: rgba(255, 93, 117, 0.22); border-color: rgba(255, 93, 117, 0.55); }

.ws-copilot-reopen {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 23;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: rgba(8, 10, 18, 0.9);
  color: #e9d5ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ws-copilot-reopen:hover { background: rgba(0, 210, 255, 0.25); }
.ws-copilot-reopen[hidden] { display: none !important; }
.ws-copilot-reopen .ti-sparkles { font-size: 14px; color: #c4b5fd; }

.ws-ai-hints {
  position: fixed;
  left: 72px;
  bottom: 16px;
  width: min(440px, calc(100vw - 96px));
  min-width: 280px;
  min-height: 48px;
  max-height: min(72vh, 560px);
  z-index: 26;
  pointer-events: auto;
  padding: 8px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 255, 0.35);
  background: rgba(8, 10, 18, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0;
  touch-action: none;
}
.ws-ai-hints--docked {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: none;
  flex: 1;
  min-height: 0;
  z-index: auto;
  padding: 10px 12px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ws-ai-hints--docked .ws-ai-hints__drag,
.ws-ai-hints--docked .ws-ai-hints__resize {
  display: none;
}
.ws-ai-hints--docked .ws-ai-hints__head {
  cursor: default;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.ws-ai-hints--docked .ws-ai-hints__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.ws-ai-hints--docked .ws-ai-hints__chat-log {
  flex: 1;
  min-height: 120px;
  max-height: none;
}
.ws-ai-hints[hidden] { display: none !important; }
.ws-ai-hints--collapsed {
  max-height: none;
  height: auto;
  padding-bottom: 8px;
}
.ws-ai-hints--collapsed .ws-ai-hints__body,
.ws-ai-hints--collapsed .ws-ai-hints__resize { display: none !important; }
.ws-ai-hints--dragging { opacity: 0.96; cursor: grabbing; }
.ws-ai-hints--resizing { user-select: none; }
.ws-ai-hints__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.ws-ai-hints__head:active { cursor: grabbing; }
.ws-ai-hints__drag {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
  opacity: 0.55;
  line-height: 1;
}
.ws-ai-hints__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.ws-ai-hints__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.ws-ai-hints__title-wrap .ti-sparkles { color: #c4b5fd; font-size: 14px; }
.ws-ai-hints__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-ai-hints__progress {
  font-size: 11px;
  font-weight: 600;
  color: #67e8f9;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.25);
  white-space: nowrap;
}
.ws-ai-hints__chrome {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.ws-ai-hints__chrome:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-primary); }
.ws-ai-hints__resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  border-radius: 0 0 10px 0;
  opacity: 0.45;
  background: linear-gradient(135deg, transparent 50%, rgba(148, 163, 184, 0.55) 50%);
}
.ws-ai-hints__resize:hover { opacity: 0.85; }
.ws-ai-hints__summary-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 0 0 8px;
}
.ws-ai-hints__summary {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.ws-ai-hints__busy {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: #c4b5fd;
  animation: ws-ai-busy-pulse 1.2s ease-in-out infinite;
}
.ws-ai-hints__actions {
  margin: 0 0 8px;
}
.ws-ai-hints__actions[hidden] { display: none !important; }
.ws-ai-hints__assemble {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.95), rgba(99, 102, 241, 0.95));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}
.ws-ai-hints__assemble:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4); }
.ws-ai-hints__assemble:active { filter: brightness(0.95); }
.ws-ai-hints__assemble .ti { font-size: 14px; }
@keyframes ws-ai-busy-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
.ws-ai-hints__section {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ws-ai-hints__section:first-child { margin-top: 0; }
.ws-ai-hints__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(220px, 38vh);
  overflow-y: auto;
}
.ws-ai-hints__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.ws-ai-hints__msg { flex: 1; min-width: 0; }
.ws-ai-hints__offcat {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
}
.ws-ai-hints__offcat:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.ws-ai-hints__tag {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-secondary);
  padding: 4px 6px;
}
.ws-smeta-section--offcat .ws-smeta-offcat-note {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}
.ws-ai-hints__add {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.2);
  color: #e9d5ff;
  cursor: pointer;
}
.ws-ai-hints__add:hover { background: rgba(0, 210, 255, 0.35); }

.ws-ai-hints__pick {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(29, 158, 117, 0.45);
  background: rgba(29, 158, 117, 0.18);
  color: #a7f3d0;
  cursor: pointer;
}
.ws-ai-hints__pick:hover { background: rgba(29, 158, 117, 0.32); }

.ws-room-setup {
  margin: 0 0 10px;
  padding: 12px 12px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
}
.ws-room-setup[hidden] { display: none !important; }
@keyframes wsRoomSetupNotify {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(29, 158, 117, 0);
    border-color: rgba(251, 191, 36, 0.28);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.35);
    border-color: rgba(29, 158, 117, 0.65);
  }
}
.ws-room-setup--notify {
  animation: wsRoomSetupNotify 0.7s ease-in-out 3;
}
.ws-room-setup__text {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
}
.ws-room-setup__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ws-room-setup__step {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.ws-room-setup__create {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(29, 158, 117, 0.45);
  background: rgba(29, 158, 117, 0.18);
  color: #a7f3d0;
  cursor: pointer;
}
.ws-room-setup__create:hover:not(:disabled) { background: rgba(29, 158, 117, 0.32); }
.ws-room-setup__create:disabled {
  opacity: 0.45;
  cursor: default;
}

.ws-room-setup__counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
}
.ws-room-setup__counter[hidden] { display: none !important; }
.ws-room-setup__counter-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.ws-room-setup__counter-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.22);
}
.ws-room-setup__counter-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.ws-room-setup__counter-value {
  min-width: 1.5rem;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.ws-room-setup__windows {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
}
.ws-room-setup__windows:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.28);
}
.ws-room-setup__windows[hidden] { display: none !important; }

.ws-cctv-variants {
  margin: 0 0 10px;
  padding: 10px 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(55, 138, 221, 0.35);
  background: rgba(55, 138, 221, 0.08);
}
.ws-cctv-variants[hidden] { display: none !important; }
.ws-cctv-variants__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
}
.ws-cctv-variants__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ws-cctv-variant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.ws-cctv-variant:hover { border-color: rgba(56, 189, 248, 0.45); }
.ws-cctv-variant.is-active {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.14);
}
.ws-cctv-variant__label { font-weight: 600; }
.ws-cctv-variant__meta {
  font-size: 11px;
  color: var(--text-muted);
}
.ws-cctv-variant__price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.ws-cctv-variants__status {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}
.ws-cctv-variants__status.is-warn { color: #fbbf24; }
.ws-cctv-variants__status.is-error { color: #f87171; }
.ws-cctv-variants__status.is-ok { color: #6ee7b7; }
.ws-cctv-variants__status[hidden] { display: none !important; }

.ws-ai-hints__tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.ws-ai-hints__tab {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}
.ws-ai-hints__tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.ws-ai-hints__tab--active {
  color: #e9d5ff;
  background: rgba(0, 210, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.35);
}
.ws-ai-hints__pane {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.ws-ai-hints__pane--active { display: flex; }
.ws-ai-hints__pane[hidden] { display: none !important; }

.ws-ai-hints__chat-log {
  flex: 1;
  min-height: 88px;
  max-height: min(240px, 32vh);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 2px;
  scroll-behavior: smooth;
}
.ws-ai-hints__chat-msg {
  max-width: 96%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}
.ws-ai-hints__chat-msg--user {
  align-self: flex-end;
  color: #f1f5f9;
  background: rgba(0, 210, 255, 0.32);
  border: 1px solid rgba(0, 210, 255, 0.4);
}
.ws-ai-hints__chat-msg--assistant {
  align-self: flex-start;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.ws-ai-hints__chat-msg--system {
  align-self: center;
  font-size: 10px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  text-align: center;
  padding: 2px 4px;
}
.ws-ai-hints__chat-msg--typing {
  align-self: flex-start;
  color: #67e8f9;
  font-style: italic;
}
.ws-ai-hints__chat-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.ws-ai-hints__chat-input {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.4;
  font-family: inherit;
}
.ws-ai-hints__chat-input:focus {
  outline: none;
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.15);
}
.ws-ai-hints__chat-input::placeholder { color: var(--text-muted); }
.ws-ai-hints__chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-end;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.45), rgba(99, 102, 241, 0.35));
  color: #f5f3ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.ws-ai-hints__chat-send:hover:not(:disabled) { filter: brightness(1.1); }
.ws-ai-hints__chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .ws-ai-hints { width: min(440px, calc(100vw - 20px)); max-height: 65vh; }
}

.ws-dock {
  display: flex; gap: 6px;
  padding: 8px;
  background: rgba(10, 12, 22, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ws-dock-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  width: 64px; padding: 8px 6px;
  border-radius: 14px;
  transition: all 220ms var(--easing);
  cursor: grab;
}
.ws-dock-item:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-6px) scale(1.05); }
.ws-dock-item:active { cursor: grabbing; transform: translateY(-2px) scale(1.0); }
.ws-dock-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
  background: var(--cat-color, var(--accent));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px var(--cat-glow, rgba(0, 210, 255, 0.4));
}
.ws-dock-label {
  font-size: 9.5px; color: var(--text-secondary);
  margin-top: 6px; text-align: center; line-height: 1.15;
  letter-spacing: 0.02em;
}
.ws-dock-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 5px 9px; background: rgba(15, 17, 25, 0.95);
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 10.5px; color: var(--text); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 160ms var(--easing);
}
.ws-dock-item:hover .ws-dock-tooltip { opacity: 1; }

.ws-door-hint {
  position: fixed;
  z-index: 120;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(15, 17, 25, 0.94);
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ws-door-hint[hidden] { display: none !important; }

.ws-window-hint {
  position: fixed;
  z-index: 120;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 17, 25, 0.94);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ws-window-hint[hidden] { display: none !important; }

.ws-opening-edit-hint {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(92vw, 560px);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: #e2e8f0;
  font: 500 12px/1.35 Inter, system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.ws-opening-edit-hint[hidden] { display: none !important; }

.ws-rooms-strip {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  max-width: 100%;
  pointer-events: auto;
  min-height: 24px;
}
.ws-room-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(10, 12, 22, 0.75);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 11px; color: var(--text-secondary);
  pointer-events: auto; cursor: pointer;
}
.ws-room-chip__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--accent)); }
.ws-room-chip--selected { border-color: rgba(0, 210, 255, 0.55); color: var(--text); }

.ws-drag-ghost {
  position: fixed; top: 0; left: 0;
  display: none; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(15, 17, 25, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  pointer-events: none; z-index: 9999;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  will-change: transform;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
}
.ws-drag-ghost span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  display: inline-block;
}
.ws-drag-ghost i {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ghost-bg, var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.ws-drag-ghost--show { display: flex; }

/* Смета — контент внутри плавающего окна */

.ws-detail {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px; color: var(--text-secondary);
}
.ws-detail:hover { border-color: var(--border-strong); }
.ws-detail__label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; }
.ws-detail__btn {
  flex: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text); font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: all 140ms var(--easing);
}
.ws-detail__btn:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.06); }
.ws-detail__btn i { color: var(--text-muted); font-size: 14px; transition: transform 200ms var(--easing); }
.ws-detail[data-open="1"] .ws-detail__btn i { transform: rotate(180deg); }
.ws-detail__menu {
  position: absolute; top: calc(100% + 6px); right: 0; left: 0;
  background: rgba(15, 18, 28, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 10;
  animation: dropdown-in 160ms var(--easing);
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ws-detail__menu[hidden] { display: none; }
.ws-detail__opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary); font-size: 12.5px; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: all 140ms var(--easing);
}
.ws-detail__opt i { font-size: 14px; color: var(--text-muted); }
.ws-detail__opt:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.ws-detail__opt:hover i { color: var(--accent-strong); }
.ws-detail__opt--active { background: var(--accent-soft); color: #fff; }
.ws-detail__opt--active i { color: var(--accent-strong); }

.ws-subtotals { display: flex; flex-direction: column; gap: 6px; }
.ws-sub-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px; color: var(--text-secondary);
}
.ws-sub-row em { font-style: normal; color: var(--text-muted); margin-left: 2px; }
.ws-sub-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-sub-card {
  position: relative;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.65), rgba(70, 50, 200, 0.35));
  box-shadow: 0 16px 38px rgba(0, 210, 255, 0.28);
  overflow: hidden;
  cursor: pointer;
}
.ws-sub-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 80% 0%, rgba(255,255,255,0.18), transparent 70%);
  pointer-events: none;
}
.ws-sub-card:hover { transform: translateY(-1px); box-shadow: 0 22px 48px rgba(0, 210, 255, 0.36); }
.ws-sub-card__label { font-size: 11px; color: rgba(255, 255, 255, 0.7); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.ws-sub-card__value { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ws-sub-card__hint { font-size: 11px; color: rgba(255, 255, 255, 0.7); margin-top: 2px; }

/* Планируемый бюджет над кругом сметы */
.ws-budget-plan {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 6px;
  padding: 0 2px;
}
.ws-budget-plan__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ws-budget-plan__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ws-budget-plan__value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-budget-plan__value.is-over {
  color: #f87171;
}
.ws-budget-plan__increase {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.ws-budget-plan__increase:hover {
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.08);
  color: #f1f5f9;
}
.ws-budget-plan__increase:focus-visible {
  outline: 2px solid rgba(0, 210, 255, 0.45);
  outline-offset: 2px;
}
.ws-budget-plan__warn {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  color: #f87171;
  line-height: 1.3;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-budget-plan {
  margin: 4px 0 2px;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-budget-plan__value {
  font-size: 13px;
}
.ws-smeta-panel--docked.ws-smeta-panel--compact .ws-budget-plan__increase {
  font-size: 9px;
  padding: 3px 6px;
}

/* Попап изменения бюджета — слева от панели сметы */
.ws-budget-popover {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.ws-budget-popover:not([hidden]) {
  pointer-events: auto;
}
.ws-budget-popover[hidden] {
  display: none !important;
}
.ws-budget-popover__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.35);
  z-index: 55;
}
.ws-budget-popover__card {
  position: fixed;
  transform: translate(-100%, -50%);
  width: min(340px, calc(100vw - 96px));
  max-height: min(520px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  z-index: 60;
}
.ws-budget-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.ws-budget-popover__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.ws-budget-popover__close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-budget-popover__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.ws-budget-popover__body {
  padding: 12px 14px;
  overflow: auto;
}
.ws-budget-popover__body .cfg-budget {
  gap: 12px;
}
.ws-budget-popover__body .cfg-budget__presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ws-budget-popover__foot {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
}

.ws-donut { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.ws-donut svg { width: 110px; height: 110px; }
.ws-donut__legend { display: flex; flex-direction: column; gap: 5px; }
.ws-legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-secondary); }
.ws-legend-row b { color: var(--text); margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.ws-donut__empty { color: var(--text-muted); font-size: 11.5px; text-align: center; }

.ws-breakdown { display: flex; flex-direction: column; gap: 4px; }
.ws-break-row {
  display: grid;
  grid-template-columns: 26px 1fr auto 26px;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 10px 8px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px; color: var(--text-secondary);
}
.ws-break-row[data-key="equip"] { grid-template-columns: 26px 1fr auto; }
.ws-break-row[hidden],
.ws-break-row.ws-break-row--excluded { display: none !important; }
.ws-break-remove {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.ws-break-row:hover .ws-break-remove { opacity: 1; }
.ws-break-remove:hover {
  background: rgba(255, 120, 140, 0.12);
  color: #ff8aa0;
}
.ws-break-remove i { font-size: 14px; }
.ws-break-restore {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 4px 2px;
  font-size: 11px;
  color: var(--text-muted);
}
.ws-break-restore__label { margin-right: 2px; }
.ws-break-restore__btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}
.ws-break-restore__btn:hover {
  border-color: rgba(0, 210, 255, 0.45);
  color: var(--text);
}
.ws-break-row em { font-style: normal; color: var(--text-muted); font-size: 10.5px; margin-left: 4px; }
.ws-break-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-break-icon {
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent);
  color: var(--c, var(--accent));
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 40%, transparent);
}
.ws-break-icon i { font-size: 13px; }
.ws-break-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ws-right__footer { display: flex; flex-direction: column; gap: 6px; }
.ws-right__rooms {
  display: flex; flex-direction: column; gap: 6px;
}
.ws-right__rooms-title {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 2px;
}
.ws-proj-room {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.ws-proj-room__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ws-proj-room__name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.ws-proj-room__dot { width: 8px; height: 8px; border-radius: 2px; }
.ws-proj-room__sub { font-size: 11px; color: var(--text-muted); }
.ws-proj-room__total { color: var(--accent-strong); font-size: 12px; font-weight: 700; }
.ws-proj-room__lines { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ws-proj-line {
  display: grid; grid-template-columns: 12px 1fr auto;
  align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-secondary);
}
.ws-proj-line__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); }
.ws-proj-line__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-proj-line__sum { font-variant-numeric: tabular-nums; color: var(--text); }
.ws-proj-line--sku {
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -6px;
  padding: 6px 6px;
  transition: background 160ms var(--easing);
}
.ws-proj-line--sku:hover { background: rgba(0, 210, 255, 0.1); }

.ws-right__rooms-empty {
  margin: auto 0; padding: 18px 6px;
  text-align: center;
  font-size: 11.5px; color: var(--text-muted);
}

/* Leave guard */
.ws-leave-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ws-leave-modal[hidden] { display: none !important; }
.ws-leave-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(10px);
}
.ws-leave-modal__card {
  position: relative;
  width: min(440px, 100%);
  background: var(--ws-smeta-bg, #0a1220);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.ws-leave-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
}
.ws-leave-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 18px;
}
.ws-leave-modal__actions .ws-action--danger {
  margin-left: auto;
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.ws-leave-modal__actions .ws-action--danger:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.5);
}

/* Floor background + existing contour choice */
.ws-floor-bg-contour-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ws-floor-bg-contour-modal[hidden] { display: none !important; }
.ws-floor-bg-contour-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(10px);
}
.ws-floor-bg-contour-modal__card {
  position: relative;
  width: min(480px, 100%);
  background: var(--ws-smeta-bg, #0a1220);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

/* Modal */
.ws-modal {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.ws-modal[hidden] { display: none; }
.ws-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, 0.6); backdrop-filter: blur(12px);
}
.ws-modal__card {
  position: relative; width: min(720px, 100%);
  background: var(--glass-strong);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.ws-modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.ws-modal__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-strong); }
.ws-modal__title { font-weight: 700; }
.ws-modal__sub { font-size: 11.5px; color: var(--text-muted); }
.ws-modal__head > button { margin-left: auto; }
.ws-modal__body { padding: 18px; }
.ws-modal__stepper { display: flex; gap: 8px; margin-bottom: 14px; }
.ws-step { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); font-size: 11px; color: var(--text-muted); }
.ws-step--active { background: var(--accent-soft); border-color: rgba(124,92,255,0.45); color: var(--text); }
.ws-step--done { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.ws-modal__panel { display: none; }
.ws-modal__panel--active { display: block; }
.ws-dropzone {
  border: 1.5px dashed rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center;
  background: rgba(0, 210, 255, 0.04);
  cursor: pointer;
}
.ws-dropzone:hover { border-color: rgba(0, 210, 255, 0.6); background: rgba(0, 210, 255, 0.08); }
.ws-dropzone i { font-size: 28px; color: var(--accent-strong); }
.ws-dropzone b { display: block; margin-top: 8px; }
.ws-dropzone span { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ws-dropzone__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.ws-dropzone__tags em { font-style: normal; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); font-size: 10.5px; color: var(--text-secondary); }
.ws-modal__samples { margin-top: 14px; }
.ws-modal__samples-label { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.ws-modal__samples-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-sample {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary); font-size: 11.5px;
  transition: all 160ms var(--easing);
}
.ws-sample i { font-size: 22px; }
.ws-sample b { color: var(--text); }
.ws-sample span { font-size: 10.5px; color: var(--text-muted); }
.ws-sample:hover { border-color: rgba(0, 210, 255, 0.45); background: rgba(0, 210, 255, 0.08); transform: translateY(-1px); }
.ws-modal__analyzing { padding: 32px 0; text-align: center; }
.ws-modal__analyzing b { display: block; margin-top: 12px; font-size: 14px; }
.ws-modal__analyzing span { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.ws-spinner {
  width: 44px; height: 44px; margin: 0 auto;
  border: 3px solid rgba(0, 210, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.05s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ws-modal__done { padding: 24px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ws-modal__check { width: 56px; height: 56px; border-radius: 50%; background: rgba(52, 211, 153, 0.18); border: 1px solid rgba(52, 211, 153, 0.5); color: #6ee7b7; display: flex; align-items: center; justify-content: center; font-size: 26px; }

/* Smeta modal */
.ws-smeta-modal {
  position: fixed; inset: 0; z-index: 650;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.ws-smeta-modal[hidden] { display: none; }
.ws-smeta-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, 0.7);
  backdrop-filter: blur(14px);
}
.ws-smeta-modal__card {
  position: relative;
  width: min(960px, 100%);
  max-height: min(720px, calc(100dvh - 64px));
  display: flex; flex-direction: column;
  background: var(--ws-smeta-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.ws-smeta-modal__card.glass {
  background: var(--ws-smeta-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ws-smeta-modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ws-smeta-modal__title { display: flex; align-items: center; gap: 12px; }
.ws-smeta-modal__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ws-smeta-tabs {
  display: flex; gap: 4px;
  padding: 10px 20px 0;
}
.ws-smeta-tab {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 9px 9px 0 0;
  font-size: 12.5px; font-weight: 500;
  transition: all 160ms var(--easing);
  position: relative;
  bottom: -1px;
}
.ws-smeta-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.ws-smeta-tab--active {
  color: var(--text);
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--border-strong);
  border-bottom-color: transparent;
}
.ws-smeta-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.ws-smeta-body::-webkit-scrollbar { width: 8px; }
.ws-smeta-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.ws-smeta-empty {
  padding: 60px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ws-smeta-empty i { font-size: 32px; color: var(--accent-strong); opacity: 0.6; }

.ws-smeta-section { margin-bottom: 18px; }
.ws-smeta-section:last-child { margin-bottom: 0; }
.ws-smeta-section__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
}
.ws-smeta-section__head i { font-size: 14px; padding: 4px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); }
.ws-smeta-section__sub { margin-left: auto; font-size: 11px; color: var(--text-muted); font-weight: 500; }

.ws-smeta-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.ws-smeta-table__head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 76px 100px 108px;
  gap: 0 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.ws-smeta-table__head > div:nth-child(n+3) { text-align: right; justify-self: end; }
.ws-smeta-table__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 76px 100px 108px;
  gap: 0 12px;
  align-items: center;
  padding: 12px 14px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  font-size: 13px;
}
.ws-smeta-table__row > div { display: flex; align-items: center; min-width: 0; }
.ws-smeta-table__row > div:nth-child(1) { justify-content: center; }
.ws-smeta-table__row > div:nth-child(n+3) {
  justify-content: flex-end;
  text-align: right;
  font-weight: 600;
  color: var(--text);
}
.ws-smeta-table__row > div:nth-child(3) { color: var(--text-secondary); font-weight: 500; font-size: 12.5px; }
.ws-smeta-table__row > div:nth-child(4) { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.ws-smeta-table .ws-smeta-dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
.ws-smeta-table .ws-smeta-name {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding-right: 4px;
}
.ws-smeta-table .ws-smeta-name span {
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}
.ws-smeta-table .ws-smeta-name em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}
.ws-smeta-table--summary .ws-smeta-table__row > div:nth-child(5) { font-weight: 700; color: #f1f5f9; }
.ws-smeta-table__row--sku {
  cursor: pointer;
  transition: border-color 160ms var(--easing), background 160ms var(--easing), box-shadow 160ms var(--easing);
}
.ws-smeta-table__row--sku:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.15);
}

.ws-sku-preview-modal {
  position: fixed; inset: 0; z-index: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.ws-sku-preview-modal[hidden] { display: none; }
.ws-sku-preview-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, 0.78);
  backdrop-filter: blur(14px);
}
.ws-sku-preview-modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  padding: 22px 22px 20px;
  background: var(--glass-strong);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
}
.ws-sku-preview-modal__x { position: absolute; top: 10px; right: 10px; z-index: 1; }
.ws-sku-preview-modal__grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-right: 28px;
}
.ws-sku-preview-modal__thumb {
  position: relative;
  width: 140px; height: 140px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.ws-sku-preview-modal__thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  padding: 8px;
  object-fit: contain;
  object-position: center;
  background: #f4f5f7;
  border-radius: 12px;
  display: block;
}
.ws-sku-preview-modal__thumb img[hidden] { display: none; }
.ws-sku-preview-modal__thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 44px;
  color: var(--accent-strong);
  background: linear-gradient(145deg, rgba(0, 210, 255, 0.2), transparent);
}
.ws-sku-preview-modal__cat {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted);
}
.ws-sku-preview-modal__title {
  margin-top: 6px;
  font-size: 17px; font-weight: 700; line-height: 1.35;
  color: var(--text);
}
.ws-sku-preview-modal__meta {
  margin-top: 10px;
  font-size: 13px; line-height: 1.45;
  color: var(--text-secondary);
}
.ws-sku-preview-modal__pn {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.ws-sku-preview-modal__qty { margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
.ws-sku-preview-modal__price { margin-top: 6px; font-size: 14px; color: var(--text); }
.ws-sku-preview-modal__link { margin-top: 14px; }
@media (max-width: 520px) {
  .ws-sku-preview-modal__grid { grid-template-columns: 1fr; }
  .ws-sku-preview-modal__thumb { margin: 0 auto; }
}

.ws-smeta-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 18, 0.4);
}
.ws-smeta-foot__col {
  display: flex; flex-direction: column;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ws-smeta-foot__col span { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.ws-smeta-foot__col b { font-size: 16px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ws-smeta-foot__col--total {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.5), rgba(70, 50, 200, 0.2));
  border-color: rgba(0, 210, 255, 0.55);
}
.ws-smeta-foot__col--total b { color: #fff; font-size: 18px; font-weight: 800; }

@media (max-width: 720px) {
  .ws-smeta-modal { padding: 0; }
  .ws-smeta-modal__card { max-height: 100dvh; border-radius: 0; }
  .ws-smeta-table__head,
  .ws-smeta-table__row {
    grid-template-columns: 18px minmax(0, 1fr) 52px 92px;
  }
  .ws-smeta-col--unit { display: none !important; }
  .ws-smeta-foot { grid-template-columns: 1fr; }
}

/* Commercial proposal (КП) */
.ws-kp-modal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 12px;
}
.ws-kp-modal[hidden] { display: none !important; }
.ws-kp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(6px);
}
.ws-kp-modal__shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  max-height: calc(100dvh - 24px);
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background: #0c0e14;
}
.ws-kp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ws-kp-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ws-kp-head__title > i {
  font-size: 22px;
  color: #67e8f9;
}
.ws-kp-head__title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.ws-kp-head__title p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}
.ws-kp-head__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ws-kp-mode {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.kp-mode {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.kp-mode--active {
  background: rgba(124, 58, 237, 0.35);
  color: #ede9fe;
}
.ws-kp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ws-kp-doc {
  overflow: auto;
  padding: 20px 22px 24px;
  background: linear-gradient(180deg, #12141c 0%, #0e1016 100%);
}
.ws-kp-side {
  overflow: auto;
  padding: 18px 16px;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.ws-kp-steps {
  display: flex;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  overflow-x: auto;
}
.kp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  opacity: 0.55;
}
.kp-step--active {
  opacity: 1;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2);
}
.kp-step__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6fe;
}
.kp-step b { display: block; font-size: 11px; color: var(--text-primary); }
.kp-step em { display: block; font-size: 10px; color: var(--text-muted); font-style: normal; }

.kp-doc__letterhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.kp-doc__brand { display: flex; gap: 12px; align-items: center; }
.kp-doc__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
  font-size: 22px;
}
.kp-doc__brand-title { font-size: 14px; font-weight: 800; color: #f8fafc; }
.kp-doc__brand-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.kp-doc__supplier-meta { font-size: 10px; line-height: 1.5; color: #94a3b8; text-align: right; }
.kp-doc__title { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: #f1f5f9; }
.kp-doc__no { font-size: 12px; color: #67e8f9; margin-bottom: 16px; }
.kp-doc__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.kp-doc__card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.kp-doc__card-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}
.kp-doc__card-val { display: block; font-size: 12px; color: #f1f5f9; }
.kp-doc__card-sub { display: block; font-size: 10px; color: #94a3b8; margin-top: 2px; }
.kp-doc__section-title { font-size: 13px; margin: 0 0 10px; color: #e2e8f0; }
.kp-doc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 14px;
}
.kp-doc__table th,
.kp-doc__table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.kp-doc__table th {
  background: rgba(124, 58, 237, 0.12);
  color: #cbd5e1;
  font-weight: 600;
}
.kp-td-num { width: 32px; color: #64748b; }
.kp-td-qty, .kp-td-price, .kp-td-sum { white-space: nowrap; }
.kp-td-sum { font-weight: 700; color: #e9d5ff; }
.kp-line-name { display: flex; gap: 8px; align-items: flex-start; }
.kp-line-name b { display: block; font-size: 11px; color: #f1f5f9; }
.kp-line-name small { display: block; font-size: 10px; color: #94a3b8; margin-top: 2px; }
.kp-line-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.kp-doc__notes { font-size: 10px; color: #94a3b8; line-height: 1.45; margin-bottom: 12px; }
.kp-doc__totals {
  margin-left: auto;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.08);
}
.kp-doc__totals-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.kp-doc__totals-row--grand {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(124, 58, 237, 0.35);
  font-size: 14px;
  color: #f5f3ff;
}
.kp-doc__totals-row--grand b { color: #c4b5fd; font-size: 18px; }

.kp-side__total {
  font-size: 28px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
}
.kp-side__savings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.kp-side__chart-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
}
.kp-side__donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 14px #0c0e14;
}
.kp-side__donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  padding: 24px;
}
.kp-side__cats { margin-bottom: 16px; }
.kp-side__cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
}
.kp-side__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kp-side__cat-body span { display: block; color: #e2e8f0; }
.kp-side__cat-body em { display: block; font-size: 10px; color: #64748b; font-style: normal; }
.kp-side__block h3 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.kp-side__block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kp-side__block li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 6px;
  line-height: 1.35;
}
.kp-side__block li i { color: #67e8f9; margin-top: 1px; }
.kp-side__block--benefits li i { color: #4ade80; }

.ws-kp-modal[data-edit="1"] [data-kp-editable] {
  outline: 1px dashed rgba(124, 58, 237, 0.45);
  border-radius: 4px;
  padding: 2px 4px;
}

@media (max-width: 900px) {
  .ws-kp-layout { grid-template-columns: 1fr; }
  .ws-kp-side { border-left: 0; border-top: 1px solid var(--border); }
  .kp-doc__cards { grid-template-columns: 1fr; }
}

/* Toast */
.ws-toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: rgba(15, 17, 25, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12.5px; color: var(--text);
  box-shadow: var(--shadow-lift);
  z-index: 700;
}
.ws-toast[hidden] { display: none; }

/* Responsive */
@media (max-width: 1280px) {
  /* hub sidebar widths from catalog.css */
}
@media (max-width: 1320px) {
  /* topbar removed — rail uses icon-only buttons */
}
@media (max-width: 1080px) {
  .ws-shell {
    margin-left: var(--ws-left-rail-w);
    width: calc(100vw - var(--ws-left-rail-w));
  }
  body.ws-right-stack-open {
    --ws-right-stack-w: min(340px, 100%);
  }
  .ws-ai-stack--docked {
    width: var(--ws-right-stack-w);
  }
  .ws-cat-rail {
    max-width: min(720px, calc(100% - var(--ws-editor-left-overlay) - var(--ws-editor-right-inset) - 20px));
    gap: 6px;
  }
  .ws-cat-rail__icon { width: 40px; height: 40px; }
  .ws-cat-rail__icon i { font-size: 18px; }
  .ws-cat-panel {
    left: 10px;
    width: min(300px, calc(100% - 20px));
    top: 84px;
    bottom: 96px;
  }
  .ws-bottom-dock {
    left: 0;
    right: 0;
  }
  .ws-wizard {
    padding: 24px 16px;
  }
  body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard {
    padding: 20px 16px;
  }
  .ws-wizard__panel {
    width: 100%;
    max-height: calc(100% - 16px);
  }
  body.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-wizard__panel {
    width: 100%;
    max-height: min(92dvh, 900px);
  }
}
@media (max-width: 720px) {
  .ws-shell { padding: 8px; gap: 8px; }
  .ws-dock-flyout { left: 6px; right: 6px; bottom: 8px; }
}

/* Connection scheme studio (legacy iframe /configurator/workspace.html) */
.ws-tool--scheme {
  border: 1px solid transparent;
}
.ws-tool--scheme:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(0, 210, 255, 0.08);
}
.ws-tool--scheme-active {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #ecfdf5 !important;
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45) !important;
}
.ws-rail__btn--on {
  background: rgba(52, 211, 153, 0.16) !important;
  color: #ecfdf5 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
}
.ws-cscheme {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ws-cscheme[hidden] {
  display: none;
}
.ws-cscheme__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0, 210, 255, 0.18), transparent 55%),
    rgba(2, 4, 10, 0.82);
  backdrop-filter: blur(20px);
}
.ws-cscheme__panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(94dvh, 920px);
  display: flex;
  flex-direction: column;
  background: rgba(8, 10, 18, 0.78);
  border-radius: 18px;
  border: 1px solid rgba(0, 210, 255, 0.28);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65), 0 0 60px rgba(0, 210, 255, 0.08);
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(1.2);
}
.ws-cscheme__panel--fullscreen {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.ws-cscheme__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.ws-cscheme__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ws-cscheme__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d2ff, #34d399);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.65);
  flex-shrink: 0;
}
.ws-cscheme__title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.ws-cscheme__sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ws-cscheme__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ws-cscheme__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.08);
}
.ws-cscheme__toggle input { accent-color: #67e8f9; }
.ws-cscheme__body {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 0;
  flex: 1;
  min-height: 0;
}
.ws-cscheme__graph {
  position: relative;
  padding: 12px;
  min-height: 360px;
  background: radial-gradient(ellipse 70% 55% at 50% 45%, rgba(0, 210, 255, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(15, 18, 30, 0.9), rgba(4, 6, 12, 0.95));
  overflow: hidden;
}
.ws-cscheme__stage {
  position: relative;
  height: min(58dvh, 520px);
  min-height: 320px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: #05070e;
  overflow: hidden;
  cursor: grab;
}
.ws-cscheme__stage:active { cursor: grabbing; }
.ws-cscheme__toolbar {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(12px);
}
.ws-cscheme__legend {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 10px;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
}
.ws-cscheme__legend span { display: inline-flex; align-items: center; gap: 6px; }
.ws-cscheme__leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.ws-cscheme__leg-dot--eth { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
.ws-cscheme__leg-dot--poe { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.6); }
.ws-cscheme__leg-dot--video { background: #67e8f9; box-shadow: 0 0 8px rgba(167, 139, 250, 0.6); }
.ws-cscheme__leg-dot--power { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.55); }
.ws-cscheme__minimap {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  opacity: 0.85;
}
.ws-cscheme__empty {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  border: 1.5px dashed rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  background: rgba(0, 210, 255, 0.05);
  color: var(--text-secondary);
  z-index: 2;
  pointer-events: none;
}
.ws-cscheme__empty[hidden] { display: none !important; }
.ws-cscheme__empty i { font-size: 32px; color: var(--accent-strong); opacity: 0.9; }
.ws-cscheme__empty b { color: var(--text); font-size: 14px; }
.ws-cscheme__empty span { font-size: 12px; line-height: 1.45; max-width: 360px; color: var(--text-muted); }
.ws-cscheme__props-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; }
.ws-cscheme__props-h--sub { margin-top: 6px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ws-cscheme__focus { margin-top: auto; width: 100%; justify-content: center; }
.ws-cscheme__svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes ws-cscheme-dash {
  to { stroke-dashoffset: -120; }
}
.ws-cscheme__link {
  stroke-dashoffset: 0;
  animation: ws-cscheme-dash 2.8s linear infinite;
}
.ws-cscheme__link-label {
  paint-order: stroke fill;
  stroke: rgba(4, 6, 12, 0.85);
  stroke-width: 3px;
  pointer-events: none;
}
.ws-cscheme-card {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--node-color, #00d2ff) 55%, transparent);
  background: rgba(12, 14, 24, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-family: Inter, system-ui, sans-serif;
  pointer-events: none;
}
.ws-cscheme-card--hub {
  border-color: rgba(167, 139, 250, 0.55);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.22), rgba(12, 14, 24, 0.85));
  box-shadow: 0 0 32px rgba(0, 210, 255, 0.25), 0 12px 32px rgba(0, 0, 0, 0.5);
}
.ws-cscheme__node--sel .ws-cscheme-card {
  outline: 2px solid rgba(251, 191, 36, 0.75);
  outline-offset: 1px;
}
.ws-cscheme-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--node-color, #00d2ff) 28%, transparent);
  color: #fff;
  font-size: 18px;
}
.ws-cscheme-card__title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-cscheme-card__sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-cscheme-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.ws-cscheme-card__chip {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}
.ws-cscheme-card__badge {
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ws-cscheme__props {
  border-left: 1px solid rgba(0, 210, 255, 0.15);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 0;
  background: rgba(6, 8, 14, 0.65);
  backdrop-filter: blur(16px);
}
.ws-cscheme__props-kpi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.2);
  font-size: 12px;
}
.ws-cscheme__props-kpi strong { color: #e9d5ff; font-size: 14px; }
.ws-cscheme__props-h {
  font-weight: 700;
  font-size: 12.5px;
}
.ws-cscheme__props-p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.ws-cscheme__props-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}
.ws-cscheme__props-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.ws-cscheme__props-list span {
  color: var(--text-muted);
}
.ws-cscheme__props-list em {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 900px) {
  .ws-cscheme__body {
    grid-template-columns: 1fr;
  }
  .ws-cscheme__props {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ws-cscheme__link {
    animation: none;
    stroke-dasharray: 0;
  }
}

/* Catalog SKU hover preview + pins for room placements */
.ws-catalog-hover {
  position: fixed;
  z-index: 800;
  width: min(300px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  pointer-events: auto;
}
.ws-catalog-hover[hidden] { display: none !important; }
.ws-catalog-hover__thumb {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}
.ws-catalog-hover__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ws-catalog-hover__thumb-fb { font-size: 36px; color: var(--accent-strong); }
.ws-catalog-hover__thumb-fb[hidden],
.ws-catalog-hover__thumb img[hidden] { display: none !important; }
.ws-catalog-hover__cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ws-catalog-hover__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
}
.ws-catalog-hover__meta,
.ws-catalog-hover__pn {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}
.ws-catalog-hover__price {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #bae6fd;
}

/* Plan import, floors, scale */
.ws-dropzone--drag { border-color: #00d2ff !important; background: rgba(0, 210, 255, 0.12) !important; }
.ws-link-btn { background: none; border: none; color: #00d2ff; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.ws-import-progress { width: 100%; max-width: 280px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.ws-import-progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, #00d2ff, #67e8f9); transition: width 0.2s ease; }
.ws-floor-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; position: absolute; top: 0; left: 0; right: 0; z-index: 4; pointer-events: auto; }
.ws-floor-tab { border: 1px solid rgba(255,255,255,0.12); background: rgba(15,23,42,0.75); color: #cbd5e1; border-radius: 8px; padding: 4px 10px; font-size: 11px; cursor: pointer; backdrop-filter: blur(8px); }
.ws-floor-tab--active { border-color: #00d2ff; color: #e0f2fe; background: rgba(0,210,255,0.15); }
.ws-floor-tab--add { padding: 4px 8px; }

/* Опрос шаг 3 — вкладки этажей внизу схемы, над границей поля */
body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tabs:not([hidden]) {
  position: fixed;
  right: auto;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 6px;
  padding: 0;
  min-width: 0;
  max-width: none;
  width: max-content;
  pointer-events: auto;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tab {
  padding: 5px 10px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 96px;
}

body.ws-wizard-step-area.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tab--add {
  padding: 8px 12px;
}

/* Опрос шаг 2 — вкладки этажей слева от панели опросника */
body.ws-wizard-step-floors.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tabs:not([hidden]) {
  position: fixed;
  top: 50%;
  right: auto;
  left: calc(
    (100vw + var(--ws-wizard-anchor-left, var(--ws-left-rail-w, 72px))) / 2
    - min(410px, (100vw - var(--ws-wizard-anchor-left, var(--ws-left-rail-w, 72px)) - 56px) / 2)
    - 70px
  );
  z-index: 25;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  min-width: 92px;
  max-width: 120px;
  transform: translate(-100%, -50%);
  pointer-events: auto;
}

body.ws-wizard-step-floors.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tab {
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

body.ws-wizard-step-floors.ws-wizard-active:not(.ws-wizard-welcome):not(.ws-wizard-upload) .ws-floor-tab--add {
  padding: 8px 12px;
}

/* Редактор — вкладки этажей в правом верхнем углу, слева от панели агента */
body:not(.ws-wizard-active) .ws-floor-tabs:not([hidden]) {
  position: fixed;
  top: 20px;
  left: auto;
  right: calc(var(--ws-editor-right-inset, var(--ws-right-stack-w)) + 34px);
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0;
  padding: 0;
  min-width: 0;
  max-width: none;
  width: max-content;
  z-index: 12;
  pointer-events: auto;
  overflow: visible;
}

body:not(.ws-wizard-active) .ws-floor-tabs-cluster {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

body:not(.ws-wizard-active) .ws-floor-tab-actions-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

body:not(.ws-wizard-active) .ws-floor-tabs-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 92px;
}

body:not(.ws-wizard-active) .ws-floor-tab {
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

body:not(.ws-wizard-active) .ws-floor-tab--add {
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body:not(.ws-wizard-active) .ws-floor-tab__add-label {
  font-size: 12px;
  font-weight: 600;
}

.ws-floor-tab-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ws-floor-tab-gear {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.ws-floor-tab-bg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.ws-floor-tab-bg i,
.ws-floor-tab-gear i {
  font-size: 14px;
  line-height: 1;
}

.ws-floor-tab-bg--active {
  border-color: #38bdf8;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.18);
}

.ws-floor-bg-hint {
  position: fixed;
  z-index: 30;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(15, 23, 42, 0.92);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: ws-floor-bg-hint-in 0.35s ease;
}

.ws-floor-bg-hint[hidden] {
  display: none !important;
}

.ws-floor-bg-hint__arrow {
  position: absolute;
  left: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(15, 23, 42, 0.92);
  border-left: 1px solid rgba(251, 191, 36, 0.45);
  border-bottom: 1px solid rgba(251, 191, 36, 0.45);
}

.ws-floor-bg-hint--anchor-right .ws-floor-bg-hint__arrow {
  left: auto;
  right: -5px;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid rgba(251, 191, 36, 0.45);
  border-top: 1px solid rgba(251, 191, 36, 0.45);
}

@keyframes ws-floor-bg-hint-in {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ws-floor-tab-gear--active {
  border-color: #fbbf24;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.18);
}

/* Редактор — режим правки контура этажа (шестерёнка) */
body.ws-editor-floor-contour .ws-wizard-area-viewport:not([hidden]) {
  display: block;
}

body.ws-editor-floor-contour .ws-canvas-wrap {
  z-index: 2;
}

body.ws-editor-floor-contour #ws-canvas {
  pointer-events: auto;
}

body.ws-editor-floor-contour .ws-wizard-area-viewport {
  top: clamp(24px, 4vh, 48px);
  right: clamp(28px, 4vw, 56px);
  bottom: clamp(24px, 4vh, 48px);
  left: calc(var(--ws-left-rail-w, 72px) + 12px);
}

body.ws-hub-sidebar-open.ws-editor-floor-contour .ws-wizard-area-viewport {
  left: calc(var(--ws-left-stack-w, 248px) + 12px);
}

body.ws-editor-floor-contour .ws-floor-tabs:not([hidden]) {
  z-index: 25;
}

body.ws-editor-floor-contour .ws-wizard-bg-opacity:not([hidden]) {
  display: block;
}

body.ws-editor-floor-contour #ws-scale-panel {
  display: none !important;
}

/* Редактор — первичная настройка этажа (фон + контур), без отдельного окна мастера */
body.ws-editor-floor-plan-setup.ws-wizard-contour-draw .ws-wizard-contour-hud:not([hidden]) {
  display: flex;
}

body.ws-editor-floor-plan-setup.ws-wizard-contour-draw #ws-canvas {
  cursor: crosshair;
}

.ws-floor-bg-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ws-floor-bg-modal[hidden] {
  display: none !important;
}

.ws-floor-bg-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.ws-floor-bg-modal__card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  border-radius: 16px;
  padding: 0;
}

.ws-floor-bg-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 0;
}

.ws-floor-bg-modal__head .ws-iconbtn {
  margin-left: auto;
}

.ws-floor-bg-modal__body {
  padding: 12px 20px 20px;
}

.ws-floor-bg-modal__layout {
  grid-template-columns: 1fr !important;
}

.ws-floor-bg-modal__panel .cfg-panel__head {
  display: none;
}

.ws-scale-panel { position: absolute; top: 48px; right: 12px; z-index: 5; width: 220px; padding: 12px; border-radius: 12px; }
.ws-scale-panel__title { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ws-scale-panel__hint { font-size: 11px; color: var(--text-muted); margin: 0 0 8px; line-height: 1.35; }
.ws-scale-panel__field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; margin-bottom: 10px; }
.ws-scale-panel__field input { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #f1f5f9; padding: 6px 8px; }
.ws-scale-panel__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-smeta-table__row--placement { cursor: pointer; }
.ws-smeta-table__row--placement:hover { background: rgba(0,210,255,0.08); }
.cfg-sla-grid { display: grid; gap: 8px; margin: 12px 0; }
.cfg-sla-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; cursor: pointer; text-align: left; background: rgba(255,255,255,0.03); }
.cfg-sla-option.is-selected { border-color: #00d2ff; background: rgba(0,210,255,0.1); }
.cfg-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.cfg-service-chip { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); cursor: pointer; font-size: 12px; }
.cfg-service-chip.is-selected { border-color: #00d2ff; background: rgba(0,210,255,0.12); }

/* Editor onboarding tour (after wizard) */
.ws-editor-tour {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.ws-editor-tour[hidden] {
  display: none !important;
}

.ws-editor-tour__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.ws-editor-tour__leader {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.ws-editor-tour__leader polyline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-editor-tour__dim {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ws-editor-tour__dim[hidden] {
  display: none !important;
}

.ws-editor-tour__spotlight {
  display: none !important;
}

.ws-editor-tour__card {
  position: fixed;
  z-index: 2;
  width: min(320px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(15, 23, 42, 0.96);
  pointer-events: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ws-editor-tour__close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.ws-editor-tour__step {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}

.ws-editor-tour__title {
  margin: 0 28px 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.ws-editor-tour__text {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #cbd5e1;
}

.ws-editor-tour__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ws-editor-tour__skip {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 4px;
}

.ws-editor-tour__skip:hover {
  color: #e2e8f0;
}

body.ws-editor-tour-active .ws-editor-tour {
  pointer-events: auto;
}

body.ws-editor-tour-active .ws-editor-tour-target {
  position: relative;
  z-index: 210 !important;
  filter: brightness(1.14) saturate(1.18) contrast(1.06);
  box-shadow: none;
}

body.ws-editor-tour-active #ws-floor-tabs.ws-editor-tour-target,
body.ws-editor-tour-active #ws-ai-chat-form.ws-editor-tour-target,
body.ws-editor-tour-active #ws-ai-compose__modes.ws-editor-tour-target,
body.ws-editor-tour-active #ws-cat-rail.ws-editor-tour-target,
body.ws-editor-tour-active #ws-ai-panel.ws-editor-tour-target,
body.ws-editor-tour-active #ws-smeta-panel.ws-editor-tour-target,
body.ws-editor-tour-active #ws-ai-stack-rail-agent.ws-editor-tour-target {
  position: fixed;
  z-index: 210 !important;
}

body.ws-editor-tour-active #ws-bottom-bar .ws-editor-tour-target {
  z-index: 210 !important;
}

body.ws-editor-tour-active #ws-canvas-wrap.ws-editor-tour-target {
  position: relative;
  z-index: 210 !important;
}

body.ws-room-contour-draw #ws-canvas,
body.ws-room-contour-draw #ws-canvas-wrap {
  cursor: crosshair !important;
}
.cfg-service-chip input { accent-color: #00d2ff; }
