/* WebCAD (timbim.ru/webcad): раскладка интерфейса редактора для сайта.
   Подключается только в серверном режиме; локальная версия (localhost:8090) не меняется. */

html, body {
  overscroll-behavior: none;
  touch-action: manipulation;
}
.canvas-container, #cadCanvas {
  touch-action: none !important;
}

/* ---------- 1. Унифицированная шапка: слева логотип timbim.ru, по центру Файлы + наименование документа + режим, справа навигация ---------- */
#wcHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: #16191d;
  border-bottom: 1px solid #323a46;
  flex-shrink: 0;
  z-index: 40;
  position: relative;
}
#wcHeader .wc-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 2;
}
#wcHeader .wc-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e6edf3;
  font-family: "Consolas", "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
}
#wcHeader .wc-brand-ico {
  width: 26px;
  height: 26px;
  padding: 3.5px;
  background: #3b82f6;
  color: #ffffff;
  border-radius: 2px;
  flex-shrink: 0;
}
#wcHeader .wc-center-ctx {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: #1e2329;
  border: 1px solid #323a46;
  border-radius: 3px;
  min-width: 0;
  margin: 0 auto;
}
#wcHeader .wc-title-slot {
  min-width: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}
#wcHeader .wc-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
#wcHeader .wc-nav-link {
  font-family: "Consolas", "IBM Plex Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.12s;
}
#wcHeader .wc-nav-link:hover {
  color: #e6edf3;
  background: #252b33;
  border-color: #323a46;
}
#wcHeader .wc-nav-link.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
}
#wcHeader .wc-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
#wcHeader .wc-title {
  background: transparent !important;
  border: 1px solid transparent !important;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #f8fafc;
}
#wcHeader .wc-title:hover { border-color: #334155 !important; background: #151b24 !important; }
#wcHeader .wc-title #activeProjectFileBadge {
  color: #f8fafc !important;
  font-size: 14.5px;
  font-weight: 700;
  max-width: 44vw !important;
  white-space: nowrap;
}
#wcHeader .wc-title-caret {
  font-size: 10.5px;
  color: #93c5fd;
  margin-left: 2px;
  flex-shrink: 0;
}
.wc-title-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: min(360px, 92vw);
  background: #161b24;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 150;
}
.wc-title-menu.open {
  display: flex;
}
.wc-tabs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}
.wc-tab-item {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #e2e8f0;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.wc-tab-item:hover {
  background: #1f293b;
  border-color: #334155;
}
.wc-tab-item.active {
  background: rgba(29, 78, 216, 0.28);
  border-color: #60a5fa;
  color: #ffffff;
  font-weight: 700;
}
.wc-tab-dot {
  font-size: 11px;
  color: #38bdf8;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.wc-tab-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-tab-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #1d4ed8;
  color: #e0f2fe;
  border: 1px solid #60a5fa;
  flex-shrink: 0;
}
.wc-tab-close {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.wc-tab-close:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
#wcHeader .wc-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#wcHeader .wc-btn {
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #e2e8f0;
  font: 600 12px "Segoe UI", sans-serif;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
#wcHeader .wc-btn:hover { background: #273449; border-color: #64748b; }
#wcHeader .wc-btn.primary { background: #1d4ed8; border-color: #60a5fa; color: #fff; }
#wcHeader .wc-btn.primary:hover { background: #2563eb; }
#wcHeader .wc-mode {
  font: 700 12px "Segoe UI", sans-serif;
  white-space: nowrap;
  padding: 0 4px;
}
#wcHeader .wc-home { border-color: #334155; background: transparent; color: #94a3b8; }
#wcHeader .wc-home:hover { color: #e2e8f0; }

/* ---------- 2. Верхняя панель: выпадающие меню Импорт / Экспорт ---------- */
.wc-io-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wc-dd-wrap {
  position: relative;
  display: inline-flex;
}
.wc-dd-btn .wc-caret {
  font-size: 10px;
  opacity: 0.8;
  margin-left: 2px;
}
.wc-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 225px;
  background: #1a1f29;
  border: 1px solid #475569;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 110;
}
.wc-dd-menu.open {
  display: flex;
}
.wc-dd-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #93c5fd;
  padding: 4px 8px;
  border-bottom: 1px solid #2d3545;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}
.wc-dd-item {
  padding: 6px 9px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #e2e8f0;
  transition: background 0.1s;
}
.wc-dd-item:hover {
  background: #2563eb;
  color: #ffffff;
}
.wc-dd-item .wc-ext {
  font-family: "Consolas", monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #0f172a;
  color: #93c5fd;
  border: 1px solid #334155;
}
.wc-dd-item:hover .wc-ext {
  background: #1e40af;
  color: #fff;
  border-color: #93c5fd;
}
.wc-dd-sep {
  height: 1px;
  background: #2d3545;
  margin: 3px 0;
}

/* ---------- 3. Лента инструментов: компактные значки + выпадающий Сварной шов + панель ИИ ---------- */
.ribbon-bar .tb-group-label { display: none !important; }
.ribbon-bar .tb-group { gap: 3px; }

/* Кнопка сварного шва с выпадающим списком при удержании / клике на уголок ▾ */
.wc-weld-wrap {
  position: relative;
  display: inline-flex;
}
.wc-weld-btn {
  position: relative;
}
.wc-flyout-corner {
  position: absolute;
  right: 2px;
  bottom: 0px;
  font-size: 8.5px;
  line-height: 1;
  color: #93c5fd;
  pointer-events: none;
}
.wc-weld-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 280px;
  background: #1a1f29;
  border: 1px solid #38bdf8;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 115;
}
.wc-weld-menu.open {
  display: flex;
}
.wc-weld-item {
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #e2e8f0;
  border: 1px solid transparent;
}
.wc-weld-item:hover {
  background: #252d3d;
  border-color: #475569;
}
.wc-weld-item.active {
  background: rgba(3, 105, 161, 0.35);
  border-color: #38bdf8;
  color: #fff;
  font-weight: 600;
}
.wc-weld-ico {
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}
.wc-weld-ico svg.cad-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

/* Кнопка включения выезжающей слева панели ИИ (рядом со Свойствами) */
.wc-ai-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(88, 28, 135, 0.35) !important;
  border: 1px solid rgba(168, 85, 247, 0.65) !important;
  color: #e9d5ff !important;
  font-weight: 700 !important;
  padding: 0 9px !important;
  height: 28px !important;
  border-radius: 5px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wc-ai-toggle-btn:hover {
  background: rgba(126, 34, 206, 0.55) !important;
  border-color: #c084fc !important;
  color: #fff !important;
}
.wc-ai-toggle-btn.active {
  background: #7e22ce !important;
  border-color: #d8b4fe !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Выезжающая СЛЕВА панель ИИ (зеркально правой панели Свойств .rightbar) */
.wc-leftbar {
  width: 310px;
  background: var(--bg-panel, #181c24);
  border-right: 1px solid var(--border, #2b3240);
  display: flex;
  flex-direction: column;
  z-index: 26;
  transition: width 0.2s ease, opacity 0.15s ease;
  overflow: hidden;
  flex-shrink: 0;
}
.wc-leftbar.collapsed {
  width: 0 !important;
  border-right: none !important;
  opacity: 0;
  pointer-events: none;
}
.wc-ai-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  gap: 8px;
}
.wc-ai-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #2b3240;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wc-ai-chat-section {
  flex: 1;
  min-height: 240px;
}
.wc-ai-sec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wc-ai-zone-status {
  font-size: 11.5px;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px dashed #475569;
  color: #cbd5e1;
}
.wc-ai-zone-status.active {
  background: rgba(88, 28, 135, 0.25);
  border: 1px solid #a855f7;
  color: #f3e8ff;
}
.wc-ai-zone-status.busy {
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid #f59e0b;
  color: #fef3c7;
  animation: wcAiPulse 1.4s infinite ease-in-out;
}
@keyframes wcAiPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 10px 2px rgba(245, 158, 11, 0.55); }
}
.wc-ai-btn-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.wc-ai-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.wc-ai-btn {
  background: #1e2532;
  border: 1px solid #384152;
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.12s ease;
}
.wc-ai-btn:hover {
  background: #2b3548;
  border-color: #a855f7;
  color: #fff;
}
.wc-ai-btn.primary {
  flex: 1;
  background: rgba(126, 34, 206, 0.35);
  border-color: #a855f7;
  color: #f3e8ff;
}
.wc-ai-btn.primary:hover,
.wc-ai-btn.primary.active {
  background: #7e22ce;
  border-color: #d8b4fe;
  color: #fff;
}
.wc-ai-model-select {
  background: #0f172a;
  color: #d8b4fe;
  border: 1px solid #475569;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 5px;
  cursor: pointer;
}
.wc-ai-chat-log {
  flex: 1;
  min-height: 150px;
  max-height: 340px;
  overflow-y: auto;
  background: #0d1117;
  border: 1px solid #262c36;
  border-radius: 5px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.wc-ai-msg {
  padding: 6px 8px;
  border-radius: 6px;
  word-break: break-word;
}
.wc-ai-msg-user {
  background: rgba(3, 105, 161, 0.32);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
  align-self: flex-end;
  max-width: 92%;
}
.wc-ai-msg-ai {
  background: rgba(88, 28, 135, 0.24);
  border: 1px solid rgba(168, 85, 247, 0.38);
  color: #f3e8ff;
  align-self: flex-start;
  max-width: 96%;
}
.wc-ai-msg-sys {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 11px;
}
.wc-ai-quick-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.wc-ai-chip {
  background: rgba(51, 65, 85, 0.45);
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.12s;
}
.wc-ai-chip:hover {
  background: rgba(126, 34, 206, 0.4);
  border-color: #c084fc;
  color: #fff;
}
.wc-ai-input-row {
  display: flex;
  gap: 5px;
  align-items: flex-end;
}
.wc-ai-input {
  flex: 1;
  background: #0d1117;
  border: 1px solid #3b4252;
  border-radius: 5px;
  color: #f8fafc;
  font-size: 12px;
  font-family: inherit;
  padding: 5px 7px;
  resize: vertical;
  min-height: 38px;
  max-height: 110px;
}
.wc-ai-input:focus {
  outline: none;
  border-color: #a855f7;
}
.wc-ai-send-btn {
  width: 34px;
  height: 38px;
  border-radius: 5px;
  background: #7e22ce;
  border: 1px solid #c084fc;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wc-ai-send-btn:hover {
  background: #9333ea;
}
.wc-ai-send-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ---------- 4. Нижняя строка состояния (как в AutoCAD):
   слева — учётная запись и координаты, правее — переключатели, масштаб, тема и КРАЙНЕ СПРАВА — рабочее пространство ---------- */
.wc-bottom-auth {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}
.wc-bottom-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #384252;
  background: #1b2028;
  color: #cbd5e1;
  font-family: "Consolas", monospace;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}
.wc-bottom-auth-link:hover {
  border-color: #3b82f6;
  color: #ffffff;
}
.wc-bottom-auth-link.online {
  border-color: rgba(34, 197, 94, 0.45);
  color: #f8fafc;
}
.status-bar-left .coords-display {
  text-align: left;
  width: auto;
  min-width: 122px;
}
.status-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
}
.toggle-pill .st-ico {
  font-family: "Consolas", monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.wc-bottom-scale {
  height: 24px !important;
  padding: 0 5px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
  background: #1c212b !important;
  border: 1px solid #475569 !important;
  border-radius: 4px !important;
  cursor: pointer;
}
.wc-bottom-scale:hover {
  border-color: #fbbf24 !important;
}
/* Пока открыта плавающая командная строка, дублирующий текст внизу не показываем */
body:has(#floatingCmdBar:not(.hidden)) #statusBarHint { display: none; }

/* ---------- 5. Адаптивность для узких экранов ноутбуков и смартфонов ---------- */
@media (max-width: 1180px) {
  /* Убираем подписи у переключателей сетки/орто/привязки, оставляя понятные символы в одну строку */
  .toggle-pill .st-lbl { display: none; }
  .toggle-pill { padding: 2px 6px; title: attr(title); }
}

@media (max-width: 900px) {
  #wcHeader .wc-brand { display: none; }
  #wcHeader .wc-mode { display: none; }
  #wcHeader .wc-title #activeProjectFileBadge { max-width: 34vw !important; }
  .topbar .btn-lbl { display: none; }
  #ribbonLayerSelect { min-width: 110px !important; }
  #propLinetypeSelect { width: 105px !important; }
  .rightbar { position: absolute !important; right: 0; top: 0; bottom: 0; box-shadow: -8px 0 24px rgba(0,0,0,0.75); }
  .rightbar.collapsed { display: none !important; }
  .wc-leftbar { position: absolute !important; left: 0; top: 0; bottom: 0; box-shadow: 8px 0 24px rgba(0,0,0,0.75); }
  .wc-leftbar.collapsed { display: none !important; }
}

@media (max-width: 640px) {
  #wcHeader { padding: 0 6px; gap: 5px; }
  #wcHeader .wc-btn .wc-btn-txt { display: none; }
  .topbar { padding: 3px 6px; gap: 4px; }
  .ribbon-bar { padding: 3px 6px; gap: 3px; }
  .ribbon-bar .tb-btn.icon-only { width: 27px; height: 26px; }
  .bottombar { padding: 0 6px; gap: 4px; }
  .status-bar-left .coords-display { min-width: 90px; font-size: 10.5px; }
  #wsCurrentLabel { display: none; }
  .ws-switcher-btn { padding: 0 6px; }
}

/* ---------- 6. СВЕТЛАЯ ТЕМА «БУМАГА ГОСТ / МИЛЛИМЕТРОВКА» (html.theme-vatman) ---------- */
html.theme-vatman {
  --bg-dark: #f4f1ea;
  --bg-panel: #faf8f3;
  --bg-ribbon: #f4f1ea;
  --bg-btn: #faf8f3;
  --bg-btn-hover: #e5e0d3;
  --bg-header: #ece8de;
  --border: #aba495;
  --text-main: #181a1f;
  --text-muted: #4b5262;
  --accent: #1d4ed8;
}
html.theme-vatman body,
html.theme-vatman .canvas-container {
  background: #faf8f3 !important;
  color: #181a1f !important;
}
html.theme-vatman #wcHeader {
  background: #faf8f3 !important;
  border-bottom: 1px solid #aba495 !important;
}
html.theme-vatman #wcHeader .wc-brand-link {
  color: #181a1f !important;
}
html.theme-vatman #wcHeader .wc-brand-ico {
  background: #1d4ed8 !important;
}
html.theme-vatman #wcHeader .wc-center-ctx {
  background: #f4f1ea !important;
  border-color: #aba495 !important;
}
html.theme-vatman #wcHeader .wc-nav-link {
  color: #4b5262 !important;
}
html.theme-vatman #wcHeader .wc-nav-link:hover {
  background: #ece8de !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman #wcHeader .wc-nav-link.active {
  background: rgba(29, 78, 216, 0.12) !important;
  border-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
}
html.theme-vatman #wcHeader .wc-title,
html.theme-vatman #wcHeader .wc-title #activeProjectFileBadge {
  color: #181a1f !important;
}
html.theme-vatman #wcHeader .wc-title:hover {
  background: #e5e0d3 !important;
  border-color: #968f7f !important;
}
html.theme-vatman #wcHeader .wc-btn {
  background: #faf8f3 !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman #wcHeader .wc-btn:hover {
  background: #e5e0d3 !important;
  border-color: #1d4ed8 !important;
}
html.theme-vatman #wcHeader .wc-btn.primary {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}
html.theme-vatman .topbar,
html.theme-vatman .ribbon-bar {
  background: #f4f1ea !important;
  border-bottom: 1px solid #aba495 !important;
}
html.theme-vatman .tb-group {
  background: #faf8f3 !important;
  border-color: #c2bba8 !important;
}
html.theme-vatman .tb-btn,
html.theme-vatman .tb-select {
  background: #faf8f3 !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .tb-btn:hover,
html.theme-vatman .tb-select:hover {
  background: #e5e0d3 !important;
  border-color: #1d4ed8 !important;
  color: #181a1f !important;
}
html.theme-vatman .tb-btn.active {
  background: #dbeafe !important;
  border-color: #1d4ed8 !important;
  color: #1e3a8a !important;
}
html.theme-vatman .wc-title-menu,
html.theme-vatman .wc-dd-menu,
html.theme-vatman .wc-weld-menu,
html.theme-vatman .ws-popup-menu,
html.theme-vatman .ctx-menu,
html.theme-vatman .quick-edit-modal,
html.theme-vatman .modal-card {
  background: #faf8f3 !important;
  border-color: #968f7f !important;
  color: #181a1f !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
}
html.theme-vatman .wc-dd-header,
html.theme-vatman .ws-popup-header,
html.theme-vatman .prop-group-header,
html.theme-vatman .quick-edit-header {
  color: #1d4ed8 !important;
  border-bottom-color: #c2bba8 !important;
}
html.theme-vatman .wc-tab-item,
html.theme-vatman .wc-dd-item,
html.theme-vatman .wc-weld-item,
html.theme-vatman .ws-popup-item,
html.theme-vatman .ctx-item {
  color: #181a1f !important;
}
html.theme-vatman .wc-tab-item:hover,
html.theme-vatman .wc-dd-item:hover,
html.theme-vatman .wc-weld-item:hover,
html.theme-vatman .ws-popup-item:hover,
html.theme-vatman .ctx-item:hover {
  background: #e5e0d3 !important;
  border-color: #aba495 !important;
  color: #1d4ed8 !important;
}
html.theme-vatman .wc-tab-item.active,
html.theme-vatman .wc-weld-item.active,
html.theme-vatman .ws-popup-item.active {
  background: #dbeafe !important;
  border-color: #1d4ed8 !important;
  color: #1e3a8a !important;
}
html.theme-vatman .wc-dd-item .wc-ext {
  background: #ece8de !important;
  border-color: #aba495 !important;
  color: #1d4ed8 !important;
}
html.theme-vatman .layer-item {
  background: #f4f1ea !important;
  border-color: #c2bba8 !important;
  color: #181a1f !important;
}
html.theme-vatman .rightbar,
html.theme-vatman .wc-leftbar {
  background: #faf8f3 !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .panel-header {
  background: #ece8de !important;
  border-bottom-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .rightbar select,
html.theme-vatman .rightbar input,
html.theme-vatman .rightbar textarea,
html.theme-vatman .prop-select,
html.theme-vatman .prop-input,
html.theme-vatman .props-box div[style*="background"] {
  background: #f4f1ea !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .wc-ai-section,
html.theme-vatman .wc-ai-chat-log,
html.theme-vatman .wc-ai-input,
html.theme-vatman .wc-ai-btn,
html.theme-vatman .wc-ai-zone-status {
  background: #f4f1ea !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .wc-ai-btn:hover {
  background: #e5e0d3 !important;
  border-color: #1d4ed8 !important;
}
html.theme-vatman .floating-cmd-bar {
  background: rgba(250, 248, 243, 0.96) !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
}
html.theme-vatman .cmd-prompt {
  color: #1d4ed8 !important;
}
html.theme-vatman #cmdInput {
  color: #181a1f !important;
}
html.theme-vatman .dyn-input-box {
  background: rgba(250, 248, 243, 0.96) !important;
  border-color: #1d4ed8 !important;
  color: #181a1f !important;
}
html.theme-vatman .dyn-field {
  background: #f4f1ea !important;
  border-color: #aba495 !important;
  color: #181a1f !important;
}
html.theme-vatman .bottombar {
  background: #e5e0d3 !important;
  border-top: 1px solid #968f7f !important;
  color: #181a1f !important;
}
html.theme-vatman .wc-bottom-auth-link,
html.theme-vatman .toggle-pill,
html.theme-vatman .wc-bottom-scale,
html.theme-vatman .ws-switcher-btn {
  background: #faf8f3 !important;
  border-color: #968f7f !important;
  color: #181a1f !important;
}
html.theme-vatman .toggle-pill.on,
html.theme-vatman .toggle-pill.active {
  background: #dbeafe !important;
  border-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
}
html.theme-vatman .prop-val[style*="#ffffff"],
html.theme-vatman .prop-val[style*="#FFFFFF"],
html.theme-vatman .prop-val[style*="255, 255, 255"],
html.theme-vatman .prop-val[style*="#f8fafc"],
html.theme-vatman .prop-val[style*="#e2e8f0"] {
  color: #181a1f !important;
  font-weight: 600;
}
html.theme-vatman #layerColorPreview {
  border: 1px solid #6b665c !important;
}
@media (max-width: 1120px) {
  #wcHeader .wc-nav { display: none; }
}

