/* ============================================================
   Arktropix — Constructor Theme (v1)
   Рестайл конструктора под платформу («3D-Showroom / Blueprint»):
   Unbounded для заголовков, JetBrains Mono для значений/размеров,
   pill-кнопки, чертёжные уголки, зерно. ТОЛЬКО CSS-слой —
   логика, id и классы конструктора не тронуты.
   Подключается ПОСЛЕ inline-стилей constructor.html.
   ============================================================ */
:root {
  --ax-display: 'Unbounded Local', 'Unbounded', 'Segoe UI', 'Arial Black', sans-serif;
  --ax-mono: 'JetBrains Mono Local', 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;
  --ax-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* зерно поверх сцены — фирменная текстура платформы */
.ax-grain { position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"); }

/* ============ ШАПКА ============ */
.brand span {
  font-family: var(--ax-display); font-weight: 700; font-size: 16px; letter-spacing: 0.06em;
}
.brand span em { font-style: normal; color: var(--ice); }
.ax-logo-dot { display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%;
  background: var(--ice); box-shadow: 0 0 10px var(--ice); animation: axPulse 2.6s ease-in-out infinite;
  vertical-align: middle; }
@keyframes axPulse { 0%,100%{opacity:.5} 50%{opacity:1} }
.topbar-title { font-family: var(--ax-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }

/* pill-кнопки как на платформе */
.tb-btn { border-radius: 999px; padding: 0 16px; transition: background .15s, border-color .15s, transform .2s var(--ax-ease), filter .2s; }
.tb-btn:hover { transform: translateY(-1px); }
.tb-btn.primary { border: 0; box-shadow: 0 8px 22px rgba(46,111,242,0.4); }
.tb-btn.primary:hover { filter: brightness(1.12); }
.tb-menu { border-radius: 14px; }
.tb-menu button { border-radius: 10px; }

/* ============ СЦЕНА: hint в моно ============ */
.viewport-hint { font-family: var(--ax-mono); font-size: 10.5px; letter-spacing: 0.06em;
  border-color: rgba(111,170,255,0.28); border-radius: 999px; }
.viewport-hint b { color: var(--ice); }

/* ============ ПАНЕЛИ ============ */
.panel { border-radius: 18px; border-color: rgba(111,170,255,0.16); }
.panel-head h2, .tpl-head h2, .confirm-modal h3 {
  font-family: var(--ax-display); font-weight: 700; letter-spacing: 0.1em;
}
.panel-head h2 { font-size: 11.5px; }
.tpl-head h2 { font-size: 16px; letter-spacing: 0.02em; }
.confirm-modal h3 { font-size: 14.5px; letter-spacing: 0.02em; }
.group-title { font-family: var(--ax-mono); font-size: 10px; letter-spacing: 0.2em; }

/* значения/размеры/единицы — моно, как на платформе */
.num-box { font-family: var(--ax-mono); font-size: 12.5px; border-radius: 10px; }
.unit, .dims-readout, .tpl-badge, .proj-row .current-tag, .sel-bar #selName {
  font-family: var(--ax-mono); }
.dims-readout { font-size: 11.5px; border-radius: 12px; }
.dims-readout b { font-weight: 700; }

/* сегменты и свотчи */
.seg button { border-radius: 999px; font-weight: 700; }
.seg button.active { box-shadow: 0 4px 14px rgba(46,111,242,0.35); }
.swatch { border-radius: 10px; }
.appliance-item { border-radius: 10px; }
.appliance-item > span { min-width:0; display:flex; flex-direction:column; gap:2px; }
.appliance-item > span b { overflow:hidden; color:var(--text); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.appliance-item > span small { color:#77879a; font:500 8px var(--ax-mono); }
.appliance-focus {
  width:25px; height:25px; display:grid; place-items:center; flex:0 0 auto;
  color:#7eb7ff; background:#17202c; border:1px solid #35475d; border-radius:4px; cursor:pointer;
}
.appliance-focus:hover { color:#fff; border-color:#5ca3ff; }
.appliance-spawn-hint {
  display:flex; align-items:flex-start; gap:8px; margin:2px 16px 9px; padding:8px 9px;
  color:#8291a4; background:rgba(61,139,246,.07); border:1px dashed rgba(86,155,250,.34);
  border-radius:5px; font:500 8.5px/1.45 var(--ax-mono);
}
.appliance-spawn-hint i { color:#72afff; }
.appliance-spawn-notice {
  position:absolute; top:76px; left:50%; z-index:19; min-width:360px;
  display:flex; align-items:center; gap:10px; padding:10px 13px;
  color:#eef5ff; background:rgba(15,21,29,.96); border:1px solid rgba(78,156,255,.58);
  border-radius:6px; box-shadow:0 12px 32px rgba(0,0,0,.42),inset 3px 0 0 #4b99ff;
  opacity:0; pointer-events:none; transform:translate(-50%,-8px); transition:.18s opacity,.18s transform;
}
.appliance-spawn-notice.show { opacity:1; transform:translate(-50%,0); }
.appliance-spawn-notice > i { color:#6faeff; font-size:18px; }
.appliance-spawn-notice > span { display:flex; flex-direction:column; gap:3px; }
.appliance-spawn-notice b { font-size:11px; }
.appliance-spawn-notice small { color:#8695a8; font:500 8.5px var(--ax-mono); }

/* тулбар и режимы */
.toolbar, .mode-box { border-radius: 16px; border-color: rgba(111,170,255,0.16); }
.tool { border-radius: 12px; }
.mode-btn { border-radius: 999px; }

/* модалки */
.tpl-modal { border-radius: 20px; border-color: rgba(111,170,255,0.3); }
.tpl-card { border-radius: 14px; transition: transform .25s var(--ax-ease), border-color .2s, box-shadow .25s; }
.tpl-card:hover { transform: translateY(-5px); }
.tpl-close { border-radius: 999px; }
.confirm-modal { border-radius: 20px; border-color: rgba(111,170,255,0.3); }
.confirm-icon { border-radius: 14px; }
.type-pick-btn, .source-row { border-radius: 12px; }
.toast { border-radius: 999px; border-color: rgba(111,170,255,0.4); font-family: var(--ax-mono); font-size: 12px; }

/* аутлайнер */
.proj-row.active { border-radius: 10px; }
.obj-row.selected { border-radius: 10px; }

/* доступность / reduced motion */
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .ax-logo-dot { animation: none; }
  .tb-btn, .tpl-card { transition: none; }
}

/* Final UE-style shell overrides. Kept here because this stylesheet loads
   after the constructor's inline component styles. */
.topbar .tb-btn,
.wall-direction-footer .tb-btn { border-radius: 6px; }

.cabinet-wizard-overlay { z-index:90; }
.cabinet-wizard { width:min(760px,calc(100vw - 32px)); max-width:none; text-align:left; }
.cabinet-wizard-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.cabinet-wizard-head h3 { margin:3px 0 0; }
.cabinet-wizard-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0; }
.cabinet-wizard-grid label,.furn-field { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:10px; letter-spacing:.04em; }
.cabinet-wizard-grid input,.cabinet-wizard-grid select,.furn-field input,.furn-field select,.furn-name {
  width:100%; min-height:36px; padding:7px 9px; color:var(--text); background:#10151c;
  border:1px solid var(--line-strong); border-radius:6px; font:600 12px var(--ax-mono);
}
.cabinet-material { grid-column:span 2; }
.furn-card { appearance:none; color:inherit; text-align:left; }
.furn-card-icon { min-height:94px; display:grid; place-items:center; color:#78b8ff; background:linear-gradient(145deg,#152134,#0d131d); font-size:36px; }
.material-card { appearance:none; color:inherit; text-align:left; }
.material-preview { display:block; height:92px; margin:7px; border:1px solid rgba(255,255,255,.12); border-radius:5px; box-shadow:inset 0 0 24px rgba(255,255,255,.08); }
.furniture-properties .furn-field-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:10px 0; }
.furniture-properties .furn-material { margin:10px 0; }
.furn-name { margin:8px 0; font-family:var(--font); }
.part-meta-row { display:grid; grid-template-columns:1fr 42px; gap:7px; }
.part-meta-row [type="color"] { width:42px; min-height:36px; margin:8px 0; padding:3px; border:1px solid var(--line-strong); border-radius:6px; background:#10151c; }
.furn-prop-actions { display:flex; gap:7px; }
.furn-prop-actions .tb-btn { flex:1; justify-content:center; }
.furn-wide { width:100%; justify-content:center; margin-top:10px; }
.edge-banding-editor { margin:10px 0; padding:9px; border:1px solid var(--line); border-radius:7px; color:var(--muted); font-size:10px; }
.edge-band-list { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; margin-top:7px; }
.edge-band-list label { display:flex; align-items:center; gap:6px; text-transform:capitalize; color:var(--text); }
.edge-band-list input { accent-color:#68a8ff; }
.furniture-summary { display:flex; align-items:baseline; gap:8px; padding:12px; color:var(--muted); background:rgba(0,0,0,.15); border:1px solid var(--line); border-radius:7px; }
.furniture-summary b { color:var(--ice); font:700 22px var(--ax-mono); }
.furn-context { position:fixed; z-index:130; display:none; min-width:190px; padding:5px; background:#171c24; border:1px solid #394352; border-radius:8px; box-shadow:0 16px 40px rgba(0,0,0,.45); }
.furn-context.show { display:block; }
.furn-context button { width:100%; display:flex; gap:9px; align-items:center; padding:8px 10px; color:var(--text); background:transparent; border:0; border-radius:5px; text-align:left; }
.furn-context button:hover { background:#263246; }
.furn-context button.danger { color:#ff8585; }
@media(max-width:700px){.cabinet-wizard-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.furniture-properties .furn-field-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
.panel { border-radius: 4px; }
.toolbar { border-radius: 5px; }
.tpl-modal { border-radius: 0; border-color: #414750; }
.tpl-card { border-radius: 5px; }
.tpl-close { border-radius: 5px; }

/* ============================================================
   Contextual furniture CAD editor
   Room -> Furniture Blueprint -> Part
   ============================================================ */
.cad-mode-switcher {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 3px;
  background: #15191f;
  border: 1px solid #343b46;
  border-radius: 6px;
}
.cad-mode-switcher button {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #8793a3;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: 700 10px var(--ax-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.cad-mode-switcher button i { color: #6f7d90; font-size: 12px; }
.cad-mode-switcher button:hover:not(:disabled) { color: #eaf2ff; background: #242b35; }
.cad-mode-switcher button.active {
  color: #fff;
  background: #2e73df;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.cad-mode-switcher button.active i { color: #fff; }
.cad-mode-switcher button:disabled { opacity: .28; cursor: not-allowed; }
.cad-mode-sep { color: #4c5665; font-size: 9px; }

.cad-context-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 18;
  min-width: 390px;
  height: 48px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  transform: translateX(-50%);
  color: #f3f7ff;
  background: rgba(17,22,30,.96);
  border: 1px solid rgba(77,153,255,.52);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(0,0,0,.38), inset 3px 0 0 #3989ff;
  backdrop-filter: blur(14px);
}
body.cad-context-active .cad-context-banner { display: flex; }
.cad-context-back {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #9fc8ff;
  background: #202a37;
  border: 1px solid #3a4b61;
  border-radius: 5px;
  cursor: pointer;
}
.cad-context-back:hover { color: #fff; border-color: #5ca2ff; }
.cad-context-banner > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cad-context-banner small {
  color: #71adff;
  font: 700 9px var(--ax-mono);
  letter-spacing: .16em;
}
.cad-context-banner strong {
  max-width: 390px;
  overflow: hidden;
  color: #f5f8fc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cad-context-help {
  margin-left: auto;
  color: #8491a2;
  font: 500 9px var(--ax-mono);
  white-space: nowrap;
}

body.cad-context-active .panel {
  width: 360px;
  background: rgba(18,22,28,.98);
  border-color: #46515f;
}
body.cad-context-active #outlinerSection { max-height: 43%; }
body.cad-context-active #propertiesBody > :not(#cadInspector) { display: none !important; }
body:not(.cad-context-active) #cadInspector { display: none; }
body.cad-context-active #cadInspector { display: block; }
body.cad-context-active .templates-launch { opacity: .48; }
body.cad-context-active .toolbar-wrap { left: 12px; }
body.cad-context-active .viewport-hint { top: 76px; }
body.cad-part-mode .cad-context-banner { border-color: rgba(93,216,161,.56); box-shadow: 0 12px 28px rgba(0,0,0,.38), inset 3px 0 0 #43c889; }
body.cad-part-mode .cad-context-banner small { color: #67dba5; }

.outliner-mode-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  color: #98a6b8;
  background: #151a21;
  border: 1px solid #3b4655;
  border-radius: 3px;
  font: 700 8px var(--ax-mono);
  letter-spacing: .12em;
}
body.cad-context-active .outliner-mode-badge {
  color: #aad0ff;
  background: rgba(49,126,236,.12);
  border-color: rgba(77,153,255,.45);
}

.cad-outliner-path {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 1px 2px 6px;
  padding: 0 7px;
  color: #8895a6;
  background: #11161c;
  border: 1px solid #303944;
  border-radius: 4px;
  font: 600 9px var(--ax-mono);
}
.cad-outliner-path button {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: #7eb4f8;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.cad-outliner-path button:hover { color: #fff; background: #273444; }
.cad-outliner-path > i { color: #596779; font-size: 8px; }
.cad-outliner-path span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cad-tree-root {
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr 28px;
  align-items: center;
  gap: 8px;
  margin: 0 2px 6px;
  padding: 7px 7px;
  color: #e6edf6;
  background: #202731;
  border: 1px solid #3e4b5b;
  border-radius: 5px;
  cursor: pointer;
}
.cad-tree-root.selected { border-color: #4b99ff; box-shadow: inset 3px 0 0 #3e8df5; }
.cad-tree-root > i { color: #66a8ff; font-size: 16px; text-align: center; }
.cad-tree-root > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cad-tree-root b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cad-tree-root small { color: #7f8d9f; font: 500 8.5px var(--ax-mono); }
.cad-tree-root button {
  width: 27px;
  height: 27px;
  color: #9cbce3;
  background: #171c23;
  border: 1px solid #384453;
  border-radius: 4px;
  cursor: pointer;
}
.cad-tree-root button:hover { color: #fff; border-color: #4b99ff; }

.cad-tree-group {
  width: calc(100% - 4px);
  height: 29px;
  display: grid;
  grid-template-columns: 13px 18px 1fr auto;
  align-items: center;
  gap: 5px;
  margin: 2px;
  padding: 0 7px;
  color: #b7c1ce;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: 700 10px var(--font);
  text-align: left;
  cursor: pointer;
}
.cad-tree-group:hover { color: #fff; background: #222a34; }
.cad-tree-group > i:first-child { color: #738195; font-size: 8px; transition: transform .12s; }
.cad-tree-group.collapsed > i:first-child { transform: rotate(-90deg); }
.cad-tree-group > i:nth-child(2) { color: #6faaff; font-size: 12px; }
.cad-tree-group em {
  min-width: 18px;
  padding: 2px 5px;
  color: #8290a1;
  background: #11161c;
  border-radius: 8px;
  font: normal 700 8px var(--ax-mono);
  text-align: center;
}
.cad-tree-children {
  position: relative;
  margin: 0 2px 3px 18px;
  padding-left: 11px;
  border-left: 1px solid #394350;
}
.cad-tree-part {
  min-height: 28px;
  display: grid;
  grid-template-columns: 18px 1fr auto 24px;
  align-items: center;
  gap: 5px;
  padding: 3px 3px 3px 6px;
  color: #99a6b5;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10.5px;
  cursor: pointer;
}
.cad-tree-part:hover { color: #eef5ff; background: #202832; }
.cad-tree-part.selected {
  color: #fff;
  background: rgba(51,132,244,.18);
  border-color: rgba(80,158,255,.58);
  box-shadow: inset 2px 0 0 #4b9cff;
}
.cad-tree-part > i { color: #6e9fdc; text-align: center; }
.cad-tree-part > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cad-tree-part > small { color: #67a9ff; font: 700 8px var(--ax-mono); }
.cad-tree-part > button {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #6f7c8c;
  background: transparent;
  border: 0;
  border-radius: 3px;
  opacity: 0;
  cursor: pointer;
}
.cad-tree-part:hover > button,.cad-tree-part.hidden > button { opacity: 1; }
.cad-tree-part.locked { opacity: .55; }
.cad-tree-part.hidden { opacity: .46; }
.cad-tree-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 3px 2px;
  padding: 8px;
  color: #6f7d8f;
  background: #11161c;
  border: 1px solid #303843;
  border-radius: 4px;
  font: 500 8.5px/1.4 var(--ax-mono);
}
.cad-tree-footer b { color: #72b0ff; }

.room-furniture-row { grid-template-columns: 14px minmax(0,1fr) auto auto; }
.room-object-tag {
  padding: 2px 5px;
  color: #778598;
  background: #11161c;
  border: 1px solid #303945;
  border-radius: 3px;
  font: 700 7.5px var(--ax-mono);
  letter-spacing: .08em;
}
.room-context-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 6px 4px 3px 18px;
  padding: 8px;
  color: #758396;
  background: rgba(57,133,238,.06);
  border: 1px dashed rgba(91,156,245,.3);
  border-radius: 4px;
  font: 500 8.5px/1.45 var(--ax-mono);
}
.room-context-hint i { color: #6eaaff; }
.room-object-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 9px 12px 0;
  padding: 10px;
  background: #171d24;
  border: 1px solid #36414e;
  border-radius: 5px;
}
.room-object-card > i { color: #70abf8; font-size: 18px; text-align: center; }
.room-object-card > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.room-object-card b { overflow: hidden; color: #e9eef5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.room-object-card small { color: #778496; font: 500 8.5px var(--ax-mono); }
.room-object-card em {
  padding: 3px 5px;
  color: #91a0b2;
  background: #10151b;
  border-radius: 3px;
  font: normal 700 7.5px var(--ax-mono);
}
.room-object-inspector .furn-wide { width: calc(100% - 24px); margin: 2px 12px 0; border-radius: 5px; justify-content: center; }
.room-inspector-note {
  margin: 9px 12px 12px;
  color: #778496;
  font: 500 8.5px/1.5 var(--ax-mono);
}
.room-placement-fields { padding-bottom: 8px; }

.cad-inspector { padding-bottom: 16px; }
.cad-inspector-section {
  border-bottom: 1px solid #303741;
}
.cad-inspector-section > header {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: #1d2229;
  border-bottom: 1px solid #2c333c;
}
.cad-inspector-section > header > i {
  width: 23px;
  color: #73aeff;
  font-size: 13px;
  text-align: center;
}
.cad-inspector-section > header > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cad-inspector-section > header strong {
  color: #eaf0f8;
  font: 700 10px var(--ax-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.cad-inspector-section > header small {
  overflow: hidden;
  color: #788699;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Design checks shown inline in the Pro inspector. The severity has to
   be readable without colour alone, so each level also carries a rule. */
.cad-issue {
  margin: 6px 10px 0;
  padding: 6px 9px;
  border-left: 3px solid #4b5768;
  border-radius: 0 5px 5px 0;
  background: rgba(255, 255, 255, .03);
  color: #b8c4d4;
  font-size: 11px;
  line-height: 1.45;
}
.cad-issue:last-child { margin-bottom: 8px; }
.cad-issue-error { border-left-color: #ff7a6b; color: #ffd4ce; }
.cad-issue-warning { border-left-color: #f2b544; color: #f6e2bd; }
.cad-issue-info { border-left-color: #4c93ff; }
.cad-field-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}
.cad-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #8491a2;
  font: 600 9px var(--ax-mono);
}
.cad-field.wide { grid-column: 1 / -1; }
.cad-field-control {
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  color: #758397;
  background: #11161c;
  border: 1px solid #38414d;
  border-radius: 4px;
  overflow: hidden;
}
.cad-field-control:focus-within { border-color: #4b99ff; box-shadow: 0 0 0 2px rgba(69,145,246,.12); }
.cad-field input,.cad-field select {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  color: #e4eaf2;
  background: transparent;
  border: 0;
  outline: 0;
  font: 600 10px var(--ax-mono);
}
.cad-field select { color-scheme: dark; }
.cad-field input[type="color"] { padding: 4px; cursor: pointer; }
.cad-field input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-left: 8px;
  accent-color: #438cef;
}
.cad-field input:disabled { color: #768294; }
.cad-field-control em {
  padding-right: 8px;
  color: #69778a;
  font: normal 600 8px var(--ax-mono);
}
.cad-edge-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 6px;
  padding: 11px 12px 13px;
}
.cad-edge-grid label {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  color: #9ca8b7;
  background: #11161c;
  border: 1px solid #343d48;
  border-radius: 4px;
  font: 600 8.5px var(--ax-mono);
  text-transform: capitalize;
}
.cad-edge-grid input { accent-color: #4a99ff; }
.cad-attachment-card {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 12px;
  padding: 9px;
  color: #dce7f5;
  background: rgba(53,133,239,.08);
  border: 1px solid rgba(82,157,255,.35);
  border-radius: 4px;
}
.cad-attachment-card > i { color: #72afff; font-size: 15px; text-align: center; }
.cad-attachment-card > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cad-attachment-card b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cad-attachment-card small { color: #7f8da0; font: 500 8px/1.4 var(--ax-mono); }
.cad-attachment-card button {
  height: 25px;
  padding: 0 7px;
  color: #9fc7ff;
  background: #172131;
  border: 1px solid #3f6594;
  border-radius: 3px;
  font: 700 8px var(--ax-mono);
  cursor: pointer;
}
.cad-attachment-card button:hover { color: #fff; border-color: #65a7ff; }
.cad-inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.cad-inspector-actions .tb-btn {
  min-width: 0;
  justify-content: center;
  border-radius: 5px;
  font-size: 10px;
}

@media (max-width: 1120px) {
  .cad-mode-switcher button span { display: none; }
  .cad-mode-switcher button { padding: 0 9px; }
  .cad-mode-sep { display: none; }
  .cad-context-banner { min-width: 330px; }
  .cad-context-help { display: none; }
}
@media (max-width: 860px) {
  .cad-mode-switcher { order: 2; }
  body.cad-context-active .panel { width: auto; }
}
