/* SMARTARCH_V494_INTERSECTION_DUPLICATE_WALL_FIX_DXF: CSS unchanged; DXF-only duplicate wall intersections fixed. */
/* SMARTARCH_V487_DXF_MISSING_HELPERS_HOTFIX_CSS_CACHE: template cache marker only; UI behavior unchanged. */
/* SMARTARCH_V484_MULTI_FLOOR_RED_REFERENCE_STACK: one red movable REF handle per floor; 3D stack aligns floors by these handles. */
/* SMARTARCH_V483_PLAN_RED_REFERENCE_HANDLE: plan canvas red draggable reference handle is drawn by JS; CSS only cache marker. */
/* SMARTARCH_V480_UI_GROUP_ORDER: section toolbar above parameters; parameters near live scene tabs; void box room types. */
/* SMARTARCH V4.57 EXACT MIRROR CONTROLS / CANONICAL GEOMETRY EXPORT / CLEAN HTML REVISION */
/* SMARTARCH SPATIAL V4.47 HARD DRAG NO OVERLAP SHARED EDGE POLYGON UNION */
/* SMARTARCH SPATIAL V4.44 TOPOLOGICAL CORRIDOR SPINE / UNIFIED WALL PLAN SOLVER */
/* V4.43 route-relation coupled real plan solver revision */
/* SMARTARCH V4.42 REAL PLAN SYNTHESIS SOLVER - GRAPH TO ARCHITECTURAL PLAN */
/* V4.39 right-side plan controls, active floor selection and clean labels revision */
/* SMARTARCH V4.13 FINAL ROOF DARK LIVE SCENE BUTTON PERFORMANCE CLEAN */
:root{--sa-bg:#07111f;--sa-card:#0c1828;--sa-card2:#081321;--sa-input:#06101c;--sa-text:#dce8ff;--sa-strong:#f3f7ff;--sa-muted:#aebdd2;--sa-line:#263f5e;--sa-line2:#365a82;--sa-gold:#ffd447;--sa-gold2:#f0b82f;--sa-blue:#7aa7ff;--sa-red:#ff5361;--sa-grid:rgba(86,126,170,.16);--sa-shadow:0 18px 42px rgba(0,0,0,.34);--sa-radius:16px}*{box-sizing:border-box}html,body{background:var(--sa-bg)!important;color:var(--sa-text)!important}.smartarch-spatial-page{padding:10px 0 64px;background:radial-gradient(circle at 18% -10%,rgba(66,107,154,.22),transparent 34%),linear-gradient(180deg,#07111f 0%,#091625 55%,#07111f 100%)}.sc-app{width:100%;max-width:calc(100vw - 2px);margin:0;font-family:Segoe UI,Arial,sans-serif;color:var(--sa-text)}.sc-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:end;background:linear-gradient(135deg,#0e1b2d 0%,#081322 100%);border:1px solid var(--sa-line);border-radius:0 0 var(--sa-radius) var(--sa-radius);padding:28px 16px 18px;margin:0 0 12px;box-shadow:var(--sa-shadow);position:relative;overflow:hidden}.sc-header:before{content:"SPATIAL COMPOSITION";position:absolute;top:14px;left:16px;font-size:9px;letter-spacing:.24em;text-transform:uppercase;font-weight:900;color:var(--sa-gold)}.sc-header:after{content:"";position:absolute;right:-80px;bottom:-120px;width:280px;height:280px;background:radial-gradient(circle,rgba(255,83,97,.13),rgba(255,212,71,.08) 38%,transparent 70%);pointer-events:none}.sc-brand{display:flex;align-items:center;gap:14px;padding-top:2px;min-width:0;position:relative;z-index:1}.sc-icon{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 7px 14px rgba(255,212,71,.22))}.sc-header h1{margin:0;font-size:clamp(29px,2.7vw,42px);line-height:1.08;font-weight:900;color:var(--sa-strong);letter-spacing:-.03em;text-shadow:0 2px 0 rgba(0,0,0,.16)}.sc-header p{margin:8px 0 0;color:var(--sa-muted);font-size:14px;max-width:980px}.sc-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;align-items:center;position:relative;z-index:12}button,.sc-actions button,.sc-toolbar button,#deleteSelected,#clearAll{appearance:none;border:1px solid var(--sa-line2);background:linear-gradient(180deg,#112139,#071321);color:var(--sa-strong);border-radius:11px;padding:9px 13px;min-height:36px;font-weight:850;cursor:pointer;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 9px 18px rgba(0,0,0,.18);transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}button:hover,.sc-actions button:hover,.sc-toolbar button:hover,#deleteSelected:hover,#clearAll:hover{transform:translateY(-1px);border-color:#6f91bd;box-shadow:0 1px 0 rgba(255,255,255,.07) inset,0 12px 24px rgba(0,0,0,.26)}button:active{transform:translateY(0)}.sc-actions button.primary,#btnReport{background:linear-gradient(135deg,var(--sa-gold),var(--sa-gold2));border-color:#e0aa25;color:#111827;box-shadow:0 10px 24px rgba(255,212,71,.20)}#btnCombinedDxf{background:linear-gradient(180deg,#173357,#0a1627);color:#fff;border-color:#426b9a}.sc-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:linear-gradient(180deg,#0d1929,#081321);border:1px solid var(--sa-line);border-radius:var(--sa-radius);padding:52px 12px 12px;margin:0 10px 12px;box-shadow:0 10px 24px rgba(0,0,0,.25);position:relative}.sc-toolbar:before{content:"Kontrol Grubu";position:absolute;left:14px;top:16px;color:var(--sa-strong);font-size:19px;font-weight:900;letter-spacing:-.01em}.sc-toolbar.sc-section-toolbar:before{content:"Kesit, 3D ve Referans"}.sc-toolbar.sc-parameters-toolbar:before{content:"Parametreler ve Kutu Boşlukları";}.sc-toolbar label{font-size:12px;font-weight:850;color:var(--sa-text);display:flex;align-items:center;gap:6px;min-height:36px;background:#081321;border:1px solid var(--sa-line);border-radius:11px;padding:7px 9px}.sc-toolbar input,.sc-toolbar select,input,select,textarea,.edge-input,.editable-table td[contenteditable="true"]{height:32px;border:1px solid var(--sa-line2);border-radius:10px;padding:4px 9px;background:var(--sa-input);color:var(--sa-text);outline:none;max-width:122px}.sc-toolbar input:focus,.sc-toolbar select:focus,input:focus,select:focus,textarea:focus,.edge-input:focus{border-color:var(--sa-gold);box-shadow:0 0 0 3px rgba(255,212,71,.16)}.sc-toolbar input[type=radio],.sc-toolbar input[type=checkbox]{height:auto;max-width:none;accent-color:var(--sa-gold)}.sc-toolbar input[type=range]{accent-color:var(--sa-gold)}.sc-toolbar option{background:#07111f;color:var(--sa-text)}.divider{width:1px;height:32px;background:var(--sa-line);margin:0 3px}.reference-status,#sectionStatus{font-size:12px;color:var(--sa-muted);background:#07111f;border:1px dashed var(--sa-line2);border-radius:11px;padding:9px 11px}.sc-main{display:grid;grid-template-columns:minmax(0,1fr) clamp(320px,24vw,430px);grid-template-areas:"scene side";gap:12px;min-height:650px;align-items:stretch;margin:0 10px;transition:grid-template-columns .16s ease}.sc-main.side-collapsed{grid-template-columns:minmax(0,1fr) 44px!important}.sc-side{grid-area:side;position:relative;min-width:0;transition:max-width .16s ease,width .16s ease}.sc-left{grid-area:scene;min-width:0;width:100%}.sc-left,.sc-side,.force-strip{background:linear-gradient(180deg,#0c1828,#07111f);border:1px solid var(--sa-line);border-radius:var(--sa-radius);box-shadow:var(--sa-shadow);overflow:hidden}.sc-left:before{content:"Live Architectural Spatial Scene";display:block;padding:16px 18px 0;font-size:19px;font-weight:900;color:var(--sa-strong)}.sc-left:after{content:"Drag: move/rotate | Wheel: zoom | Tabs: graph, plan, 3D, section";display:block;padding:2px 18px 10px;color:var(--sa-muted);font-size:12px;border-bottom:1px solid var(--sa-line)}.sc-tabs,.side-tabs{display:flex;background:#081321;border-bottom:1px solid var(--sa-line);gap:4px;padding:7px 10px 0}.tab,.side-tab{border:0;background:transparent;color:var(--sa-muted);padding:11px 13px;border-radius:11px 11px 0 0;font-weight:900;cursor:pointer;box-shadow:none;min-height:auto}.tab:hover,.side-tab:hover{transform:none;box-shadow:none;background:#10243d;color:var(--sa-strong)}.tab.active,.side-tab.active{background:#0c1828;color:var(--sa-strong);border-bottom:3px solid var(--sa-gold)}.pane{display:none;position:relative;height:clamp(620px,68vh,900px);background:linear-gradient(180deg,#10243d 0%,#07111f 100%)}.pane.active{display:block}.graph-svg{width:100%;height:100%;display:block;cursor:crosshair;background-color:#07111f!important;background-image:linear-gradient(var(--sa-grid) 1px,transparent 1px),linear-gradient(90deg,var(--sa-grid) 1px,transparent 1px)!important;background-size:56px 56px!important}.pane canvas{width:100%;height:100%;display:block;background:linear-gradient(180deg,#10243d 0%,#07111f 100%)!important}.plan-scroll{width:100%;height:100%;overflow:auto;background:linear-gradient(180deg,#10243d 0%,#07111f 100%)}.hint,.view-hint,.section-caption{position:absolute;background:rgba(7,17,31,.92);border:1px solid var(--sa-line2);color:var(--sa-muted);border-radius:999px;padding:8px 11px;font-size:11px;box-shadow:0 10px 22px rgba(0,0,0,.28)}.hint{left:14px;bottom:14px;max-width:min(720px,calc(100% - 28px))}.view-hint{right:14px;bottom:14px;max-width:min(580px,calc(100% - 28px))}.section-caption{left:14px;bottom:14px;max-width:min(660px,calc(100% - 28px))}.side-tabs{padding-top:12px}.side-pane{display:none;height:clamp(620px,68vh,900px);overflow:auto;padding:12px;background:#07111f;color:var(--sa-text)}.side-pane.active{display:block}.sc-side:before{content:"Report and Analysis Summary";display:block;padding:16px 52px 2px 16px;font-size:19px;font-weight:900;color:var(--sa-strong)}.sc-side:after{content:"Node list, score, regulations and composition notes";display:block;padding:0 52px 10px 16px;color:var(--sa-muted);font-size:12px;border-bottom:1px solid var(--sa-line)}.side-collapse-toggle{position:absolute;right:12px;top:14px;z-index:20;width:32px;height:32px;border-radius:999px!important;font-weight:900!important;padding:0!important;background:#10243d!important;color:var(--sa-strong)!important}.sc-side.collapsed{width:44px!important;min-width:44px!important;max-width:44px!important;overflow:hidden!important}.sc-side.collapsed:before,.sc-side.collapsed:after,.sc-side.collapsed .side-tabs,.sc-side.collapsed .side-pane{display:none!important}.sc-side.collapsed .side-collapse-toggle{left:6px;right:auto;top:8px}.editable-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px;border:1px solid var(--sa-line);border-radius:14px;overflow:hidden;color:var(--sa-text)}.editable-table th{position:sticky;top:0;background:#10243d;color:var(--sa-strong);border-bottom:1px solid var(--sa-line);padding:9px 7px;font-weight:900}.editable-table td{border-bottom:1px solid #182d46;padding:7px;text-align:center;background:#081321;color:var(--sa-text)}.editable-table tr.selected td{background:#26220f;color:#fff7cf}.editable-table td[contenteditable="true"]{background:#0b1726;outline:1px solid transparent}.editable-table td[contenteditable="true"]:focus{outline:2px solid var(--sa-gold);border-radius:6px}#deleteSelected,#clearAll{margin:12px 8px 0 0}.analysis-box{font-size:13px;line-height:1.55;white-space:pre-wrap;color:var(--sa-text);background:#07111f}.force-strip{margin:12px 10px 0;padding:14px;display:grid;grid-template-rows:auto auto;grid-auto-flow:column;grid-auto-columns:150px;gap:10px;overflow-x:auto}.force-strip:before{content:"Relation Forces";grid-column:1/-1;color:var(--sa-strong);font-size:18px;font-weight:900;margin-bottom:2px}.force-cell{height:86px;border:1px solid var(--sa-line);border-radius:14px;padding:8px;text-align:center;display:flex;flex-direction:column;justify-content:center;background:#081321;color:var(--sa-text)}.force-cell.positive{background:#0e2a21;color:#8ff2bb;border-color:#1d6a4a}.force-cell.negative{background:#32151d;color:#ff9ca7;border-color:#7c2a37}.force-cell.neutral{background:#10243d;color:#cfdcf0;border-color:#2a486d}.force-cell b{font-size:20px;line-height:1}.force-cell span{font-size:11px;font-weight:900}.force-cell small{font-size:10px;color:var(--sa-muted)}.node-rect{stroke:#6f91bd;stroke-width:2;rx:10;ry:10;filter:drop-shadow(0 6px 8px rgba(0,0,0,.42))}.node-rect.selected{stroke:var(--sa-gold);stroke-width:4}.edge-line{stroke-width:3;filter:drop-shadow(0 1px 2px rgba(0,0,0,.38))}.route-line{stroke:#7aa7ff;stroke-width:3;stroke-dasharray:8 5}.edge-input{width:50px;height:26px;text-align:center;font-weight:900}.node-text{font-size:12px;font-weight:900;pointer-events:none;fill:#fff}.node-sub{font-size:10px;pointer-events:none;fill:#fff}.external .node-rect{stroke-dasharray:6 3}.sc-section-toolbar input[type=number]{max-width:78px}.sc-section-toolbar input[type=range]{max-width:110px}.sc-section-toolbar .active{background:#2a240d!important;border-color:var(--sa-gold)!important;color:var(--sa-strong)!important}#planCanvas.section-draw-mode{cursor:crosshair!important}.sc-header:before,.sc-header:after,.sc-toolbar:before,.sc-left:before,.sc-left:after,.sc-side:before,.sc-side:after{pointer-events:none!important}.sc-actions,.sc-toolbar,.sc-tabs,.side-tabs{position:relative;z-index:12}.sc-app button,.sc-app input,.sc-app select,.sc-app textarea,.sc-app [contenteditable="true"]{pointer-events:auto!important}.sc-app button{touch-action:manipulation}.tab,.side-tab,#btnSynthesize,#btnAnalyze,#btnReport,#btnCombinedDxf,#sectionDrawToggle,#sectionReset,#view3dReset,#setFloorRef,#applyRoomPolygon,#clearRoomPolygon,#mergeAdjacentRooms,#deleteSelected,#clearAll{position:relative;z-index:21}.sc-left,.sc-left .pane,.sc-left canvas,.graph-svg,.plan-scroll{min-width:0}.sc-left{width:100%}.sc-left .pane.active{width:100%}.sc-side.collapsed{flex-basis:44px!important}@media(min-width:1500px){.sc-main{grid-template-columns:minmax(0,1fr) 420px}.sc-main.side-collapsed{grid-template-columns:minmax(0,1fr) 44px!important}.pane,.side-pane{height:clamp(660px,72vh,940px)}}@media(max-width:1180px){.sc-header{grid-template-columns:1fr;align-items:start}.sc-actions{justify-content:flex-start}.sc-main,.sc-main.side-collapsed{grid-template-columns:1fr!important;grid-template-areas:"scene" "side"!important}.pane{height:580px}.side-pane{height:420px}.sc-side.collapsed{width:auto!important;min-width:0!important;max-width:none!important}}@media(max-width:720px){.smartarch-spatial-page{padding:8px 0 42px}.sc-header,.sc-toolbar,.sc-left,.sc-side,.force-strip{border-radius:14px}.sc-header{padding:24px 12px 16px}.sc-header:before{left:12px}.sc-icon{width:42px;height:42px}.sc-actions button,.sc-toolbar button{width:100%;justify-content:center}.sc-toolbar label{width:100%;justify-content:space-between}.sc-toolbar input,.sc-toolbar select{max-width:52%}.divider{display:none}.pane{height:520px}}

/* SMARTARCH V4.37 SPATIAL HELP MODAL */
.smartarch-spatial-help-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid rgba(255, 212, 71, 0.65);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%);
  color: #07111f;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.smartarch-spatial-help-open:hover {
  filter: brightness(1.05);
}

.smartarch-spatial-help-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.smartarch-spatial-help-modal.is-open {
  display: flex;
}

.smartarch-spatial-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(4px);
}

.smartarch-spatial-help-dialog {
  position: relative;
  width: min(920px, 96vw);
  max-height: min(760px, 90vh);
  overflow: hidden;
  border: 1px solid rgba(255, 212, 71, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 212, 71, 0.10), transparent 34%),
    linear-gradient(180deg, #0c1828 0%, #07111f 100%);
  color: #eaf2ff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.smartarch-spatial-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.smartarch-spatial-help-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #ffd447;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.smartarch-spatial-help-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.18;
}

.smartarch-spatial-help-header p {
  margin: 6px 0 0;
  color: #b8c7dd;
  font-size: 14px;
}

.smartarch-spatial-help-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #10243d;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.smartarch-spatial-help-body {
  max-height: 560px;
  overflow: auto;
  padding: 22px 24px;
}

.smartarch-spatial-help-body h3 {
  margin: 20px 0 8px;
  color: #ffd447;
  font-size: 16px;
}

.smartarch-spatial-help-body h3:first-child {
  margin-top: 0;
}

.smartarch-spatial-help-body p {
  margin: 0 0 12px;
  color: #dbe7f8;
  font-size: 14px;
  line-height: 1.72;
}

.smartarch-spatial-help-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.smartarch-spatial-help-ok {
  min-height: 30px;
  padding: 0 16px;
  border: 1px solid rgba(255, 212, 71, 0.65);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%);
  color: #07111f;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.smartarch-help-modal-open {
  overflow: hidden;
}
/* SMARTARCH V4.41 HELP ALERT WINDOW */

.smartarch-spatial-help-open {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 14px auto 0 !important;
  padding: 0 14px;
  border: 1px solid rgba(255, 212, 71, 0.65);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%);
  color: #07111f;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.smartarch-spatial-help-alert {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.smartarch-spatial-help-alert.is-open {
  display: flex !important;
}

.smartarch-spatial-help-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.68);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.smartarch-spatial-help-alert-box {
  position: relative;
  width: min(680px, 94vw);
  max-height: min(660px, 86vh);
  overflow: hidden;
  border: 1px solid rgba(255, 212, 71, 0.55);
  border-radius: 16px;
  background: linear-gradient(180deg, #0c1828 0%, #07111f 100%);
  color: #eaf2ff;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.62);
  padding: 26px 28px 24px;
  text-align: center;
  animation: smartarchHelpAlertIn 160ms ease-out;
}

@keyframes smartarchHelpAlertIn {
  from {
    transform: translateY(8px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.smartarch-spatial-help-alert-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: #10243d;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.smartarch-spatial-help-alert-box h2 {
  margin: 0 auto 8px;
  max-width: 560px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
  text-align: center !important;
}

.smartarch-spatial-help-alert-box h3 {
  margin: 0 auto 20px;
  max-width: 560px;
  color: #ffd447;
  font-size: 17px;
  line-height: 1.3;
  text-align: center !important;
}

.smartarch-spatial-help-alert-scroll {
  max-height: 430px;
  overflow-y: auto;
  padding: 0 6px 0 0;
  text-align: left;
}

.smartarch-spatial-help-alert-scroll h4 {
  margin: 18px 0 8px;
  color: #ffd447;
  font-size: 15px;
  line-height: 1.35;
  text-align: left !important;
}

.smartarch-spatial-help-alert-scroll h4:first-child {
  margin-top: 0;
}

.smartarch-spatial-help-alert-scroll p {
  margin: 0 0 12px;
  color: #dbe7f8;
  font-size: 14px;
  line-height: 1.72;
  text-align: left !important;
}

.smartarch-spatial-help-alert-ok {
  min-height: 30px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid rgba(255, 212, 71, 0.65);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%);
  color: #07111f;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.smartarch-help-modal-open {
  overflow: hidden;
}





/* SMARTARCH V4.50 AUDIT CLEAN HEADER FINAL
   Kesin DOM düzeni:
   1) header.sc-header içinde sadece ikon + başlık + açıklama + Nasıl Kullanılır vardır.
   2) sc-actions header dışında ayrı satırdır.
   3) Başlık hiçbir smartarch-spatial-title-only/header-clean grid çakışmasına girmez.
*/
.smartarch-spatial-page .sc-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  text-align: center !important;
  min-height: 330px !important;
  padding: 30px 28px 26px !important;
  overflow: hidden !important;
}

.smartarch-spatial-page .sc-header .sc-brand {
  width: min(1280px, 96%) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) 76px !important;
  grid-template-areas:
    "icon title spacer"
    "icon desc spacer"
    "icon help spacer" !important;
  column-gap: 18px !important;
  row-gap: 10px !important;
  align-items: center !important;
  justify-items: center !important;
  text-align: center !important;
  min-width: 0 !important;
}

.smartarch-spatial-page .sc-header .sc-icon {
  grid-area: icon !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  justify-self: center !important;
  align-self: center !important;
}

.smartarch-spatial-page .sc-header .sc-brand > div { display: contents !important; }

.smartarch-spatial-page .sc-header h1 {
  grid-area: title !important;
  width: 100% !important;
  max-width: 1160px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: visible !important;
  line-height: 1.08 !important;
}

.smartarch-spatial-page .sc-header p {
  grid-area: desc !important;
  width: 100% !important;
  max-width: 980px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: visible !important;
}

.smartarch-spatial-page .sc-header #smartarchSpatialHelpOpen,
.smartarch-spatial-page .sc-header .smartarch-spatial-help-open {
  grid-area: help !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 30px !important;
  margin: 4px auto 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

/* Header içinde aksiyon kalırsa kesin gizle; V4.50 HTML zaten dışarı taşır. */
.smartarch-spatial-page .sc-header .sc-actions { display: none !important; }

.smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 {
  width: min(1280px, calc(100% - 54px)) !important;
  max-width: 1280px !important;
  margin: 14px auto 18px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  border: 1px solid rgba(74, 130, 190, 0.35) !important;
  border-radius: 14px !important;
  background: rgba(7, 17, 31, 0.64) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.20) !important;
  text-align: center !important;
}

.smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 button,
.smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin: 0 !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

.smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 #smartarchSpatialHelpOpen,
.smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 .smartarch-spatial-help-open {
  display: none !important;
}

.smartarch-spatial-title-only-v445.smartarch-spatial-header-clean-v445 { display: contents !important; }

@media (max-width: 900px) {
  .smartarch-spatial-page .sc-header { min-height: auto !important; }
  .smartarch-spatial-page .sc-header .sc-brand {
    grid-template-columns: 1fr !important;
    grid-template-areas: "icon" "title" "desc" "help" !important;
  }
  .smartarch-spatial-page .sc-actions.smartarch-spatial-actions-outside-v448 { flex-direction: column !important; }
}

/* SMARTARCH V4.50 CACHE AUDIT MARKER: HTML static query updated to v4_50_audit_clean. */


/* SMARTARCH V4.50 SPATIAL HEADER ICON 120PX */
.smartarch-spatial-title-only-v445 {
  grid-template-columns: 136px minmax(0, 1fr) 136px !important;
}

.smartarch-spatial-title-only-v445 img,
.smartarch-spatial-title-only-v445 .hero-icon,
.smartarch-spatial-title-only-v445 [class*="icon"],
.smartarch-spatial-titleblock-v444 img,
.smartarch-spatial-titleblock-v444 .hero-icon,
.smartarch-spatial-titleblock-v444 [class*="icon"],
.smartarch-spatial-title-top-v443 img,
.smartarch-spatial-title-top-v443 .hero-icon,
.smartarch-spatial-title-top-v443 [class*="icon"] {
  width: 120px !important;
  height: 120px !important;
  min-width: 120px !important;
  min-height: 120px !important;
  max-width: 120px !important;
  max-height: 120px !important;
  object-fit: contain !important;
}

@media (max-width: 900px) {
  .smartarch-spatial-title-only-v445 {
    grid-template-columns: 1fr !important;
  }
}


/* SMARTARCH V4.51 CSS ONLY HELP ALERT - JS GEREKTIRMEZ */

/* Eski JS modalı görünür olursa bastır */
#smartarchSpatialHelpModal:not(.force-open) {
  display: none;
}

/* Nasıl Kullanılır butonu */
.smartarch-help-css-alert-open,
.smartarch-spatial-help-open {
  grid-area: help !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin: 6px auto 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none !important;
}

/* Gizli checkbox */
.smartarch-help-css-alert-toggle {
  position: fixed !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Modal kapalı */
.smartarch-help-css-alert-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
}

/* Checkbox seçilince modal açılır */
#smartarchHelpToggleV451:checked + .smartarch-help-css-alert-modal {
  display: flex !important;
}

/* Dış alan: tıklanınca kapanır çünkü label */
.smartarch-help-css-alert-backdrop {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  background: rgba(3, 8, 16, 0.72) !important;
  backdrop-filter: blur(3px) !important;
  cursor: pointer !important;
}

/* Uyarı kutusu */
.smartarch-help-css-alert-box {
  position: relative !important;
  z-index: 2 !important;
  width: min(680px, 94vw) !important;
  max-height: min(660px, 86vh) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 212, 71, 0.55) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #0c1828 0%, #07111f 100%) !important;
  color: #eaf2ff !important;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.62) !important;
  padding: 26px 28px 24px !important;
  text-align: center !important;
  animation: smartarchHelpCssAlertIn 160ms ease-out !important;
}

@keyframes smartarchHelpCssAlertIn {
  from {
    transform: translateY(8px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.smartarch-help-css-alert-box h2 {
  margin: 0 auto 8px !important;
  max-width: 580px !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

.smartarch-help-css-alert-box h3 {
  margin: 0 auto 20px !important;
  max-width: 580px !important;
  color: #ffd447 !important;
  font-size: 17px !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

.smartarch-help-css-alert-scroll {
  max-height: 430px !important;
  overflow-y: auto !important;
  padding: 0 6px 0 0 !important;
  text-align: left !important;
}

.smartarch-help-css-alert-scroll h4 {
  margin: 18px 0 8px !important;
  color: #ffd447 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.smartarch-help-css-alert-scroll h4:first-child {
  margin-top: 0 !important;
}

.smartarch-help-css-alert-scroll p {
  margin: 0 0 12px !important;
  color: #dbe7f8 !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
  text-align: left !important;
}

/* Tamam butonu */
.smartarch-help-css-alert-ok {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin-top: 18px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none !important;
}


/* SMARTARCH V4.57B INLINE HEADER CSS-ONLY HELP ALERT */

/* Eski JS modalı varsa bastır */
#smartarchSpatialHelpModal {
  display: none !important;
}

/* Gizli checkbox */
.smartarch-help-css-alert-toggle {
  position: fixed !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Nasıl Kullanılır butonu */
.smartarch-help-css-alert-open,
.smartarch-spatial-help-open {
  grid-area: help !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin: 6px auto 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none !important;
}

/* Modal kapalı */
.smartarch-help-css-alert-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
}

/* Input, label ve modal aynı render edilen header alanında olduğu için ~ kullanıyoruz */
#smartarchHelpToggleV452b:checked ~ .smartarch-help-css-alert-modal {
  display: flex !important;
}

/* Dış alan: tıklanınca checkbox kapanır */
.smartarch-help-css-alert-backdrop {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  background: rgba(3, 8, 16, 0.72) !important;
  backdrop-filter: blur(3px) !important;
  cursor: pointer !important;
}

/* Uyarı kutusu */
.smartarch-help-css-alert-box {
  position: relative !important;
  z-index: 2 !important;
  width: min(680px, 94vw) !important;
  max-height: min(660px, 86vh) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 212, 71, 0.55) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #0c1828 0%, #07111f 100%) !important;
  color: #eaf2ff !important;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.62) !important;
  padding: 26px 28px 24px !important;
  text-align: center !important;
}

.smartarch-help-css-alert-box h2 {
  margin: 0 auto 8px !important;
  max-width: 580px !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

.smartarch-help-css-alert-box h3 {
  margin: 0 auto 20px !important;
  max-width: 580px !important;
  color: #ffd447 !important;
  font-size: 17px !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

.smartarch-help-css-alert-scroll {
  max-height: 430px !important;
  overflow-y: auto !important;
  padding: 0 6px 0 0 !important;
  text-align: left !important;
}

.smartarch-help-css-alert-scroll h4 {
  margin: 18px 0 8px !important;
  color: #ffd447 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.smartarch-help-css-alert-scroll p {
  margin: 0 0 12px !important;
  color: #dbe7f8 !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
  text-align: left !important;
}

.smartarch-help-css-alert-ok {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin-top: 18px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none !important;
}


/* SMARTARCH V4.57 SAFE HELP ALERT */

/* Önceki hatalı CSS-only modal içerikleri görünmesin */
.smartarch-help-css-alert-modal,
#smartarchSpatialHelpModal {
  display: none !important;
}

/* Header içinde yalnızca küçük buton */
#smartarchSpatialHelpOpen.smartarch-spatial-help-open {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin: 8px auto 0 !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none !important;
}

/* JS ile body üzerine açılan güvenli uyarı penceresi */
.smartarch-help-alert-v453 {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
}

.smartarch-help-alert-v453__backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(3, 8, 16, 0.72) !important;
  backdrop-filter: blur(3px) !important;
  cursor: pointer !important;
}

.smartarch-help-alert-v453__box {
  position: relative !important;
  z-index: 2 !important;
  width: min(680px, 94vw) !important;
  max-height: min(660px, 86vh) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 212, 71, 0.55) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #0c1828 0%, #07111f 100%) !important;
  color: #eaf2ff !important;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.62) !important;
  padding: 26px 28px 24px !important;
  text-align: center !important;
}

.smartarch-help-alert-v453__close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 30px !important;
  height: 30px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 9px !important;
  background: #10243d !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.smartarch-help-alert-v453__box h2 {
  margin: 0 auto 8px !important;
  max-width: 580px !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

.smartarch-help-alert-v453__box h3 {
  margin: 0 auto 20px !important;
  max-width: 580px !important;
  color: #ffd447 !important;
  font-size: 17px !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

.smartarch-help-alert-v453__scroll {
  max-height: 430px !important;
  overflow-y: auto !important;
  padding: 0 6px 0 0 !important;
  text-align: left !important;
}

.smartarch-help-alert-v453__scroll h4 {
  margin: 18px 0 8px !important;
  color: #ffd447 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.smartarch-help-alert-v453__scroll h4:first-child {
  margin-top: 0 !important;
}

.smartarch-help-alert-v453__scroll p {
  margin: 0 0 12px !important;
  color: #dbe7f8 !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
  text-align: left !important;
}

.smartarch-help-alert-v453__ok {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  margin-top: 18px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(255, 212, 71, 0.65) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffd447 0%, #f0b82f 100%) !important;
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

/* SMARTARCH V4.40 DYNAMIC FLOOR COUNT / GRID PLAN SURFACE */
#planPane{overflow:hidden}.plan-workspace{position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:10px;padding:10px 10px 44px 10px}.plan-workspace .plan-scroll{position:relative;width:100%;height:100%;overflow:hidden;border:0;border-radius:12px;background:linear-gradient(180deg,#10243d 0%,#07111f 100%)}
.plan-view-controls{position:relative;z-index:30;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px;border:1px solid rgba(255,212,71,.34);border-radius:14px;background:rgba(7,17,31,.92);box-shadow:0 12px 26px rgba(0,0,0,.32);backdrop-filter:blur(4px);height:fit-content;max-height:calc(100% - 8px)}
.plan-view-controls strong{color:var(--sa-strong);font-size:13px;font-weight:950;line-height:1.25}.plan-view-controls button{width:100%;min-height:32px!important;padding:6px 10px!important;border-radius:10px!important;font-size:12px!important;font-weight:900!important;background:linear-gradient(180deg,#173357,#0a1627)!important;color:#fff!important;border-color:#426b9a!important;box-shadow:none!important}.plan-view-controls button:hover{border-color:var(--sa-gold)!important;color:var(--sa-gold)!important}.plan-view-controls small{color:var(--sa-muted);font-size:10px;font-weight:800;line-height:1.25}.plan-floor-control{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;background:rgba(8,19,33,.84)!important;border:1px solid var(--sa-line)!important;border-radius:11px!important;padding:8px!important;color:var(--sa-text)!important;font-size:11px!important;font-weight:900!important}.plan-floor-control select{width:100%!important;max-width:none!important;height:32px!important}.pane#planPane canvas{cursor:grab}.pane#planPane canvas:active{cursor:grabbing}.pane#planPane .section-caption{left:20px;right:260px;max-width:none}
@media(max-width:900px){.plan-workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;padding:8px 8px 96px 8px}.plan-view-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}.plan-view-controls strong,.plan-view-controls small,.plan-floor-control{grid-column:1/-1}.pane#planPane .section-caption{left:10px;right:10px;bottom:8px}.plan-view-controls button{min-height:30px!important}}
@media(max-width:560px){.plan-workspace{padding-bottom:132px}.plan-view-controls{grid-template-columns:1fr}.plan-view-controls button{width:100%}}

/* SMARTARCH V4.42 REAL PLAN SYNTHESIS RIGHT PANEL NOTE */
.smartarch-spatial-page .plan-control-panel:after{content:"V4.42: gerçek plan sentezi / +10 ortak duvar / çakışmasız çözüm";display:block;margin-top:8px;font-size:10px;line-height:1.25;color:rgba(220,232,255,.72);}

/* SMARTARCH V4.50 EXACT GRAPH-PLAN EQUIVALENCE UI */
.node-rect.multi-selected-v448{stroke:#ffd447!important;stroke-width:3!important;filter:drop-shadow(0 0 8px rgba(255,212,71,.6));}
.graph-edit-menu-v448{position:fixed;z-index:99999;display:flex;gap:6px;align-items:center;flex-wrap:wrap;max-width:330px;padding:8px;border:1px solid rgba(255,212,71,.55);border-radius:10px;background:#071323;color:#eaf2ff;box-shadow:0 10px 30px rgba(0,0,0,.35);font:12px/1.25 Segoe UI,Arial,sans-serif;}
.graph-edit-menu-v448 button{border:1px solid rgba(132,178,255,.55);border-radius:8px;background:#102b4c;color:#fff;font-weight:800;padding:5px 9px;cursor:pointer;}
.graph-edit-menu-v448 small{width:100%;color:#aebbd0;margin-top:3px;}

/* SMARTARCH V4.57 exact graph-plan equivalence + trim/extend menu polish */
.graph-edit-handles-v451 circle{filter:drop-shadow(0 0 4px rgba(255,212,71,.55));}
.node-rect.multi-selected-v448{stroke:#ffd447!important;stroke-width:4!important;}


/* SMARTARCH V4.59 SOLID COLLISION SPACE MENU HOTFIX */
#smartarchSpatialComposition button,#smartarchSpatialComposition input,#smartarchSpatialComposition select,#smartarchSpatialComposition textarea,#smartarchSpatialComposition label{pointer-events:auto!important;}
#smartarchHelpAlertV458{pointer-events:auto!important;}
#smartarchHelpAlertV458 .smartarch-help-alert-v453__backdrop,#smartarchHelpAlertV458 .smartarch-help-alert-v453__close,#smartarchHelpAlertV458 .smartarch-help-alert-v453__ok{pointer-events:auto!important;}
body:not(.smartarch-help-modal-open) .smartarch-spatial-help-alert:not(#smartarchHelpAlertV458){pointer-events:auto;}

/* SMARTARCH V4.59 SOLID COLLISION + SPACE TRIM EXTEND FULL */
.graph-edit-menu-v448{outline:2px solid rgba(255,212,71,.16);}
.graph-edit-menu-v448 small:before{content:"V4.59 CAD: ";font-weight:900;color:#ffd447;}
.graph-edit-handles-v451 circle{pointer-events:auto;}
.node-rect.multi-selected-v448{stroke:#8fd2ff!important;stroke-width:4!important;stroke-dasharray:5 4;}

/* SMARTARCH V4.59C MOVE / TASI BUTTON */
.sc-toolbar .mode-command{border:1px solid rgba(247,214,106,.46);background:rgba(247,214,106,.10);color:#f7d66a;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer;}
.sc-toolbar .mode-command.active{background:#f7d66a;color:#07111f;box-shadow:0 0 0 2px rgba(247,214,106,.16);}
.graph-edit-menu-v448 button[data-act="move"]{font-weight:900;border-color:rgba(247,214,106,.70);}

/* SMARTARCH V4.59I GRAPH ROOM MOVE ONLY */
.graph-svg{cursor:default!important;}
.graph-svg [data-node-id], .graph-svg .node-rect{cursor:move!important;pointer-events:auto!important;}

/* V4.60 room vertical controls */
.sc-section-toolbar input#roomHeightCm,.sc-section-toolbar input#roomBaseElevationCm{max-width:92px;}


/* SMARTARCH_V481_EQUAL_HEIGHT_TOOLBAR_UI
   Only Spatial Composition toolbar presentation is affected.
   Group order, buttons, IDs, backend and other pages are not changed.
   Goal: every control inside the Parametreler and Kesit groups has equal visual height,
   aligned inputs, compact rows, and no irregular tall/short boxes. */
.smartarch-spatial-page .sc-toolbar{
  display:grid!important;
  align-items:center!important;
  align-content:start!important;
  gap:8px!important;
  padding:48px 10px 10px!important;
  margin:0 10px 10px!important;
}
.smartarch-spatial-page .sc-parameters-toolbar{
  grid-template-columns:repeat(auto-fit,minmax(174px,1fr))!important;
}
.smartarch-spatial-page .sc-section-toolbar{
  grid-template-columns:repeat(auto-fit,minmax(166px,1fr))!important;
}
.smartarch-spatial-page .sc-toolbar:before{
  top:14px!important;
  left:16px!important;
  font-size:18px!important;
  line-height:1.1!important;
}
.smartarch-spatial-page .sc-toolbar > label,
.smartarch-spatial-page .sc-toolbar > button,
.smartarch-spatial-page .sc-toolbar > .reference-status,
.smartarch-spatial-page .sc-toolbar > #sectionStatus{
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  margin:0!important;
  padding:6px 9px!important;
  border-radius:11px!important;
  font-size:12px!important;
  line-height:1.15!important;
  display:flex!important;
  align-items:center!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.smartarch-spatial-page .sc-toolbar > label{
  justify-content:space-between!important;
  gap:8px!important;
  white-space:nowrap!important;
}
.smartarch-spatial-page .sc-toolbar > button{
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.smartarch-spatial-page .sc-toolbar > .reference-status,
.smartarch-spatial-page .sc-toolbar > #sectionStatus{
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  color:var(--sa-muted)!important;
}
.smartarch-spatial-page .sc-toolbar .divider{
  display:none!important;
}
.smartarch-spatial-page .sc-toolbar input,
.smartarch-spatial-page .sc-toolbar select{
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  min-width:74px!important;
  width:92px!important;
  max-width:112px!important;
  padding:3px 8px!important;
  border-radius:9px!important;
  font-size:12px!important;
  flex:0 0 auto!important;
}
.smartarch-spatial-page .sc-toolbar select#roomTypeSelect{
  width:132px!important;
  max-width:142px!important;
}
.smartarch-spatial-page .sc-toolbar input#roomPolygonSideLengths{
  width:150px!important;
  max-width:160px!important;
}
.smartarch-spatial-page .sc-toolbar input[type="range"]{
  width:118px!important;
  max-width:128px!important;
  padding-left:0!important;
  padding-right:0!important;
}
.smartarch-spatial-page .sc-toolbar input[type="radio"],
.smartarch-spatial-page .sc-toolbar input[type="checkbox"]{
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:0!important;
  flex:0 0 auto!important;
}
.smartarch-spatial-page .sc-parameters-toolbar label:has(#roomTypeSelect){grid-column:span 2!important;}
.smartarch-spatial-page .sc-parameters-toolbar label:has(#externalWallCm),
.smartarch-spatial-page .sc-parameters-toolbar label:has(#internalWallCm){grid-column:span 2!important;}
.smartarch-spatial-page .sc-section-toolbar #refStatus{grid-column:span 3!important;}
.smartarch-spatial-page .sc-section-toolbar label:has(#sectionOpacity){grid-column:span 2!important;}
.smartarch-spatial-page .sc-section-toolbar label:has(#roomPolygonSideLengths){grid-column:span 2!important;}
.smartarch-spatial-page .sc-section-toolbar #applyRoomPolygon,
.smartarch-spatial-page .sc-section-toolbar #clearRoomPolygon,
.smartarch-spatial-page .sc-section-toolbar #mergeAdjacentRooms{grid-column:span 2!important;}
.smartarch-spatial-page .sc-section-toolbar #sectionStatus{grid-column:1/-1!important;}
@media(max-width:900px){
  .smartarch-spatial-page .sc-parameters-toolbar,
  .smartarch-spatial-page .sc-section-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .smartarch-spatial-page .sc-section-toolbar #refStatus,
  .smartarch-spatial-page .sc-section-toolbar label:has(#sectionOpacity),
  .smartarch-spatial-page .sc-section-toolbar label:has(#roomPolygonSideLengths),
  .smartarch-spatial-page .sc-section-toolbar #applyRoomPolygon,
  .smartarch-spatial-page .sc-section-toolbar #clearRoomPolygon,
  .smartarch-spatial-page .sc-section-toolbar #mergeAdjacentRooms{grid-column:1/-1!important;}
}
@media(max-width:560px){
  .smartarch-spatial-page .sc-parameters-toolbar,
  .smartarch-spatial-page .sc-section-toolbar{grid-template-columns:1fr!important;}
  .smartarch-spatial-page .sc-toolbar > label,
  .smartarch-spatial-page .sc-toolbar > button,
  .smartarch-spatial-page .sc-toolbar > .reference-status,
  .smartarch-spatial-page .sc-toolbar > #sectionStatus{height:44px!important;min-height:44px!important;max-height:44px!important;}
}

/* SMARTARCH_V482_CENTERED_POLYGON_ROW_UI
   Only the polygon edit row in Spatial Composition is affected.
   The row is centered horizontally as a single group so the first cell is never clipped or half-visible. */
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482{
  grid-column:1/-1!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:visible!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 > label,
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 > button{
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  margin:0!important;
  padding:6px 9px!important;
  border-radius:11px!important;
  font-size:12px!important;
  line-height:1.15!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  overflow:hidden!important;
  flex:0 1 auto!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 > button{
  justify-content:center!important;
  text-align:center!important;
  min-width:220px!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 label:has(#roomPolygonSides){
  min-width:218px!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 label:has(#roomPolygonSideLengths){
  min-width:328px!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 input#roomPolygonSides{
  width:92px!important;
  min-width:74px!important;
  max-width:112px!important;
}
.smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 input#roomPolygonSideLengths{
  width:170px!important;
  min-width:150px!important;
  max-width:190px!important;
}
@media(max-width:900px){
  .smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482{
    justify-content:stretch!important;
  }
  .smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 > label,
  .smartarch-spatial-page .sc-section-toolbar .sc-polygon-row-v482 > button{
    flex:1 1 100%!important;
    min-width:0!important;
  }
}

/* SMARTARCH_V489_PLAN_GRID_SECTION_FIT: no CSS/layout change; DXF-only plan grid section fit. */

/* SMARTARCH_V499_FULLSCREEN_SCENE_TABS: active design scene panes can fill the screen safely. */
.smartarch-spatial-page .sc-stage:fullscreen,
.smartarch-spatial-page .pane:fullscreen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  background:#07111f!important;
  padding:12px!important;
  box-sizing:border-box!important;
  overflow:auto!important;
}
.smartarch-spatial-page .sc-stage:fullscreen .pane.active,
.smartarch-spatial-page .pane:fullscreen{
  display:block!important;
  min-height:calc(100vh - 24px)!important;
}
.smartarch-spatial-page .sc-stage:fullscreen canvas,
.smartarch-spatial-page .pane:fullscreen canvas,
.smartarch-spatial-page .sc-stage:fullscreen svg,
.smartarch-spatial-page .pane:fullscreen svg{
  width:100%!important;
  min-height:calc(100vh - 90px)!important;
}


/* SMARTARCH_V503_3D_DXF_REFERENCE_FULLSCREEN_SPACE_PALETTE */
/* SMARTARCH_V504_QA_LOGIC_COMFORT_FIX: palette is compact and fullscreen-safe. */
/* SMARTARCH_V505_DRAGGABLE_FULLSCREEN_SPACE_PALETTE: header grab-drag moves the fullscreen palette. */
.smartarch-fullscreen-space-palette-v503{
  position:fixed!important;
  right:10px!important;
  bottom:10px!important;
  z-index:2147483647!important;
  width:min(460px,calc(100vw - 20px))!important;
  max-height:min(70vh,560px)!important;
  overflow:auto!important;
  display:none!important;
  flex-direction:column!important;
  gap:5px!important;
  padding:8px!important;
  border:1px solid rgba(255,212,71,.45)!important;
  border-radius:12px!important;
  background:rgba(7,17,31,.96)!important;
  box-shadow:0 18px 54px rgba(0,0,0,.55)!important;
  color:#dce8ff!important;
  font-family:Segoe UI,Arial,sans-serif!important;
}
.smartarch-fullscreen-space-palette-v503.open{display:flex!important;}
.smartarch-fullscreen-space-palette-v503 .v503-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:2px!important;cursor:grab!important;user-select:none!important;touch-action:none!important;}
.smartarch-fullscreen-space-palette-v503 .v503-head strong{font-size:13px!important;color:#ffe789!important;line-height:1.1!important;}
.smartarch-fullscreen-space-palette-v503.dragging .v503-head{cursor:grabbing!important;}
.smartarch-fullscreen-space-palette-v503 .v505-drag-hint{font-size:10px!important;color:rgba(255,231,137,.72)!important;border:1px solid rgba(255,212,71,.28)!important;border-radius:999px!important;padding:2px 6px!important;margin-left:auto!important;white-space:nowrap!important;}
.smartarch-fullscreen-space-palette-v503 .v503-head button{width:28px!important;height:28px!important;border-radius:999px!important;padding:0!important;font-size:18px!important;line-height:1!important;}
.smartarch-fullscreen-space-palette-v503 .v503-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;}
.smartarch-fullscreen-space-palette-v503 .v503-fields{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;}
.smartarch-fullscreen-space-palette-v503 .v503-field{display:flex!important;flex-direction:column!important;gap:2px!important;margin:0!important;min-width:0!important;}
.smartarch-fullscreen-space-palette-v503 .v503-field span{font-size:10px!important;color:rgba(220,232,255,.78)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.smartarch-fullscreen-space-palette-v503 input,.smartarch-fullscreen-space-palette-v503 select,.smartarch-fullscreen-space-palette-v503 button{min-height:24px!important;border-radius:8px!important;border:1px solid rgba(144,164,191,.35)!important;background:rgba(12,29,48,.92)!important;color:#eaf2ff!important;font-size:10.5px!important;padding:3px 5px!important;box-sizing:border-box!important;width:100%!important;}
.smartarch-fullscreen-space-palette-v503 button{background:rgba(255,212,71,.12)!important;border-color:rgba(255,212,71,.42)!important;color:#ffe789!important;font-weight:700!important;cursor:pointer!important;}
.smartarch-fullscreen-space-palette-v503 .v503-check{flex-direction:row!important;align-items:center!important;gap:5px!important;background:rgba(12,29,48,.62)!important;border:1px solid rgba(144,164,191,.22)!important;border-radius:8px!important;padding:4px 6px!important;}
.smartarch-fullscreen-space-palette-v503 .v503-check input{width:16px!important;min-height:16px!important;padding:0!important;}
.smartarch-fullscreen-space-palette-v503 .v503-sub{font-size:11.5px!important;font-weight:800!important;color:#ffe789!important;margin-top:3px!important;}
.smartarch-fullscreen-space-palette-v503 .v503-note{display:block!important;font-size:10.5px!important;color:rgba(220,232,255,.68)!important;line-height:1.3!important;margin-top:2px!important;}
@media(max-width:720px){.smartarch-fullscreen-space-palette-v503 .v503-grid,.smartarch-fullscreen-space-palette-v503 .v503-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}


/* SMARTARCH V549 - DXF parsel kenar bazlı çekme sınırı ve zoom güvenli sınır katmanı */
.smartarch-parcel-grid-v549{grid-template-columns:minmax(240px,1.4fr) repeat(5,minmax(130px,.7fr));}
.smartarch-parcel-edge-table-v549{display:grid;gap:8px;max-height:220px;overflow:auto;padding:8px;border:1px solid rgba(125,211,252,.22);border-radius:12px;background:rgba(2,6,23,.22)}
.smartarch-parcel-edge-row-v549{display:grid;grid-template-columns:68px 1fr 118px 118px;gap:8px;align-items:center;padding:7px 8px;border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.035)}
.smartarch-parcel-edge-row-v549 b{color:#ffe789}.smartarch-parcel-edge-row-v549 span{font-size:12px;color:#cfe8ff}.smartarch-parcel-edge-row-v549 input{min-width:0}.smartarch-parcel-edge-row-v549 button{padding:8px 10px}
.smartarch-parcel-layer-v549 .parcel-original-v549{fill:rgba(14,165,233,.08);stroke:#38bdf8;stroke-width:2.5;vector-effect:non-scaling-stroke;pointer-events:none}
.smartarch-parcel-layer-v549 .parcel-setback-v549{fill:rgba(255,214,10,.10);stroke:#facc15;stroke-width:3;vector-effect:non-scaling-stroke;pointer-events:none}
.smartarch-parcel-layer-v549 .parcel-offset-line-v549{stroke:#fde68a;stroke-width:1.4;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;pointer-events:none}
.smartarch-parcel-layer-v549 .parcel-label-v549{font-size:11px;fill:#fef3c7;paint-order:stroke;stroke:#020617;stroke-width:4px;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.smartarch-parcel-layer-v549 .parcel-warn-v549{fill:#fca5a5;stroke:#020617;stroke-width:3px;paint-order:stroke;vector-effect:non-scaling-stroke}
@media(max-width:1180px){.smartarch-parcel-grid-v549{grid-template-columns:1fr}.smartarch-parcel-edge-row-v549{grid-template-columns:1fr}}

/* SMARTARCH V550 - parcel boundary uses same graph/plan world transform; no independent overlay scale. */
.smartarch-parcel-layer-v550{pointer-events:none;}
.smartarch-parcel-layer-v550 .parcel-original-v549,.smartarch-parcel-layer-v550 .parcel-setback-v549{vector-effect:non-scaling-stroke;}

/* =========================================================
   SMARTARCH V557 MODERN SCROLLBARS - THREE VISIBLE ZONES
   Page viewport + DXF parcel edge list + report/analysis panels
   ========================================================= */
:root{
  --sa-scroll-track:#06111f;
  --sa-scroll-track-2:#08182a;
  --sa-scroll-border:rgba(56,189,248,.24);
  --sa-scroll-thumb-1:rgba(56,189,248,.96);
  --sa-scroll-thumb-2:rgba(14,116,144,.94);
  --sa-scroll-thumb-gold:rgba(255,212,71,.98);
  --sa-scroll-shadow:rgba(56,189,248,.30);
}

/* 1) Main browser/page scrollbar */
html,
body{
  scrollbar-width:thin;
  scrollbar-color:rgba(56,189,248,.86) rgba(6,17,31,.92);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{
  width:12px;
  height:12px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track{
  background:linear-gradient(180deg,#050d18,#081827);
  border-left:1px solid rgba(56,189,248,.14);
  box-shadow:inset 0 0 12px rgba(0,0,0,.42);
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb{
  min-height:72px;
  border-radius:999px;
  border:3px solid #06111f;
  background:linear-gradient(180deg,var(--sa-scroll-thumb-1),var(--sa-scroll-thumb-2));
  box-shadow:0 0 12px var(--sa-scroll-shadow),inset 0 0 8px rgba(255,255,255,.12);
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,var(--sa-scroll-thumb-gold),var(--sa-scroll-thumb-1));
  box-shadow:0 0 16px rgba(255,212,71,.35),0 0 18px rgba(56,189,248,.28);
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner{
  background:#06111f;
}

/* 2) Spatial module scrollable areas */
.smartarch-spatial-page,
.smartarch-spatial-page *{
  scrollbar-width:thin;
  scrollbar-color:rgba(56,189,248,.84) rgba(6,17,31,.92);
}
.smartarch-spatial-page ::-webkit-scrollbar{
  width:10px;
  height:10px;
}
.smartarch-spatial-page ::-webkit-scrollbar-track{
  background:linear-gradient(180deg,var(--sa-scroll-track),var(--sa-scroll-track-2));
  border-radius:999px;
  box-shadow:inset 0 0 0 1px var(--sa-scroll-border),inset 0 0 10px rgba(0,0,0,.36);
}
.smartarch-spatial-page ::-webkit-scrollbar-thumb{
  min-height:54px;
  border-radius:999px;
  border:2px solid rgba(6,17,31,.96);
  background:linear-gradient(180deg,var(--sa-scroll-thumb-1),var(--sa-scroll-thumb-2));
  box-shadow:0 0 10px rgba(56,189,248,.28),inset 0 0 8px rgba(255,255,255,.10);
}
.smartarch-spatial-page ::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,var(--sa-scroll-thumb-gold),var(--sa-scroll-thumb-1));
  box-shadow:0 0 14px rgba(255,212,71,.32),0 0 16px rgba(56,189,248,.24);
}
.smartarch-spatial-page ::-webkit-scrollbar-corner{
  background:#06111f;
}

/* 3) The three currently visible scrollbar zones: DXF list, right report panel, table/horizontal strip */
.smartarch-spatial-page .smartarch-parcel-edge-table-v549,
.smartarch-spatial-page .smartarch-parcel-tools-v2,
.smartarch-spatial-page .side-pane,
.smartarch-spatial-page .analysis-box,
.smartarch-spatial-page .plan-scroll,
.smartarch-spatial-page .force-strip,
.smartarch-spatial-page .editable-table,
.smartarch-spatial-page .smartarch-help-alert-v453__scroll,
.smartarch-spatial-page [class*="scroll"],
.smartarch-spatial-page [class*="pane"],
.smartarch-spatial-page [class*="panel"]{
  scrollbar-width:thin;
  scrollbar-color:rgba(255,212,71,.92) rgba(8,24,42,.94);
}
.smartarch-spatial-page .smartarch-parcel-edge-table-v549::-webkit-scrollbar,
.smartarch-spatial-page .smartarch-parcel-tools-v2::-webkit-scrollbar,
.smartarch-spatial-page .side-pane::-webkit-scrollbar,
.smartarch-spatial-page .analysis-box::-webkit-scrollbar,
.smartarch-spatial-page .plan-scroll::-webkit-scrollbar,
.smartarch-spatial-page .force-strip::-webkit-scrollbar,
.smartarch-spatial-page .editable-table::-webkit-scrollbar,
.smartarch-spatial-page .smartarch-help-alert-v453__scroll::-webkit-scrollbar,
.smartarch-spatial-page [class*="scroll"]::-webkit-scrollbar,
.smartarch-spatial-page [class*="pane"]::-webkit-scrollbar,
.smartarch-spatial-page [class*="panel"]::-webkit-scrollbar{
  width:9px;
  height:9px;
}
.smartarch-spatial-page .smartarch-parcel-edge-table-v549::-webkit-scrollbar-track,
.smartarch-spatial-page .smartarch-parcel-tools-v2::-webkit-scrollbar-track,
.smartarch-spatial-page .side-pane::-webkit-scrollbar-track,
.smartarch-spatial-page .analysis-box::-webkit-scrollbar-track,
.smartarch-spatial-page .plan-scroll::-webkit-scrollbar-track,
.smartarch-spatial-page .force-strip::-webkit-scrollbar-track,
.smartarch-spatial-page .editable-table::-webkit-scrollbar-track,
.smartarch-spatial-page .smartarch-help-alert-v453__scroll::-webkit-scrollbar-track,
.smartarch-spatial-page [class*="scroll"]::-webkit-scrollbar-track,
.smartarch-spatial-page [class*="pane"]::-webkit-scrollbar-track,
.smartarch-spatial-page [class*="panel"]::-webkit-scrollbar-track{
  background:linear-gradient(180deg,rgba(8,24,42,.98),rgba(4,12,24,.98));
  border-radius:999px;
  border:1px solid rgba(56,189,248,.18);
  box-shadow:inset 0 0 8px rgba(0,0,0,.40);
}
.smartarch-spatial-page .smartarch-parcel-edge-table-v549::-webkit-scrollbar-thumb,
.smartarch-spatial-page .smartarch-parcel-tools-v2::-webkit-scrollbar-thumb,
.smartarch-spatial-page .side-pane::-webkit-scrollbar-thumb,
.smartarch-spatial-page .analysis-box::-webkit-scrollbar-thumb,
.smartarch-spatial-page .plan-scroll::-webkit-scrollbar-thumb,
.smartarch-spatial-page .force-strip::-webkit-scrollbar-thumb,
.smartarch-spatial-page .editable-table::-webkit-scrollbar-thumb,
.smartarch-spatial-page .smartarch-help-alert-v453__scroll::-webkit-scrollbar-thumb,
.smartarch-spatial-page [class*="scroll"]::-webkit-scrollbar-thumb,
.smartarch-spatial-page [class*="pane"]::-webkit-scrollbar-thumb,
.smartarch-spatial-page [class*="panel"]::-webkit-scrollbar-thumb{
  min-height:46px;
  border-radius:999px;
  border:2px solid rgba(6,17,31,.98);
  background:linear-gradient(180deg,rgba(255,212,71,.98),rgba(56,189,248,.90));
  box-shadow:0 0 10px rgba(255,212,71,.22),0 0 12px rgba(56,189,248,.18);
}
.smartarch-spatial-page .smartarch-parcel-edge-table-v549::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .smartarch-parcel-tools-v2::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .side-pane::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .analysis-box::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .plan-scroll::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .force-strip::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .editable-table::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page .smartarch-help-alert-v453__scroll::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page [class*="scroll"]::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page [class*="pane"]::-webkit-scrollbar-thumb:hover,
.smartarch-spatial-page [class*="panel"]::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,rgba(255,235,130,1),rgba(34,211,238,.98));
}

/* Remove default white arrow buttons in Chromium/Edge scrollbars */
html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
.smartarch-spatial-page ::-webkit-scrollbar-button{
  width:0;
  height:0;
  display:none;
}


/* SMARTARCH_V571_SPATIAL_BULK_OPERATIONS_SUPPORT */
.spatial-selection-marquee,.selection-marquee{
  position:absolute;
  z-index:80;
  pointer-events:none;
  border:2px dashed rgba(255,212,71,.95);
  background:rgba(255,212,71,.14);
  box-shadow:0 0 0 1px rgba(7,17,31,.40),0 12px 28px rgba(0,0,0,.28);
  border-radius:8px;
}
.spatial-selection-marquee.hidden,.selection-marquee.hidden{display:none!important;}
.spatial-bulk-ops-panel{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:10px;
  padding:12px 14px;
  border:1px solid rgba(255,212,71,.32);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(42,36,13,.72),rgba(7,17,31,.88));
  color:var(--sa-text,#eaf2ff);
  box-shadow:0 12px 28px rgba(0,0,0,.22);
}
.spatial-bulk-ops-panel strong{color:var(--sa-strong,#fff7cf);margin-right:4px;}
.spatial-bulk-ops-panel label{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--sa-muted,#cbd5e1);}
.spatial-bulk-ops-panel input,.spatial-bulk-ops-panel select{max-width:160px;}
.spatial-bulk-status{font-size:12px;color:#fef3c7;background:#07111f;border:1px dashed rgba(255,212,71,.45);border-radius:10px;padding:8px 10px;min-width:min(480px,100%);}
.node-rect.multi-selected-v448,.node-rect.selected{stroke:#ffd447!important;stroke-width:4!important;filter:drop-shadow(0 0 10px rgba(255,212,71,.55));}


/* SMARTARCH_V571_SPATIAL_BULK_SPACE_MENU_LOCK: Space menu embedded bulk operations; no top toolbar panel required. */
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space{
  width:100%;
  margin:6px 0 2px 0;
  padding:9px;
  border-radius:12px;
  gap:6px;
  background:linear-gradient(180deg,rgba(42,36,13,.78),rgba(7,17,31,.94));
}
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space strong{width:100%;font-size:12px;color:#fff7cf;}
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space button{font-size:11px;padding:5px 7px;}
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space label{font-size:11px;flex:1 1 130px;}
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space input,
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space select{width:100%;max-width:150px;min-height:26px;border-radius:8px;border:1px solid rgba(132,178,255,.35);background:#0b1e35;color:#eaf2ff;padding:3px 6px;}
.graph-edit-menu-v448 .spatial-bulk-ops-panel-space .spatial-bulk-status{width:100%;min-width:0;font-size:11px;padding:6px 8px;}

/* SMARTARCH_V573_VISUAL_REFERENCE_SCHEMA_ZERO_MANIPULATION
   Visual guide layer only: selection marquee, reference rings, midpoints and guide lines.
   It must never receive pointer events and must never change project geometry. */
.smartarch-reference-overlay,
.smartarch-reference-overlay-v573 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 18;
  overflow: hidden;
  opacity: 1;
}
.selection-marquee,
.spatial-selection-marquee {
  position: absolute;
  pointer-events: none !important;
  border: 1.5px dashed rgba(255, 212, 71, 0.86) !important;
  background: rgba(255, 212, 71, 0.075) !important;
  box-shadow: 0 0 0 1px rgba(7, 17, 31, 0.60) inset, 0 0 28px rgba(255, 212, 71, 0.12) !important;
  border-radius: 8px;
  z-index: 24;
}
.smartarch-reference-layer-v573,
.smartarch-reference-layer-v573 * {
  pointer-events: none !important;
}
.smartarch-reference-guide-line {
  pointer-events: none !important;
  stroke: rgba(255, 212, 71, 0.82);
  stroke-dasharray: 7 6;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-guide-line.edge-to-edge {
  stroke: rgba(56, 189, 248, 0.78);
  stroke-dasharray: 9 5;
}
.smartarch-reference-guide-line.mid-to-edge {
  stroke: rgba(74, 222, 128, 0.76);
  stroke-dasharray: 5 5;
}
.smartarch-reference-ring,
.smartarch-reference-midpoint {
  pointer-events: none !important;
  fill: rgba(255, 212, 71, 0.11);
  stroke: rgba(255, 212, 71, 0.92);
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-midpoint {
  fill: rgba(56, 189, 248, 0.24);
  stroke: rgba(56, 189, 248, 0.86);
}
.smartarch-reference-label-v573 {
  pointer-events: none !important;
  fill: rgba(226, 239, 255, 0.92);
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(7, 17, 31, 0.92);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 720px) {
  .smartarch-reference-guide-line { stroke-opacity: 0.65; }
  .smartarch-reference-ring { opacity: 0.86; }
}
/* SMARTARCH_V573C_OBJECT_TO_OBJECT_ALIGNMENT_REFERENCE_ZERO_MANIPULATION
   Object-to-object smart guide lines. No dummy canvas center crosshair. */
.smartarch-reference-layer-v573c,
.smartarch-reference-layer-v573c * {
  pointer-events: none !important;
}
.smartarch-reference-guide-line-v573c {
  pointer-events: none !important;
  stroke: rgba(56, 189, 248, 0.88);
  stroke-dasharray: 10 7;
  fill: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.26));
}
.smartarch-reference-guide-line-v573c.aligned {
  stroke: rgba(255, 212, 71, 0.96);
  stroke-dasharray: 12 6;
  filter: drop-shadow(0 0 7px rgba(255, 212, 71, 0.44));
}
.smartarch-reference-guide-line-v573c.near {
  stroke: rgba(56, 189, 248, 0.72);
  stroke-dasharray: 8 8;
}
.smartarch-reference-guide-line-v573c.active-axis {
  stroke: rgba(255, 255, 255, 0.46);
  stroke-dasharray: 4 7;
}
.smartarch-reference-delta-v573c {
  pointer-events: none !important;
  stroke: rgba(244, 114, 182, 0.78);
  stroke-dasharray: 4 4;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-point-v573c {
  pointer-events: none !important;
  fill: rgba(56, 189, 248, 0.30);
  stroke: rgba(56, 189, 248, 0.95);
  stroke-width: 1.3px;
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-point-v573c.target {
  fill: rgba(255, 212, 71, 0.34);
  stroke: rgba(255, 212, 71, 0.96);
}
.smartarch-reference-point-v573c.active {
  fill: rgba(244, 114, 182, 0.30);
  stroke: rgba(244, 114, 182, 0.94);
}
.smartarch-reference-point-v573c.anchor {
  fill: rgba(255, 255, 255, 0.18);
  stroke: rgba(255, 255, 255, 0.72);
}
.selection-marquee-v573c {
  pointer-events: none !important;
  fill: rgba(255, 212, 71, 0.055);
  stroke: rgba(255, 212, 71, 0.94);
  stroke-width: 1.45px;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-label-v573c,
.smartarch-reference-delta-label-v573c {
  pointer-events: none !important;
  fill: rgba(239, 246, 255, 0.96);
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(7, 17, 31, 0.96);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}
.smartarch-reference-delta-label-v573c {
  fill: rgba(244, 114, 182, 0.96);
}
/* SMARTARCH_V573D_LONG_OBJECT_ALIGNMENT_REFERENCE_ZERO_MANIPULATION */
.smartarch-reference-layer-v573d { pointer-events: none; }
.smartarch-reference-guide-line-v573d { stroke: rgba(0, 229, 255, 0.96); stroke-dasharray: 12 8; filter: drop-shadow(0 0 5px rgba(0,229,255,.45)); pointer-events: none; }
.smartarch-reference-guide-line-v573d.aligned { stroke: rgba(255, 215, 0, 0.98); stroke-dasharray: 14 7; filter: drop-shadow(0 0 7px rgba(255,215,0,.55)); }
.smartarch-reference-guide-line-v573d.near { stroke: rgba(0, 229, 255, 0.76); stroke-dasharray: 10 8; }
.smartarch-reference-guide-line-v573d.active-axis { stroke: rgba(255,255,255,.52); stroke-dasharray: 6 7; }
.smartarch-reference-delta-v573d { stroke: rgba(255,255,255,.85); stroke-dasharray: 4 5; pointer-events: none; }
.smartarch-reference-point-v573d { fill: rgba(0,229,255,.82); stroke: rgba(2,11,24,.95); stroke-width: 1.1; pointer-events: none; }
.smartarch-reference-point-v573d.active { fill: rgba(255,215,0,.95); }
.smartarch-reference-point-v573d.target { fill: rgba(0,229,255,.95); }
.smartarch-reference-point-v573d.anchor { fill: rgba(255,255,255,.80); }
.selection-marquee-v573d { fill: rgba(0,229,255,.05); stroke: rgba(255,215,0,.98); stroke-width: 2; stroke-dasharray: 9 6; pointer-events: none; }
.smartarch-reference-label-v573d, .smartarch-reference-delta-label-v573d { fill: rgba(255,255,255,.88); font-size: 11px; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: 3px; pointer-events: none; }


/* SMARTARCH_V573J_ROTATED_OBJECT_REFERENCE_SYNC_KEEP_MEASUREMENTS_ZERO_MANIPULATION
   The visual reference frame now follows rotated/polygon Graph/Graft room geometry.
   Visual-only CSS; no node coordinate or payload mutation. */
.selection-marquee-v573d.rotated-object-v573j,
.smartarch-reference-layer-v573d .rotated-object-v573j {
  fill: rgba(0, 229, 255, 0.11) !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 1.2 !important;
  stroke-dasharray: 9 6 !important;
  stroke-linejoin: miter !important;
  shape-rendering: crispEdges !important;
  vector-effect: non-scaling-stroke !important;
  pointer-events: none !important;
}


/* SMARTARCH_V573O_REMOVE_CYAN_GLOW_AND_DIM_ROTATED_GUIDES_ZERO_MANIPULATION
 * Removes old cyan glow from reference guide visuals.
 * Visual-only CSS: no geometry, payload, backend, snap or move mutation.
 */
.smartarch-reference-guide-line-v573d,
.smartarch-v573m-active-edge-axis-guide,
.smartarch-v573m-neighbor-parallel-guide,
.smartarch-v573n-local-edge-guide,
.smartarch-v573n-neighbor-parallel-guide {
  stroke: rgba(255, 212, 71, 0.74) !important;
  stroke-width: 1.05 !important;
  filter: none !important;
  opacity: 0.78 !important;
  pointer-events: none !important;
}

.smartarch-v573n-local-normal-guide,
.smartarch-v573m-active-normal-guide {
  stroke: rgba(230, 238, 255, 0.36) !important;
  stroke-width: 0.8 !important;
  filter: none !important;
  opacity: 0.62 !important;
}

.smartarch-reference-point-v573d,
.smartarch-reference-point-v573d.target {
  fill: rgba(255, 212, 71, 0.72) !important;
  stroke: rgba(2, 11, 24, 0.82) !important;
  filter: none !important;
}

.smartarch-v573n-measure-label,
.smartarch-v573m-measure-label {
  fill: rgba(255, 246, 210, 0.94) !important;
  stroke: rgba(2, 6, 23, 0.86) !important;
}


/* SMARTARCH_V573R_SELECTED_BLUE_NODE_ROTATE_SYNC_WITH_POLYGON */
.graph-svg polygon.smartarch-v573r-selected-blue-polygon-sync {
  fill: rgba(14, 165, 233, 0.32) !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3.2 !important;
  filter: drop-shadow(0 0 3px rgba(255,212,71,.25)) !important;
  pointer-events: visiblePainted !important;
}
.graph-svg rect[data-smartarch-v573r-axis-rect-hidden="1"] {
  fill: transparent !important;
  stroke: transparent !important;
  stroke-width: 0 !important;
  opacity: .02 !important;
  filter: none !important;
}


/* SMARTARCH_V573R_DISABLED_RESTORE_STABLE
 * Emergency disable for V573R DOM-injected blue polygon sync.
 * Do not allow V573R-created polygon/hidden-rect visuals to affect pointer or rotate behavior.
 */
.graph-svg polygon.smartarch-v573r-selected-blue-polygon-sync,
.graph-svg polygon[data-smartarch-v573r-blue-sync="1"] {
  display: none !important;
  pointer-events: none !important;
}

.graph-svg rect[data-smartarch-v573r-axis-rect-hidden="1"] {
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}


/* SMARTARCH_V573S_GRAPH_NATIVE_GUIDES_AND_BLUE_RECT_ROTATE_SYNC */
#smartarchReferenceOverlayV573 [data-smartarch-v573n],
#smartarchReferenceOverlayV573 [data-smartarch-v573m],
#smartarchReferenceOverlayV573 [data-smartarch-v573l],
#smartarchReferenceOverlayV573 [data-smartarch-v573k],
#smartarchReferenceOverlayV573 [data-smartarch-v573d],
#smartarchReferenceOverlayV573 svg[data-smartarch-v573n-exact-guide-svg],
#smartarchReferenceOverlayV573 svg[data-smartarch-v573m-rotated-guide-svg],
#smartarchReferenceOverlayV573 svg[data-smartarch-v573l-dom-rendered-reference-svg] {
  display: none !important;
  pointer-events: none !important;
}

.graph-svg g[data-smartarch-v573s-guide-layer="1"],
.graph-svg [data-smartarch-v573s-guide="1"] {
  pointer-events: none !important;
}

.graph-svg rect[data-smartarch-v573s-blue-rect-rotated="1"],
.graph-svg polygon[data-smartarch-v573s-blue-polygon-synced="1"] {
  fill: rgba(14, 165, 233, 0.32) !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3.2 !important;
  filter: drop-shadow(0 0 3px rgba(255,212,71,.22)) !important;
}


/* SMARTARCH_V573T_INTEGRATED_GRAPH_LAYER_GUIDES_BLUE_ROTATE_SYNC */
#smartarchReferenceOverlayV573 {
  display: none !important;
  pointer-events: none !important;
}

.graph-svg g[data-smartarch-v573t-guide-layer="1"],
.graph-svg [data-smartarch-v573t-guide="1"] {
  pointer-events: none !important;
}

.graph-svg rect[data-smartarch-v573t-blue-rect-rotated="1"],
.graph-svg polygon[data-smartarch-v573t-blue-polygon-synced="1"] {
  fill: rgba(14, 165, 233, 0.32) !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3.2 !important;
  filter: drop-shadow(0 0 3px rgba(255,212,71,.22)) !important;
}


/* SMARTARCH_V573U_FORCE_SELECTED_POLYGON_FROM_ROTATION_DEG */
.graph-svg [data-smartarch-v573u-guide="1"],
.graph-svg g[data-smartarch-v573u-guide-layer="1"] {
  pointer-events: none !important;
}

.graph-svg polygon[data-smartarch-v573u-forced-rotation-polygon="1"],
.graph-svg rect[data-smartarch-v573u-forced-rotation-rect="1"] {
  fill: rgba(14, 165, 233, 0.32) !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3.2 !important;
  filter: drop-shadow(0 0 3px rgba(255,212,71,.22)) !important;
}


/* SMARTARCH_V573AC_NATIVE_RECT_TRANSFORM_SYNC_SAFE */
.graph-svg [data-smartarch-v573ac-native-rect-transform="1"].selected,
.graph-svg [data-smartarch-v573ac-polygon-style-only="1"].selected,
#graphSvg [data-smartarch-v573ac-native-rect-transform="1"].selected,
#graphSvg [data-smartarch-v573ac-polygon-style-only="1"].selected {
  fill: rgba(14, 165, 233, 0.08) !important;
  fill-opacity: 0.08 !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3px !important;
  filter: none !important;
  pointer-events: all !important;
}


/* SMARTARCH_V573AD_NEW_NODE_ISOLATION_EXACT_ID_NATIVE_SYNC */
.graph-svg [data-smartarch-v573ad-native-rect-transform="1"].selected,
.graph-svg [data-smartarch-v573ad-polygon-style-only="1"].selected,
#graphSvg [data-smartarch-v573ad-native-rect-transform="1"].selected,
#graphSvg [data-smartarch-v573ad-polygon-style-only="1"].selected {
  fill: rgba(14, 165, 233, 0.06) !important;
  fill-opacity: 0.06 !important;
  stroke: rgba(255, 212, 71, 0.98) !important;
  stroke-width: 3px !important;
  filter: none !important;
  pointer-events: all !important;
}
#graphSvg [data-smartarch-v573ad-transform-cleared="1"],
.graph-svg [data-smartarch-v573ad-transform-cleared="1"] {
  filter: none !important;
}

/* SMARTARCH_V582D_MANUAL_ANCHOR_INLINE_REFERENCE_TOGGLE_FIX */
#smartarch-sync-reference-line,[data-smartarch-ref="v582d-inline-single-reference"]{pointer-events:none!important;}


/* SMARTARCH_V573AG_EXTEND_ACTIVE_NO_BLUE_GHOST_CORE_SAFE */
#graphSvg [data-smartarch-v573ag-blue-ghost-off="1"],
.graph-svg [data-smartarch-v573ag-blue-ghost-off="1"] {
  fill: rgba(14, 165, 233, 0) !important;
  fill-opacity: 0 !important;
  filter: none !important;
}
button[data-smartarch-v573ag-extend-active="1"] {
  pointer-events: auto !important;
}


/* SMARTARCH_V573AH_EXTEND_MODE_BRIDGE_NO_BLUE_GHOST */
button[data-smartarch-v573ah-extend-mode-bridge="1"],
[data-smartarch-v573ah-extend-mode-bridge="1"] {
  pointer-events: auto !important;
}

