/* Calculator page — fullscreen app, no header/footer */
.navbar, .mobile-nav, .search-overlay, footer.footer,
.back-to-top, .whatsapp-float, .skip-to-content { display: none !important; }
body { padding-top: 0 !important; }
.mode-bar { top: 0 !important; }
.calc-hero { display: none !important; }
#modeA .calc-wrap > div:first-child { top: 60px; max-height: calc(100vh - 60px); }
#modeB .b-app-layout { height: calc(100vh - 60px); flex-direction: column; }

/* ── Hero ── */
.calc-hero {
  background: var(--dark);
  padding: 20px 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.calc-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(209, 222, 38,.06) 0%, transparent 65%);
  pointer-events: none;
}
.calc-hero .label {
  display: inline-block;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--lime);
  background: var(--lime-subtle);
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid rgba(209, 222, 38,.2);
  margin-bottom: 18px;
}
.calc-hero h1 { font-size: clamp(1.1rem,2.5vw,1.5rem); font-weight: 800; color: var(--white); margin-bottom: 4px; }
.calc-hero h1 span { color: var(--lime); }
.calc-hero p { color: rgba(255,255,255,.45); max-width: 560px; margin: 0 auto; font-size: .85rem; }
.calc-hero .label { margin-bottom: 8px; }

/* ── Mode Switcher ── */
.mode-bar {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 90;
}
.mode-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}
.mode-tab {
  flex: 1;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  position: relative;
}
.mode-tab:hover { background: var(--gray-bg); }
.mode-tab.active { border-bottom-color: var(--lime); }
.mode-tab-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gray-bg);
  display: grid; place-items: center;
  font-size: 1rem; color: var(--gray-light);
  flex-shrink: 0;
  transition: var(--transition);
}
.mode-tab.active .mode-tab-icon { background: var(--lime-subtle); color: var(--lime-dark); }
.mode-tab-text h3 { font-size: .9rem; font-weight: 700; color: var(--gray-light); transition: var(--transition); }
.mode-tab-text p { font-size: .73rem; color: var(--gray-lighter); transition: var(--transition); }
.mode-tab.active .mode-tab-text h3 { color: var(--dark); }
.mode-tab.active .mode-tab-text p { color: var(--gray); }
.mode-sep { width: 1px; background: var(--border); margin: 12px 0; align-self: stretch; }
.mode-badge {
  position: absolute; top: 10px; right: 14px;
  background: var(--lime); color: var(--dark);
  font-size: .6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 50px;
  letter-spacing: .04em;
}

/* ── Shared panel ── */
.c-panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.c-panel-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.c-panel-icon {
  width: 36px; height: 36px;
  background: var(--lime-subtle);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: .9rem; color: var(--lime-dark);
  flex-shrink: 0;
}
.c-panel-header h2 { font-size: 1rem; font-weight: 700; color: var(--dark); }
.c-panel-header p { font-size: .8rem; color: var(--gray-light); margin: 0; }
.c-panel-body { padding: 22px; }

/* ══════════════════════════════════════
   MODE A — Manual calculator
══════════════════════════════════════ */
.calc-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}
@media(max-width:960px) { .calc-wrap { grid-template-columns: 1fr; } }

.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 8px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--white);
  user-select: none;
}
.room-card:hover { border-color: var(--lime-dark); background: var(--lime-subtle); }
.room-card.selected { border-color: var(--lime); background: var(--lime-subtle); box-shadow: 0 0 0 3px rgba(209, 222, 38,.15); }
.room-card .ri { font-size: 1.4rem; margin-bottom: 4px; }
.room-card .rn { font-size: .76rem; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.room-card .rl { font-size: .68rem; color: var(--gray-light); background: var(--gray-bg); display: inline-block; padding: 1px 7px; border-radius: 50px; border: 1px solid var(--border); }
.room-card.selected .rn { color: var(--lime-dark); }
.room-card.selected .rl { background: rgba(209, 222, 38,.2); border-color: rgba(209, 222, 38,.4); color: var(--lime-dark); }

.field-grp { margin-bottom: 14px; }
.field-grp label { display: block; font-size: .82rem; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
.field-grp label span { color: var(--gray-light); font-weight: 400; }
.f-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.f-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inp-wrap { position: relative; }
.inp-wrap input, .inp-wrap select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font); font-size: .9rem;
  color: var(--dark); background: var(--white);
  transition: var(--transition); outline: none;
  -webkit-appearance: none;
}
.inp-wrap input { padding-left: 38px; }
.inp-wrap input:focus, .inp-wrap select:focus {
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(209, 222, 38,.12);
}
.inp-unit {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: .75rem; color: var(--gray-light); pointer-events: none;
}

.fix-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 50px;
  font-size: .72rem; font-weight: 600;
}
.badge-lime { background: var(--lime-subtle); color: var(--lime-dark); border: 1px solid rgba(209, 222, 38,.3); }
.badge-gray { background: var(--gray-bg); color: var(--gray); border: 1px solid var(--border); }

.no-ies {
  background: #fff8e0; border: 1px solid #ffe0a0;
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 14px;
}
.no-ies i { color: #a07000; flex-shrink: 0; margin-top: 2px; }
.no-ies p { font-size: .82rem; color: #7a5500; margin: 0; }
.no-ies strong { display: block; color: #5a3d00; margin-bottom: 2px; }

.adv-toggle {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: var(--gray);
  cursor: pointer; margin-bottom: 10px; user-select: none;
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--gray-bg); border: 1px dashed var(--border);
  transition: var(--transition);
}
.adv-toggle:hover { border-color: var(--lime-dark); color: var(--dark); background: var(--lime-subtle); }
.adv-toggle i { font-size: .7rem; transition: var(--transition); margin-right: auto; }
.adv-toggle.open { border-style: solid; border-color: rgba(209, 222, 38,.3); background: var(--lime-subtle); }
.adv-toggle.open i { transform: rotate(180deg); }
.adv-body { display: none; }
.adv-body.open { display: block; }

.sl-wrap { display: flex; align-items: center; gap: 10px; }
.sl-wrap input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px;
  background: var(--border); border-radius: 2px; outline: none;
}
.sl-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--lime); border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.sl-val { font-size: .85rem; font-weight: 700; color: var(--lime-dark); min-width: 34px; text-align: center; }

.cdiv { height: 1px; background: var(--border); margin: 16px 0; }

.btn-calc {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #d1de26 0%, #d8ff20 50%, #c0e800 100%);
  color: var(--dark);
  font-size: 1.05rem; font-weight: 800;
  border: none; border-radius: var(--radius);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 8px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(209, 222, 38,.25);
  letter-spacing: .02em;
}
.btn-calc:hover { background: linear-gradient(135deg, #d4ff20 0%, #e4ff40 50%, #ccf010 100%); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(209, 222, 38,.4); }
.btn-calc:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(209, 222, 38,.2); }
.btn-calc.loading .b-text { display: none; }
.btn-calc.loading .b-spin { display: block; }
.b-spin { display: none; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-panel { opacity: 0; transform: translateY(18px); transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.results-panel.visible { opacity: 1; transform: none; pointer-events: auto; }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.kpi {
  background: var(--gray-bg); border-radius: var(--radius-lg);
  padding: 20px; text-align: center;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.kpi.hi {
  background: var(--lime-subtle); border-color: rgba(209, 222, 38,.45);
  box-shadow: 0 4px 18px rgba(209, 222, 38,.12);
}
.kpi-val { font-size: 2.2rem; font-weight: 900; color: var(--dark); line-height: 1; margin-bottom: 4px; }
.kpi.hi .kpi-val { color: var(--lime-dark); }
.kpi-lbl { font-size: .72rem; font-weight: 700; color: var(--gray-light); text-transform: uppercase; letter-spacing: .06em; }
.kpi-sub { font-size: .7rem; color: var(--gray-light); margin-top: 3px; }

.status-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 50px; font-size: .78rem; font-weight: 700; }
.st-ok  { background: #e8f8e8; color: #1e6b1e; border: 1px solid #9dd89d; }
.st-warn{ background: #fff3cc; color: #7a4f00; border: 1px solid #f0c040; }

.gv-wrap { min-height: 180px; background: var(--gray-bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden; }
.gv-room { display: grid; background: var(--white); border: 2px solid var(--gray-lighter); border-radius: 4px; padding: 10px; position: relative; }
.gv-dot { display: grid; place-items: center; }
.gv-dot-inner { background: var(--lime); border-radius: 50%; box-shadow: 0 0 8px rgba(209, 222, 38,.6); position: relative; }
.gv-dot-inner.rect { border-radius: 20%; }   /* square/rectangular fixture */
.gv-dot-inner.sq   { border-radius: 20%; }   /* square panel (same) */
.gv-dot-inner::after { content: ''; position: absolute; width: 35%; height: 35%; background: rgba(255,255,255,.7); border-radius: 50%; top: 18%; left: 18%; }
.gv-dims { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: .65rem; color: var(--gray-lighter); }

.dtbl { width: 100%; border-collapse: collapse; }
.dtbl tr { border-bottom: 1px solid var(--border); }
.dtbl tr:last-child { border-bottom: none; }
.dtbl td { padding: 9px 4px; font-size: .84rem; }
.dtbl td:first-child { color: var(--gray); }
.dtbl td:last-child { font-weight: 700; color: var(--dark); text-align: right; }
.dtbl .hi-row td { color: var(--lime-dark); }

.empty-calc { text-align: center; padding: 64px 24px; color: var(--gray); }
.empty-calc i { font-size: 3rem; color: var(--gray-lighter); margin-bottom: 16px; display: block; }
.empty-calc h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }

.calc-note { text-align: center; padding: 0 0 60px; color: var(--gray-light); font-size: .8rem; max-width: 1280px; margin: 0 auto; padding-top: 4px; }
.calc-note a { color: var(--lime-dark); font-weight: 600; }

/* ── Lux-mode toggle (simple vs EN 12464-1) ── */
.lux-mode-toggle {
  display: flex; gap: 6px; margin-bottom: 16px;
  background: var(--gray-bg); border-radius: var(--radius); padding: 5px;
}
.lmt-btn {
  flex: 1; padding: 8px 12px; border: none; border-radius: calc(var(--radius) - 3px);
  font-family: var(--font); font-size: .8rem; font-weight: 700;
  color: var(--gray); background: transparent; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.lmt-btn.active { background: var(--white); color: var(--dark); box-shadow: 0 1px 6px rgba(0,0,0,.1); }
.lmt-btn.active i { color: var(--lime-dark); }

/* ── EN 12464 selector UI ── */
.en-version-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.en-ver-btn {
  flex: 1; padding: 7px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: .78rem; font-weight: 700;
  color: var(--gray); background: var(--white); cursor: pointer;
  transition: var(--transition); text-align: center;
}
.en-ver-btn.active { border-color: var(--lime); color: var(--dark); background: var(--lime-subtle); }

/* profile card shown when user picks a room type */
.en-profile-card {
  background: var(--lime-subtle);
  border: 1.5px solid rgba(209, 222, 38,.35);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
}
.enpc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.enpc-ref {
  font-size: .72rem; font-weight: 800; color: var(--lime-dark);
  background: rgba(209, 222, 38,.25); padding: 2px 9px; border-radius: 50px;
}
.enpc-std {
  font-size: .7rem; color: var(--gray-light);
}
.enpc-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px;
}
.enpc-kpi { text-align: center; }
.enpc-val { font-size: 1.1rem; font-weight: 900; color: var(--dark); line-height: 1; }
.enpc-lbl { font-size: .65rem; color: var(--gray-light); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.enpc-zones {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: .72rem; color: var(--gray); border-top: 1px solid rgba(209, 222, 38,.3); padding-top: 8px;
}
.enpc-zones span { display: flex; align-items: center; gap: 4px; }
.enpc-zones span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex-shrink: 0; }
.enpc-meta {
  font-size: .72rem; color: var(--gray); margin-top: 6px;
}

/* ── Result Tabs ── */
.res-tabs { display:flex; border-bottom:1.5px solid var(--border); padding:0 22px; }
.res-tab {
  padding:11px 15px; border:none; background:transparent;
  font-family:var(--font); font-size:.8rem; font-weight:600; color:var(--gray-light);
  cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-1.5px;
  transition:var(--transition); display:flex; align-items:center; gap:6px; white-space:nowrap;
}
.res-tab:hover { color:var(--dark); background:var(--gray-bg); }
.res-tab.active { color:var(--dark); border-bottom-color:var(--lime); }
.res-tab-body { display:none; }
.res-tab-body.show { display:block; }

/* ── EN 12464 table ── */
.en-tbl { width:100%; border-collapse:collapse; margin-bottom:14px; }
.en-tbl th { text-align:center; font-size:.68rem; font-weight:700; color:var(--gray-light);
  text-transform:uppercase; letter-spacing:.05em; padding:5px 7px; border-bottom:1.5px solid var(--border); }
.en-tbl th:first-child { text-align:right; }
.en-tbl td { padding:8px 7px; font-size:.83rem; color:var(--dark); border-bottom:1px solid var(--border); text-align:center; }
.en-tbl td:first-child { text-align:right; color:var(--gray); font-weight:600; }
.en-tbl tr:last-child td { border-bottom:none; }
.en-tbl .td-hi { font-weight:700; color:var(--lime-dark); }
.en-tbl .td-ok { color:#2a7a2a; font-weight:700; }
.en-tbl .td-warn { color:#a07000; font-weight:700; }

/* ── 2D Canvas — light background ── */
.cvs2d-wrap { background:#f4f5f7; position:relative; overflow:hidden; min-height:260px; }
.cvs2d-wrap canvas { display:block; width:100%; }

/* ── 3D Canvas ── */
.cvs3d-wrap { background:#d8dde8; position:relative; }
.cvs3d-wrap canvas { display:block; width:100%; cursor:grab; }
.cvs3d-wrap canvas:active { cursor:grabbing; }
.c3d-hint { position:absolute; bottom:9px; left:10px; background:rgba(0,0,0,.4);
  color:rgba(255,255,255,.85); border-radius:6px; padding:4px 9px; font-size:.65rem; backdrop-filter:blur(4px); }
.tog-row { padding:9px 16px; border-top:1px solid var(--border); display:flex;
  flex-wrap:wrap; gap:9px 16px; background:var(--gray-bg); border-bottom:1px solid var(--border); }
.res-tog { display:flex; align-items:center; gap:5px; cursor:pointer; font-size:.73rem;
  font-weight:600; color:var(--gray); user-select:none; }
.res-tog input[type=checkbox] { width:13px; height:13px; accent-color:var(--lime-dark); cursor:pointer; }
.res-tog:hover { color:var(--dark); }
.scale-bar-wrap { padding:9px 16px 13px; background:var(--white); }
.scale-bar-wrap p { font-size:.69rem; color:var(--gray-light); margin-bottom:5px; }
.scale-bar-canvas-wrap { position:relative; height:42px; }
.scale-bar-canvas-wrap canvas { position:absolute; top:0; left:0; }

/* ── 2D Heatmap scale bar, toggles & tooltip ── */
.hm-scale-wrap { padding:8px 16px 14px; background:var(--white); border-top:1px solid var(--border); }
.hm-scale-wrap p { font-size:.69rem; color:var(--gray-light); margin-bottom:5px; }
#hmScaleCanvas { width:100%; height:20px; display:block; border-radius:3px; border:1px solid rgba(0,0,0,.1); }
.hm-scale-stats {
  display:flex; justify-content:space-between; font-size:.68rem;
  color:var(--gray); margin-top:5px; flex-wrap:wrap; gap:4px;
}
.hm-scale-stats b { font-weight:700; }
.hm-contour-toggle {
  padding:7px 16px; border-top:1px solid var(--border);
  background:var(--gray-bg); display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center;
}
.hm-contour-toggle label {
  font-size:.73rem; font-weight:600; color:var(--gray);
  cursor:pointer; display:flex; align-items:center; gap:5px; user-select:none;
}
.hm-contour-toggle input[type=checkbox] { accent-color:var(--lime-dark); cursor:pointer; width:13px; height:13px; }
.hm-tooltip {
  position:absolute; pointer-events:none;
  background:rgba(10,10,20,.88); color:#fff;
  border-radius:7px; padding:5px 11px;
  font-size:.75rem; font-weight:700; white-space:nowrap;
  backdrop-filter:blur(6px); z-index:20;
  border:1px solid rgba(255,255,255,.18);
  display:none; transform:translate(12px,8px);
}

/* ── LENI energy panel ── */
.leni-box {
  background: linear-gradient(135deg, #0d1f0d 0%, #112211 100%);
  border: 1.5px solid rgba(100,200,80,.35);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-top: 14px;
}
.leni-box-header {
  display:flex; align-items:center; gap:8px; margin-bottom:12px;
}
.leni-box-icon {
  width:32px; height:32px; border-radius:8px;
  background:rgba(100,200,80,.18);
  display:grid; place-items:center; font-size:.85rem; color:#7fc;
}
.leni-box-header h3 { font-size:.9rem; font-weight:800; color:#e1e6a8; margin:0; }
.leni-box-header p { font-size:.7rem; color:rgba(180,240,140,.6); margin:0; }
.leni-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.leni-kpi { text-align:center; }
.leni-val { font-size:1.5rem; font-weight:900; color:#e1e6a8; line-height:1; }
.leni-unit { font-size:.62rem; color:rgba(150,220,110,.7); display:block; margin-top:2px; text-transform:uppercase; letter-spacing:.05em; }
.leni-bar-wrap { margin-bottom:8px; }
.leni-bar-bg { height:8px; background:rgba(255,255,255,.08); border-radius:4px; overflow:hidden; }
.leni-bar-fill { height:100%; border-radius:4px; transition:width .6s ease; }
.leni-bar-fill.ok   { background:linear-gradient(90deg,#4fc,#7f9); }
.leni-bar-fill.warn { background:linear-gradient(90deg,#ff8c00,#ffc); }
.leni-bar-fill.bad  { background:linear-gradient(90deg,#f44,#f88); }
.leni-meta { font-size:.7rem; color:rgba(150,220,110,.65); display:flex; justify-content:space-between; }
.leni-note { font-size:.69rem; color:rgba(150,200,110,.55); text-align:center; margin-top:6px; border-top:1px solid rgba(100,200,80,.15); padding-top:6px; }

/* ── BOQ — רשימת כמויות ── */
.boq-section { margin-top:14px; }
.boq-table { width:100%; border-collapse:collapse; font-size:.78rem; margin-top:10px; }
.boq-table th {
  padding:6px 8px; text-align:right; font-weight:700; font-size:.72rem;
  border-bottom:2px solid rgba(209, 222, 38,.2); color:rgba(209, 222, 38,.8); white-space:nowrap;
}
.boq-table td { padding:7px 8px; border-bottom:1px solid rgba(255,255,255,.06); vertical-align:middle; }
.boq-price-inp {
  width:90px; padding:4px 6px; border-radius:6px; font-family:var(--font);
  background:rgba(0,0,0,.3); border:1.5px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.8); font-size:.78rem; text-align:center;
}
.boq-price-inp:focus { outline:none; border-color:rgba(209, 222, 38,.4); }
.boq-total-row {
  display:flex; justify-content:space-between; align-items:center;
  margin-top:10px; padding:9px 12px;
  background:rgba(209, 222, 38,.05); border-radius:8px;
  border:1px solid rgba(209, 222, 38,.15);
}
.boq-total-lbl { font-size:.8rem; color:rgba(255,255,255,.6); font-weight:600; }
.boq-total-val { font-size:1rem; font-weight:900; color:var(--lime); }
.boq-export-btn {
  width:100%; margin-top:8px; padding:8px; border-radius:8px; cursor:pointer;
  background:transparent; border:1.5px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.5); font-size:.78rem; font-family:var(--font);
  transition:var(--transition); display:flex; align-items:center; justify-content:center; gap:6px;
}
.boq-export-btn:hover { border-color:rgba(209, 222, 38,.3); color:var(--lime); }

/* Report button */
.btn-report {
  width: 100%; padding: 13px;
  background: transparent; color: var(--dark);
  font-size: .95rem; font-weight: 800;
  border: 2px solid var(--lime); border-radius: var(--radius);
  transition: var(--transition);
  display: none;
  align-items: center; justify-content: center; gap: 9px;
  margin-top: 10px; cursor: pointer; font-family: var(--font);
}
.btn-report:hover { background: var(--lime-subtle); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(209, 222, 38,.2); }
.btn-report i { color: var(--lime-dark); font-size: 1rem; }
.rpt-project-row {
  display: none; gap: 8px; margin-top: 10px; align-items: center;
}
.rpt-project-row input {
  flex: 1; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: .85rem; color: var(--dark);
  outline: none; transition: var(--transition);
}
.rpt-project-row input:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(209, 222, 38,.12); }

/* ══════════════════════════════════════
   MODE B — PDF Drawing
══════════════════════════════════════ */
.pdf-wrap { max-width: 1280px; margin: 0 auto; }

/* Summary bar */
.sum-bar {
  background: var(--dark);
  padding: 12px 28px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sum-bar.show { display: flex; }
.sum-item { text-align: center; }
.sum-val { font-size: 1.25rem; font-weight: 900; color: var(--lime); }
.sum-lbl { font-size: .65rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }
.btn-export {
  padding: 8px 18px;
  background: var(--lime); color: var(--dark);
  font-family: var(--font); font-size: .82rem; font-weight: 800;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
}
.btn-export:hover { background: #dae552; }

/* App shell */
.app-shell {
  display: grid;
  grid-template-columns: 1fr 300px;
  height: calc(100vh - 200px);
  min-height: 560px;
}
@media(max-width:900px) { .app-shell { grid-template-columns: 1fr; height: auto; } }

/* Canvas area */
.canvas-area {
  background: #e4e4e4;
  position: relative;
  overflow: hidden;        /* clips canvas; toolbar lives here and is never clipped */
}
/* Inner scrollable pan layer — holds only the canvas */
.canvas-scroll {
  width: 100%; height: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-wrap { position: relative; display: inline-block; box-shadow: 0 8px 40px rgba(0,0,0,.2); flex-shrink: 0; }
canvas { display: block; cursor: crosshair; }

/* Toolbar — absolute inside .canvas-area (NOT inside .canvas-scroll), always visible */
.toolbar {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 20;
  pointer-events: all;
}
.tool-btn {
  width: 38px; height: 38px;
  border-radius: 8px; border: none;
  background: rgba(255,255,255,.95);
  color: var(--dark); font-size: .88rem;
  cursor: pointer; transition: var(--transition);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.tool-btn:hover, .tool-btn.active { background: var(--lime); color: var(--dark); }
.tsep { height: 1px; background: rgba(0,0,0,.08); margin: 2px 5px; }

/* Tip box */
.tip-box {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(0,0,0,.6); color: #fff;
  border-radius: 10px; padding: 8px 13px;
  font-size: .75rem; backdrop-filter: blur(6px);
  max-width: 260px;
}
.tip-box i { color: var(--lime); margin-left: 4px; }

/* Upload overlay */
.upload-ov {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(235,235,235,.97);
  z-index: 20; cursor: pointer; transition: var(--transition);
}
.upload-ov.drag { background: rgba(209, 222, 38,.07); border: 3px dashed var(--lime); }
.upload-ov i { font-size: 3.2rem; color: var(--gray-lighter); margin-bottom: 16px; transition: var(--transition); }
.upload-ov:hover i, .upload-ov.drag i { color: var(--lime-dark); }
.upload-ov h2 { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.upload-ov p { font-size: .84rem; color: var(--gray); margin-bottom: 16px; text-align: center; max-width: 280px; }
.btn-up {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; background: var(--lime); color: var(--dark);
  font-family: var(--font); font-size: .88rem; font-weight: 800;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
}
.btn-up:hover { background: #dae552; }
.fmt-row { display: flex; gap: 7px; margin-top: 10px; justify-content: center; }
.fmt { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 2px 9px; font-size: .68rem; font-weight: 600; color: var(--gray); }

/* Sidebar */
.b-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.b-sidebar-hd { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.b-sidebar-hd h2 { font-size: .93rem; font-weight: 700; color: var(--dark); }
.b-sidebar-hd p { font-size: .73rem; color: var(--gray-light); }
.b-sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }

.room-list { display: flex; flex-direction: column; gap: 10px; }

/* Building / room-group tree — organizational layer above the zone cards */
.ri-tree-building { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ri-tree-building + .ri-tree-building { margin-top: 10px; }
.ri-tree-hd {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px;
  cursor: pointer; user-select: none; transition: var(--transition);
}
.ri-tree-hd-building { background: var(--gray-bg); font-weight: 700; }
.ri-tree-hd-building:hover { background: var(--border); }
.ri-tree-hd-group { background: var(--white); border-top: 1px solid var(--border); font-weight: 600; }
.ri-tree-hd-group:hover { background: var(--gray-bg); }
.ri-tree-chevron { font-size: .62rem; color: var(--gray-light); width: 10px; flex-shrink: 0; }
.ri-tree-hd-building > .fa-building { color: var(--lime-dark); }
.ri-tree-hd-group > .fa-door-open { color: var(--gray-light); font-size: .8rem; }
.ri-tree-name { font-size: .8rem; color: var(--dark); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-tree-count {
  font-size: .64rem; color: var(--gray-light); background: var(--gray-bg);
  border-radius: 999px; padding: 1px 7px; flex-shrink: 0;
}
.ri-tree-hd-group .ri-tree-count { background: var(--border); }
.ri-tree-acts { display: flex; gap: 2px; flex-shrink: 0; }
.ri-tree-btn {
  width: 22px; height: 22px; border: none; background: transparent; border-radius: 5px;
  cursor: pointer; color: var(--gray-light); font-size: .65rem;
  transition: var(--transition); display: grid; place-items: center;
}
.ri-tree-btn:hover { background: var(--gray-bg); color: var(--dark); }
.ri-tree-btn.del:hover { background: #fee; color: #c00; }
.ri-tree-body { padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.ri-tree-group { border-top: none; }
.ri-tree-empty-msg { font-size: .68rem; color: var(--gray-light); text-align: center; padding: 8px 0; }
.ri-add-building-btn {
  width: 100%; margin-top: 4px; padding: 8px; border: 1.5px dashed var(--border); border-radius: var(--radius);
  background: transparent; color: var(--gray-light); font-size: .76rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: var(--transition);
}
.ri-add-building-btn:hover { border-color: var(--lime-dark); color: var(--lime-dark); background: var(--lime-subtle); }
.ri-move-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 11px;
  border-top: 1px solid var(--border); background: var(--gray-bg);
  font-size: .68rem; color: var(--gray-light);
}
.ri-move-select {
  flex: 1; font-size: .68rem; padding: 3px 5px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--white); color: var(--dark);
}

.ri-card { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.ri-card:hover { border-color: var(--lime-dark); }
.ri-top { display: flex; align-items: center; gap: 8px; padding: 9px 11px; background: var(--white); }
.ri-dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.ri-name { font-size: .84rem; font-weight: 700; color: var(--dark); flex: 1; }
.ri-meta { font-size: .68rem; color: var(--gray-light); }
.ri-acts { display: flex; gap: 3px; }
.ri-btn {
  width: 26px; height: 26px;
  border: none; background: transparent; border-radius: 5px;
  cursor: pointer; color: var(--gray-light); font-size: .75rem;
  transition: var(--transition); display: grid; place-items: center;
}
.ri-btn:hover { background: var(--gray-bg); color: var(--dark); }
.ri-btn.del:hover { background: #fee; color: #c00; }
.ri-result { padding: 9px 11px; background: var(--gray-bg); border-top: 1px solid var(--border); }
.ri-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 6px; }
.ri-kpi { text-align: center; }
.ri-kpi-v { font-size: 1.05rem; font-weight: 900; color: var(--lime-dark); font-variant-numeric: tabular-nums; }
.ri-kpi-l { font-size: .62rem; color: var(--gray-light); text-transform: uppercase; }
/* One status palette for the whole editor — room-card KPIs, EN-compliance
   badges, 3D layer buttons, and the report all read off these three colors
   instead of each area picking its own shade of "green"/"red". At :root
   (not scoped to #modeB) since this stylesheet loads only on this page, and
   the 3D overlay lives outside #modeB in the DOM. */
:root {
  --status-ok:    #30c060;
  --status-warn:  #d4a000;
  --status-fail:  #e05040;
}
.ri-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 50px; font-size: .66rem; font-weight: 700; }
.ri-ok { background: #e8f8e8; color: #2a7a2a; }
.ri-warn { background: #fff8e0; color: #a07000; }
.ri-en-ok   { background: rgba(40,160,80,.15);  color: var(--status-ok);   border: 1px solid rgba(40,160,80,.25); }
.ri-en-warn { background: rgba(220,170,0,.13);  color: var(--status-warn); border: 1px solid rgba(220,170,0,.25); }
.ri-en-fail { background: rgba(220,60,40,.13);  color: var(--status-fail); border: 1px solid rgba(220,60,40,.25); }

.b-sidebar-empty { text-align: center; padding: 28px 12px; color: var(--gray-light); }
.b-sidebar-empty i { font-size: 2rem; margin-bottom: 8px; display: block; }
.b-sidebar-empty p { font-size: .78rem; }

.b-sidebar-ft { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.btn-calc-all {
  width: 100%; padding: 12px;
  background: var(--lime); color: var(--dark);
  font-family: var(--font); font-size: .9rem; font-weight: 800;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-calc-all:hover { background: #dae552; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(209, 222, 38,.3); }
.btn-calc-all:disabled { background: var(--gray-bg); color: var(--gray-lighter); cursor: default; transform: none; box-shadow: none; }
.btn-new-plan {
  width: 100%; padding: 8px;
  background: transparent; color: var(--gray);
  font-family: var(--font); font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  margin-top: 7px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-new-plan:hover { background: var(--gray-bg); }

/* Modal */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 300; display: flex;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 26px; width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(14px); transition: transform .25s;
  direction: rtl;
}
.modal-bg.open .modal { transform: none; }
.modal h3 { font-size: 1rem; font-weight: 800; margin-bottom: 16px; color: var(--dark); }
.mfield { margin-bottom: 12px; }
.mfield label { display: block; font-size: .78rem; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.mfield label span { color: var(--gray-light); font-weight: 400; }
.mfield input, .mfield select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: .88rem;
  color: var(--dark); outline: none; transition: var(--transition);
  -webkit-appearance: none;
}
.mfield input:focus, .mfield select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(209, 222, 38,.12); }
.mfield-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mwrap { position: relative; }
.mwrap input { padding-left: 34px; }
.munit { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .72rem; color: var(--gray-light); }
.color-row { display: flex; gap: 7px; margin-top: 5px; }
.cdot { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; transition: var(--transition); border: 3px solid transparent; }
.cdot.sel { border-color: var(--dark); transform: scale(1.15); }
.modal-acts { display: flex; gap: 9px; margin-top: 18px; }
.m-ok { flex: 1; padding: 10px; background: var(--lime); color: var(--dark); font-family: var(--font); font-size: .88rem; font-weight: 800; border: none; border-radius: var(--radius); cursor: pointer; }
.m-ok:hover { background: #dae552; }
.m-cancel { padding: 10px 16px; background: transparent; color: var(--gray); font-family: var(--font); font-size: .85rem; font-weight: 600; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.m-cancel:hover { background: var(--gray-bg); }
.m-apply-all { padding: 10px 12px; background: transparent; color: var(--lime-dark); font-family: var(--font); font-size: .78rem; font-weight: 700; border: 1.5px dashed rgba(209, 222, 38,.5); border-radius: var(--radius); cursor: pointer; white-space: nowrap; }
.m-apply-all:hover { background: rgba(209, 222, 38,.08); }
/* Propose layout section inside modal */
.m-propose-wrap { margin: 14px 0 0; border-radius: 8px; border: 1px solid rgba(209, 222, 38,.2); background: rgba(209, 222, 38,.04); overflow:hidden; }
.m-propose-toggle { width:100%; padding:9px 12px; background:transparent; border:none; color:rgba(255,255,255,.75); font-family:var(--font); font-size:.82rem; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:8px; direction:rtl; }
.m-propose-toggle:hover { background:rgba(209, 222, 38,.07); color:var(--lime); }
.m-propose-toggle i:first-child { color:var(--lime); }
#bMProposeBody { padding: 0 12px 12px; }
.m-propose-btn { width:100%; margin-top:10px; padding:9px; border:none; border-radius:7px; background:var(--lime); color:var(--dark); font-family:var(--font); font-size:.84rem; font-weight:800; cursor:pointer; }
.m-propose-btn:hover { background:#dae552; }
/* Room card propose button */
.ri-propose-btn { width:100%; margin-top:6px; padding:6px 10px; border:1px dashed rgba(209, 222, 38,.35); border-radius:6px; background:transparent; color:rgba(209, 222, 38,.7); font-family:var(--font); font-size:.75rem; cursor:pointer; }
.ri-propose-btn:hover { background:rgba(209, 222, 38,.08); color:var(--lime); }

/* ══════════════════════════════════════
   MODE B — NEW DIALUX-STYLE LAYOUT
══════════════════════════════════════ */
#modeB { display:flex; flex-direction:column; }

/* ── App layout: column (workspace + bottom strip) ── */
.b-app-layout {
  display: flex; flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 560px; overflow: hidden;
}

/* ── Workspace row: right-icon-bar | sliding-panel | right-col ── */
.b-workspace {
  flex: 1; display: flex; flex-direction: row;
  min-height: 0; overflow: hidden;
  position: relative; /* containing block for the floating .b-side-panel */
}

/* ── Right icon bar (video-editor sidebar, 60px) ──
   order:-1 pins it to the screen's right edge in RTL flex regardless of
   DOM position — step 1 of moving the workspace chrome to the right
   (2026-07-15), canvas-maximization request. */
.b-icon-bar {
  width: 60px; flex-shrink: 0;
  background: #13131f;
  display: flex; flex-direction: column;
  align-items: center; padding: 8px 0; gap: 2px;
  border-left: 1px solid rgba(255,255,255,.06);
  order: -1;
}
.b-icon-btn {
  width: 52px; padding: 8px 4px 6px;
  background: none; border: none; border-radius: 8px;
  color: rgba(255,255,255,.38); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font); font-size: .58rem; line-height: 1;
  transition: all .14s; position: relative;
}
.b-icon-btn i { font-size: .95rem; }
.b-icon-btn:hover { color: rgba(255,255,255,.75); background: rgba(255,255,255,.07); }
.b-icon-btn.active { color: var(--lime); background: rgba(209, 222, 38,.08); }
.b-icon-btn.active::after {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 2.5px; height: 55%; background: var(--lime); border-radius: 2px 0 0 2px;
}
.b-icon-sep { width: 32px; height: 1px; background: rgba(255,255,255,.08); margin: 4px 0; }

/* ── Floating panel (opens from icon bar) — step 2 of the canvas-maximization
   request (2026-07-15): used to be a flex sibling that permanently reserved
   272px of layout width even while closed/open, shrinking the canvas. Now it
   floats above the canvas (position:absolute within .b-workspace) so the
   canvas always gets the full available width regardless of panel state. ── */
.b-side-panel {
  position: absolute; top: 0; bottom: 0; right: 60px; /* 60px = icon-bar width */
  width: 0; overflow: hidden;
  background: #1a1a2d;
  transition: width .2s ease;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.06);
  box-shadow: -8px 0 24px rgba(0,0,0,.18);
  z-index: 30;
}
.b-side-panel.open { width: 272px; }

/* ── Right column: topbar + canvas ── */
.b-right-col {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}
.b-right-col .canvas-area { flex: 1; min-height: 0; }

/* ── Topbar: drawing tools bar (id=bToolbar) — a column of one or two
   .b-tbar-row rows (row 1 = 2D tools, always visible; row 2 = 3D tools,
   id=bToolbar3D, shown only while the 3D view is open). Each row keeps the
   exact flex-row layout .b-topbar used to have directly. ── */
.b-topbar {
  display: flex; flex-direction: column;
  background: #1e2030;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.b-tbar-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; min-height: 46px;
}
.b-tbar-row + .b-tbar-row { border-top: 1px solid rgba(255,255,255,.05); }
.b-tbar-left { display: flex; align-items: center; gap: 4px; }
.b-tbar-group {
  display: flex; align-items: center; gap: 1px;
  background: rgba(255,255,255,.05); border-radius: 8px; padding: 3px;
}
.b-tbar-sep { width: 1px; height: 26px; background: rgba(255,255,255,.1); margin: 0 4px; }
.b-tbtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 8px; border: none; background: transparent; border-radius: 6px;
  color: rgba(255,255,255,.45); cursor: pointer; font-family: var(--font);
  line-height: 1; transition: all .12s; white-space: nowrap;
}
.b-tbtn i { font-size: .85rem; }
.b-tbtn span { font-size: .58rem; }
.b-tbtn:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.b-tbtn.active, .b-tbtn.open { background: rgba(150,200,0,.15); color: var(--lime); }
#b3dLayer_failZones.active { background: rgba(224,80,64,.16); color: var(--status-fail); }
.b-tbar-right { display: flex; align-items: center; gap: 7px; margin-right: auto; flex-shrink: 0; }

/* ── Status bar — minimal, always-visible live project state under the canvas ── */
.b-statusbar {
  display: flex; align-items: center; gap: 10px;
  padding: 3px 14px; height: 22px;
  background: #17181f; border-top: 1px solid rgba(255,255,255,.06);
  font-size: .64rem; color: rgba(255,255,255,.4); flex-shrink: 0;
  font-variant-numeric: tabular-nums; overflow: hidden;
}
.b-sb-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.b-sb-item i { font-size: .6rem; opacity: .75; }
.b-sb-sep { width: 1px; height: 10px; background: rgba(255,255,255,.1); flex-shrink: 0; }
.b-sb-fill { flex: 1; }
#modeB .b-statusbar { background: #F8F9FC; border-top-color: #EEF0F8; color: #9CA3AF; }
#modeB .b-sb-sep { background: #E2E5F0; }

.b-proj-input {
  padding: 6px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px;
  font-family: var(--font); font-size: .78rem; outline: none; min-width: 150px;
  color: rgba(255,255,255,.8); background: rgba(255,255,255,.07);
}
.b-proj-input::placeholder { color: rgba(255,255,255,.25); }
.b-proj-input:focus { border-color: var(--lime); }

/* ── Bottom strip: project BOQ (id=bSumBar, shown by JS classList.add('show')) ── */
#bSumBar { display: none; }
#bSumBar.show { display: flex; }
.b-bottom-strip {
  flex-shrink: 0; align-items: center; gap: 0;
  background: #111320;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 0 12px; min-height: 80px; overflow-x: auto;
}
.b-bot-stats {
  display: flex; align-items: center; gap: 0;
  flex-shrink: 0; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.08);
}
.b-bot-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 16px; border-right: 1px solid rgba(255,255,255,.06);
}
.b-bot-val { font-size: 1.1rem; font-weight: 900; color: var(--lime); line-height: 1; }
.b-bot-chip small { font-size: .58rem; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .06em; }
.b-bot-divider { width: 1px; height: 50px; background: rgba(255,255,255,.07); margin: 0 8px; flex-shrink: 0; }
.b-bot-boq {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px; overflow-x: auto; min-width: 0;
}
.b-bot-hint { font-size: .72rem; color: rgba(255,255,255,.22); font-style: italic; }
.b-bot-fix-card {
  flex-shrink: 0; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 8px 14px; min-width: 120px;
  display: flex; flex-direction: column; gap: 3px;
}
.b-bot-fix-name { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.b-bot-fix-meta { font-size: .64rem; color: rgba(255,255,255,.35); }
.b-bot-fix-count { font-size: .9rem; font-weight: 900; color: var(--lime); }
.b-bot-boq-export {
  flex-shrink: 0; margin-inline-start: 8px; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  background: var(--lime); border: 1.5px solid var(--lime);
  color: var(--dark); font-size: .78rem; font-family: var(--font); font-weight: 800;
  display: flex; align-items: center; gap: 7px; white-space: nowrap; transition: var(--transition);
  box-shadow: 0 2px 10px rgba(209, 222, 38,.25);
}
.b-bot-boq-export:hover { background: var(--lime-dark); border-color: var(--lime-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(209, 222, 38,.35); }

.b-fix-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: .82rem; }
.b-fix-details-grid .fdg-item { display: flex; flex-direction: column; gap: 2px; }
.b-fix-details-grid .fdg-label { font-size: .64rem; color: var(--gray-light); text-transform: uppercase; letter-spacing: .04em; }
.b-fix-details-grid .fdg-val { font-weight: 700; color: var(--dark); }
.b-fix-info-btn {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
#modeB .b-fix-info-btn { border-color: #E2E5EE; color: #B0B8CC; }
#modeB .b-fix-info-btn:hover { border-color: var(--lime-dark); color: var(--lime-dark); }
.b-fix-info-btn:hover { border-color: var(--lime); color: var(--lime); }

.b-panel-sec { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.b-panel-sec.active { display: flex; }

.b-panel-hd {
  padding: 13px 13px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.b-panel-hd h3 {
  font-size: .86rem; font-weight: 700; color: rgba(255,255,255,.88);
  margin: 0 0 5px; display: flex; align-items: center; gap: 7px;
}
.b-panel-hd h3 i { color: var(--lime); font-size: .78rem; }
.b-panel-hd p { font-size: .7rem; color: rgba(255,255,255,.35); margin: 0; }

.b-panel-search { margin-top: 8px; }
.b-panel-search input {
  width: 100%; padding: 7px 10px; box-sizing: border-box;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; color: rgba(255,255,255,.85);
  font-family: var(--font); font-size: .79rem; outline: none;
  transition: border-color .14s;
}
.b-panel-search input::placeholder { color: rgba(255,255,255,.28); }
.b-panel-search input:focus { border-color: var(--lime); }

.b-ies-upload-btn {
  width: 100%; margin-top: 8px; padding: 7px 10px; box-sizing: border-box;
  background: transparent; border: 1px dashed rgba(255,255,255,.2); border-radius: 6px;
  color: rgba(255,255,255,.5); font-family: var(--font); font-size: .74rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: var(--transition);
}
.b-ies-upload-btn:hover { border-color: var(--lime); color: var(--lime-dark); background: var(--lime-subtle); }

.b-panel-body {
  flex: 1; overflow-y: auto; padding: 5px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
}
.b-panel-ft { padding: 10px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }

/* Results panel — project-wide report/review view */
.b-res-block { padding: 4px 6px 10px; }
.b-res-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.b-res-stat { text-align: center; background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px 4px; }
.b-res-stat-v { font-size: 1.1rem; font-weight: 900; color: var(--lime); font-variant-numeric: tabular-nums; }
.b-res-stat-l { font-size: .6rem; color: rgba(255,255,255,.4); text-transform: uppercase; margin-top: 2px; }
.b-res-summary { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.b-res-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; }
.b-res-warn-hd { font-size: .72rem; font-weight: 800; color: var(--status-warn); margin: 4px 2px 6px; display: flex; align-items: center; gap: 6px; }
.b-res-warn-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.b-res-warn-row {
  display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 7px;
  background: rgba(224,80,64,.08); border: 1px solid rgba(224,80,64,.18);
  cursor: pointer; transition: background .12s;
}
.b-res-warn-row:hover { background: rgba(224,80,64,.16); }
.b-res-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.b-res-warn-name { font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.85); flex-shrink: 0; }
.b-res-warn-crits { font-size: .64rem; color: rgba(255,255,255,.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-res-allgood { text-align: center; font-size: .78rem; color: var(--status-ok); padding: 10px; margin-bottom: 12px; }
.b-res-report-btn {
  width: 100%; padding: 10px; background: var(--lime); color: var(--dark);
  border: none; border-radius: var(--radius); font-family: var(--font);
  font-size: .85rem; font-weight: 800; cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 8px; transition: background .12s;
}
.b-res-report-btn:hover { background: #dae552; }

/* Fixture list */
.b-fix-cat { margin-bottom: 2px; }
.b-fix-cat-hd {
  font-size: .67rem; font-weight: 700; color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .09em;
  padding: 7px 7px 3px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.b-fix-cat-hd:hover { color: rgba(255,255,255,.55); }
.b-fix-cat-hd .b-chevron { font-size: .58rem; transition: transform .14s; }
.b-fix-cat.collapsed .b-chevron { transform: rotate(-90deg); }
.b-fix-cat.collapsed .b-fix-items { display: none; }

.b-fix-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 7px; border-radius: 6px; cursor: pointer;
  transition: background .11s; margin-bottom: 1px;
  border: 1px solid transparent;
}
.b-fix-item:hover { background: rgba(255,255,255,.05); }
.b-fix-item.active {
  background: rgba(209, 222, 38,.1); border-color: rgba(209, 222, 38,.22);
}
.b-fix-icon {
  width: 26px; height: 26px; background: rgba(255,255,255,.06);
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: rgba(255,255,255,.45); font-size: .75rem;
}
.b-fix-item.active .b-fix-icon { background: rgba(209, 222, 38,.14); color: var(--lime); }
.b-fix-info { flex: 1; min-width: 0; }
.b-fix-name { font-size: .77rem; font-weight: 600; color: rgba(255,255,255,.83); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-fix-meta { font-size: .66rem; color: rgba(255,255,255,.35); }

/* Arrangement sub-panel */
.b-panel-arrange {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 10px 10px 12px;
  flex-shrink: 0; background: rgba(0,0,0,.18);
}
.b-active-fix-row {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--lime); font-weight: 700;
  margin-bottom: 10px; white-space: nowrap; overflow: hidden;
}
.b-active-fix-row i { flex-shrink: 0; }
.b-active-fix-row span { overflow: hidden; text-overflow: ellipsis; }

.b-arrange-ctrl { display: flex; flex-direction: column; gap: 7px; }
.b-arrange-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .77rem; color: rgba(255,255,255,.6);
}
.b-counter {
  display: flex; align-items: center;
  background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
}
.b-counter button {
  width: 24px; height: 26px; background: none; border: none;
  color: rgba(255,255,255,.65); font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s;
}
.b-counter button:hover { background: rgba(255,255,255,.1); color: #fff; }
.b-counter input[type=number] {
  width: 36px; height: 26px; background: none; border: none;
  color: rgba(255,255,255,.9); font-family: var(--font);
  font-size: .82rem; font-weight: 700; text-align: center; outline: none;
  -moz-appearance: textfield;
}
.b-counter input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.b-btn-arrange {
  width: 100%; padding: 9px; margin-top: 4px;
  background: var(--lime); color: var(--dark);
  font-family: var(--font); font-size: .81rem; font-weight: 800;
  border: none; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .13s;
}
.b-btn-arrange:hover { background: #dae552; }
.b-btn-arrange.active-tool { background: #ff9500; color: #fff; }

/* Arrangement tool list (5 buttons like DIALux) */
.b-arr-tools { display:flex; flex-direction:column; gap:3px; margin:8px 0 10px; }
.b-arr-tool {
  width:100%; padding:8px 10px; box-sizing:border-box;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
  border-radius:6px; color:rgba(255,255,255,.62);
  font-family:var(--font); font-size:.78rem; cursor:pointer;
  text-align:right; direction:rtl;
  display:flex; align-items:center; gap:9px;
  transition:all .12s;
}
.b-arr-tool:hover { background:rgba(255,255,255,.1); color:rgba(255,255,255,.9); border-color:rgba(255,255,255,.2); }
.b-arr-tool.active-tool { background:rgba(209, 222, 38,.14); border-color:rgba(209, 222, 38,.35); color:var(--lime); }
.b-arr-tool i { width:15px; text-align:center; font-size:.8rem; flex-shrink:0; }
.b-arr-tool.select-tool { border-color:rgba(100,200,255,.25); color:rgba(100,200,255,.7); }
.b-arr-tool.select-tool:hover { background:rgba(100,200,255,.1); color:rgba(100,200,255,.95); }
.b-arr-tool.select-tool.active-tool { background:rgba(100,200,255,.14); border-color:rgba(100,200,255,.4); color:#64c8ff; }

/* Edit panel for selected arrangement */
.b-arr-edit-panel {
  margin-top:8px; padding:10px 11px; border-radius:7px;
  background:rgba(100,200,255,.07); border:1px solid rgba(100,200,255,.22);
}
.b-arr-edit-hd {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:8px;
}
.b-arr-edit-name { font-size:.76rem; color:#64c8ff; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:140px; }
.b-arr-del-btn {
  padding:3px 9px; border-radius:5px; border:1px solid rgba(240,80,80,.45);
  background:rgba(240,80,80,.12); color:#f05050; font-size:.72rem; cursor:pointer;
  transition:all .12s; font-family:var(--font); flex-shrink:0;
}
.b-arr-del-btn:hover { background:rgba(240,80,80,.28); border-color:#f05050; }
.b-arr-edit-sec { margin-top:4px; }
.b-arr-edit-sec label { display:block; font-size:.72rem; color:rgba(255,255,255,.5); margin-bottom:3px; }

/* Canvas region */
.b-canvas-region { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.b-canvas-region .canvas-area { flex: 1; min-height: 0; }

/* Override .b-sidebar-empty for dark panels */
.b-panel-body .b-sidebar-empty { color: rgba(255,255,255,.3); padding: 32px 12px; }
.b-panel-body .b-sidebar-empty i { color: rgba(209, 222, 38,.35); }
.b-panel-body .b-sidebar-empty p { color: rgba(255,255,255,.3); }

/* ── 3D Viewer overlay ── */
.b3d-overlay {
  /* Was position:fixed;inset:0 (covered the whole viewport). Now lives
     inside #bCanvasArea (position:relative) and fills just that region —
     step one of merging 2D/3D into one workspace area instead of a
     separate full-screen mode. Needs to beat the 2D toolbar/upload-overlay
     siblings inside .canvas-area (z-index:20) — but NOT the floating
     .b-side-panel (z-index:30, "אזורים מסומנים" etc.), which sits in a
     different DOM branch but lands in the same stacking context (neither
     .b-workspace nor #bCanvasArea establishes its own, since position
     alone without z-index doesn't). 25 sits strictly between the two. */
  position: absolute; inset: 0; z-index: 25;
  background: #1a1e26; display: none; flex-direction: column;
}
.b3d-overlay.b3dOpen { display: flex; }
.b3d-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: rgba(0,0,0,.55); border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.b3d-title { color: #d8e4b8; font-weight: 700; font-size: .95rem; margin-right: auto; direction: rtl; }
.b3d-btn {
  padding: 5px 13px; border-radius: 6px; border: 1px solid rgba(201, 208, 113,.35);
  background: rgba(201, 208, 113,.12); color: #c9d071; font-size: .78rem;
  cursor: pointer; transition: all .12s; font-family: var(--font);
}
.b3d-btn:hover { background: rgba(201, 208, 113,.28); border-color: #c9d071; }
.b3d-close {
  padding: 5px 13px; border-radius: 6px; border: 1px solid rgba(240,80,80,.35);
  background: rgba(240,80,80,.12); color: #f05050; font-size: .78rem;
  cursor: pointer; transition: all .12s; font-family: var(--font);
}
.b3d-close:hover { background: rgba(240,80,80,.28); border-color: #f05050; }
.b3d-layer-btn {
  padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14);
  background: transparent; color: rgba(255,255,255,.4); font-size: .76rem;
  cursor: pointer; transition: all .12s; font-family: var(--font);
}
.b3d-layer-btn:hover { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.7); }
.b3d-layer-btn.active-3d {
  background: rgba(201, 208, 113,.16); border-color: #c9d071; color: #c9d071;
}
.b3d-layer-btn-warn.active-3d {
  background: rgba(224,80,64,.16); border-color: var(--status-fail); color: var(--status-fail);
}
.b3d-canvas-wrap { flex: 1; position: relative; overflow: hidden; }
#b3dCanvas { display: block; width: 100%; height: 100%; }
.b3d-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(26,30,38,.8); color: #c9d071; font-size: .9rem; gap: 10px; pointer-events: none;
}
.b3d-legend {
  position: absolute; left: 14px; bottom: 18px; z-index: 5;
  flex-direction: row; align-items: stretch; gap: 8px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px 12px; pointer-events: none;
}
.b3d-legend-bar { width: 12px; border-radius: 4px; }
.b3d-legend-labels {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: .68rem; color: rgba(255,255,255,.75); font-weight: 600;
}
.b3d-fixture-info {
  position: absolute; top: 14px; left: 14px; z-index: 5; pointer-events: none;
  background: rgba(100,200,255,.16); border: 1px solid rgba(100,200,255,.5);
  border-radius: 6px; padding: 6px 12px; font-size: .74rem; font-weight: 700;
  color: #a8dcff;
}
.b3d-open-btn {
  margin-top: 8px; width: 100%; padding: 8px 14px;
  background: rgba(201, 208, 113,.15); border: 1px solid rgba(201, 208, 113,.4);
  border-radius: 6px; color: #c9d071; cursor: pointer; font-family: var(--font);
  font-size: .83rem; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.b3d-open-btn:hover { background: rgba(201, 208, 113,.28); }

/* ── 3D edit panel & mode toolbar ── */
.b3d-main { display: flex; flex: 1; overflow: hidden; }
.b3d-side {
  width: 220px; min-width: 220px; background: #151820;
  border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .18s, min-width .18s;
}
.b3d-side.collapsed { width: 0; min-width: 0; }
.b3d-side-hd {
  padding: 10px 12px; font-size: .78rem; font-weight: 700;
  color: #c9d071; border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 8px; direction: rtl;
  flex-shrink: 0;
}
.b3d-side-scroll {
  flex: 1; overflow-y: auto; padding: 8px 6px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.b3d-fcat { margin-bottom: 10px; }
.b3d-fcat-hd {
  font-size: .68rem; color: #667; padding: 4px 6px 3px;
  text-align: right; letter-spacing: .04em; text-transform: uppercase;
}
.b3d-fi {
  display: flex; align-items: center; gap: 8px; direction: rtl;
  padding: 6px 8px; border-radius: 5px; cursor: pointer;
  color: #bdc0ca; font-size: .78rem;
  border: 1px solid transparent; transition: all .12s;
}
.b3d-fi:hover { background: rgba(201, 208, 113,.1); border-color: rgba(201, 208, 113,.2); color: #c9d071; }
.b3d-fi.active-3d { background: rgba(201, 208, 113,.2); border-color: rgba(201, 208, 113,.5); color: #e8f4a0; }
.b3d-fi i { width: 16px; text-align: center; font-size: .7rem; flex-shrink: 0; }
.b3d-sel-bar {
  padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.08);
  display: none; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.b3d-sel-bar.visible { display: flex; }
.b3d-sel-name { font-size: .73rem; color: #a0a4b0; text-align: right; direction: rtl; }
.b3d-sel-btns { display: flex; gap: 5px; justify-content: flex-end; }
.b3d-sel-btn {
  padding: 4px 9px; border-radius: 4px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #bbb; font-size: .72rem; cursor: pointer;
  transition: all .12s; display: flex; align-items: center; gap: 4px;
}
.b3d-sel-btn:hover { background: rgba(255,255,255,.14); }
.b3d-sel-btn.sm-active { background: rgba(100,160,255,.22); border-color: rgba(100,160,255,.5); color: #a0c4ff; }
.b3d-sel-btn.del-btn { color: #ff8888; }
.b3d-sel-btn.del-btn:hover { background: rgba(255,80,80,.18); border-color: rgba(255,80,80,.4); }
.b3d-place-tip {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(20,24,34,.92); border: 1px solid rgba(201, 208, 113,.45);
  color: #c9d071; padding: 7px 20px; border-radius: 20px;
  font-size: .79rem; pointer-events: none; white-space: nowrap; display: none;
}
.b3d-mode-sep { width: 1px; height: 20px; background: rgba(255,255,255,.14); margin: 0 3px; flex-shrink: 0; }
.b3d-modeBtn {
  padding: 5px 10px; border-radius: 5px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: #bbb; font-size: .77rem; cursor: pointer;
  transition: all .12s; display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.b3d-modeBtn:hover { background: rgba(255,255,255,.14); color: #ddd; }
.b3d-modeBtn.active { background: rgba(100,160,255,.2); border-color: rgba(100,160,255,.5); color: #a0c4ff; }
.b3d-modeBtn.del-mode:hover { background: rgba(255,80,80,.18); border-color: rgba(255,80,80,.4); color: #ff8888; }
.b3d-furn-toggle {
  padding: 5px 11px; border-radius: 5px; border: 1px solid rgba(201, 208, 113,.3);
  background: rgba(201, 208, 113,.08); color: #c9d071; font-size: .77rem; cursor: pointer;
  transition: all .12s; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.b3d-furn-toggle:hover { background: rgba(201, 208, 113,.16); }
.b3d-furn-toggle.open { background: rgba(201, 208, 113,.22); border-color: rgba(201, 208, 113,.55); }

/* ══════════════════════════════════════════════════
   DARK EDITOR REDESIGN — Mode A
   Left column: dark settings sidebar (like DIALux / Figma)
   Right column: clean results workspace
══════════════════════════════════════════════════ */

/* Workspace background */
#modeA { background: #0e1117; }

/* Expand calc-wrap to fill workspace edge-to-edge */
#modeA .calc-wrap {
  max-width: 100%;
  padding: 0;
  gap: 0;
  grid-template-columns: 400px 1fr;
  align-items: stretch;
}

/* ── Left sidebar — dark settings panel ── */
#modeA .calc-wrap > div:first-child {
  background: #141922;
  border-right: 1px solid rgba(255,255,255,.07);
  padding: 24px 18px 80px;
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
#modeA .calc-wrap > div:first-child::-webkit-scrollbar { width: 4px; }
#modeA .calc-wrap > div:first-child::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* Step counter badges */
#modeA .calc-wrap > div:first-child { counter-reset: step-panel; }
#modeA .calc-wrap > div:first-child .c-panel { counter-increment: step-panel; }
#modeA .calc-wrap > div:first-child .c-panel .c-panel-icon { position: relative; }
#modeA .calc-wrap > div:first-child .c-panel .c-panel-icon::after {
  content: counter(step-panel);
  position: absolute; top: -5px; right: -5px;
  width: 17px; height: 17px;
  background: var(--lime); color: #000;
  font-size: .62rem; font-weight: 900;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid #141922;
  line-height: 1;
}

/* Panel cards inside dark sidebar */
#modeA .calc-wrap > div:first-child .c-panel {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
  margin-bottom: 10px;
}
#modeA .calc-wrap > div:first-child .c-panel:last-of-type { margin-bottom: 0; }

/* Panel header dark */
#modeA .calc-wrap > div:first-child .c-panel-header {
  border-bottom-color: rgba(255,255,255,.06);
  padding: 13px 15px 11px;
  gap: 12px;
}
#modeA .calc-wrap > div:first-child .c-panel-header h2 {
  color: rgba(255,255,255,.88);
  font-size: .92rem; font-weight: 700;
}
#modeA .calc-wrap > div:first-child .c-panel-header p { color: rgba(255,255,255,.32); }

/* Panel icon dark */
#modeA .calc-wrap > div:first-child .c-panel-icon {
  background: rgba(209, 222, 38,.1);
  color: var(--lime);
}

/* Panel body dark */
#modeA .calc-wrap > div:first-child .c-panel-body { padding: 13px 15px; }

/* Room cards dark */
#modeA .room-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.09);
  padding: 11px 6px;
}
#modeA .room-card .ri { font-size: 1.3rem; margin-bottom: 4px; }
#modeA .room-card .rn { color: rgba(255,255,255,.8); }
#modeA .room-card .rl {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.4);
}
#modeA .room-card:hover {
  background: rgba(209, 222, 38,.07);
  border-color: rgba(209, 222, 38,.3);
}
#modeA .room-card:hover .rn { color: var(--lime); }
#modeA .room-card:active { transform: scale(.97); }
#modeA .room-card.selected {
  background: rgba(209, 222, 38,.12);
  border-color: rgba(209, 222, 38,.5);
  box-shadow: 0 0 0 2px rgba(209, 222, 38,.12);
}
#modeA .room-card.selected .rn { color: var(--lime); }
#modeA .room-card.selected .rl {
  background: rgba(209, 222, 38,.18); border-color: rgba(209, 222, 38,.4); color: var(--lime);
}

/* Inputs dark */
#modeA .calc-wrap > div:first-child .inp-wrap input,
#modeA .calc-wrap > div:first-child .inp-wrap select {
  background: rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
}
#modeA .calc-wrap > div:first-child .inp-wrap input:focus,
#modeA .calc-wrap > div:first-child .inp-wrap select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(209, 222, 38,.12);
  background: rgba(0,0,0,.5);
}
#modeA .calc-wrap > div:first-child .inp-wrap input::placeholder { color: rgba(255,255,255,.22); }
#modeA .calc-wrap > div:first-child .inp-unit { color: rgba(255,255,255,.3); }

/* Labels dark */
#modeA .calc-wrap > div:first-child .field-grp label { color: rgba(255,255,255,.55); font-size: .8rem; }
#modeA .calc-wrap > div:first-child .field-grp label span { color: rgba(255,255,255,.27); }

/* Lux mode toggle dark */
#modeA .lux-mode-toggle { background: rgba(0,0,0,.3); }
#modeA .lmt-btn { color: rgba(255,255,255,.4); }
#modeA .lmt-btn.active { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); box-shadow: none; }
#modeA .lmt-btn.active i { color: var(--lime); }

/* EN version buttons dark */
#modeA .en-ver-btn {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.55);
}
#modeA .en-ver-btn.active {
  background: rgba(209, 222, 38,.12); border-color: rgba(209, 222, 38,.45); color: var(--lime);
}

/* Selects dark (option background) */
#modeA .calc-wrap > div:first-child select option { background: #1e2530; color: rgba(255,255,255,.85); }

/* Advanced toggle dark */
#modeA .adv-toggle {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.45);
}
#modeA .adv-toggle:hover { background: rgba(209, 222, 38,.07); border-color: rgba(209, 222, 38,.3); color: var(--lime); }
#modeA .adv-toggle.open { background: rgba(209, 222, 38,.08); border-color: rgba(209, 222, 38,.3); color: rgba(255,255,255,.8); }

/* Divider dark */
#modeA .calc-wrap > div:first-child .cdiv { background: rgba(255,255,255,.07); }

/* Slider track dark */
#modeA .sl-wrap input[type=range] { background: rgba(255,255,255,.12); }
#modeA .sl-val { color: var(--lime); }

/* Badges dark */
#modeA .calc-wrap > div:first-child .badge-gray { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.1); }
#modeA .calc-wrap > div:first-child .badge-lime { background: rgba(209, 222, 38,.12); color: var(--lime); }

/* No-IES warning dark */
#modeA .no-ies { background: rgba(255,200,50,.07); border-color: rgba(255,200,50,.2); }
#modeA .no-ies i { color: #f0c040; }
#modeA .no-ies p { color: rgba(255,220,100,.7); }
#modeA .no-ies strong { color: #f0d060; }

/* EN profile card dark */
#modeA .en-profile-card {
  background: rgba(209, 222, 38,.07); border-color: rgba(209, 222, 38,.2);
}
#modeA .enpc-val { color: rgba(255,255,255,.9); }
#modeA .enpc-lbl, #modeA .enpc-std, #modeA .enpc-zones, #modeA .enpc-meta { color: rgba(255,255,255,.4); }
#modeA .enpc-ref { background: rgba(209, 222, 38,.15); color: var(--lime); }

/* Calc button — full prominent CTA */
#modeA .btn-calc {
  background: linear-gradient(135deg, #d1de26 0%, #d4ff20 60%, #bcdc00 100%);
  box-shadow: 0 6px 24px rgba(209, 222, 38,.35), inset 0 1px 0 rgba(255,255,255,.25);
  font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
}
#modeA .btn-calc:hover {
  background: linear-gradient(135deg, #d4ff20 0%, #e0ff40 60%, #c8ec10 100%);
  box-shadow: 0 12px 36px rgba(209, 222, 38,.5), inset 0 1px 0 rgba(255,255,255,.3);
  transform: translateY(-2px);
}

/* ── Right panel — clean results workspace ── */
#modeA .calc-wrap > div:last-child {
  background: #f4f6fa;
  padding: 32px 28px 80px;
  min-height: calc(100vh - 110px);
}

/* Results c-panels stay white */
#modeA .calc-wrap > div:last-child .c-panel { background: #fff; }

/* Empty state on right */
#modeA .empty-calc {
  padding: 80px 24px;
  color: #9aa3b2;
}
#modeA .empty-calc i { color: #c8cdd8; font-size: 3.5rem; margin-bottom: 20px; }
#modeA .empty-calc h3 { color: #5a6272; }

/* KPI cards */
#modeA .kpi-grid { gap: 14px; }
#modeA .kpi { border-radius: 14px; }
#modeA .kpi.hi {
  background: var(--lime-subtle); border-color: rgba(209, 222, 38,.45);
  box-shadow: 0 4px 20px rgba(209, 222, 38,.14);
}

/* Status badges */
#modeA .st { padding: 6px 14px; font-size: .8rem; }
#modeA .st-ok  { background: #edfaed; color: #1a6b1a; border-color: #8ed88e; }
#modeA .st-warn { background: #fff3cc; color: #6e4400; border-color: #e8b800; }

/* Results table */
#modeA .dtbl td:first-child { font-size: .8rem; color: #7a8290; }
#modeA .dtbl td:last-child { text-align: right; }

/* LENI bar pulse */
.leni-bar-fill.ok { animation: leni-pulse 3s ease-in-out infinite; }
@keyframes leni-pulse { 0%,100%{opacity:1} 50%{opacity:.8} }

/* Mode switcher — highlight active more */
.mode-tab.active .mode-tab-icon { box-shadow: 0 2px 12px rgba(209, 222, 38,.25); }
.mode-tab.active { background: rgba(209, 222, 38,.03); }

/* Report button stays brand */
.btn-report { font-family: var(--font); }

@media(max-width:960px) {
  #modeA .calc-wrap { grid-template-columns: 1fr; }
  #modeA .calc-wrap > div:first-child {
    position: static; max-height: none; overflow: visible;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,.07);
  }
  #modeA .calc-wrap > div:last-child { min-height: auto; }
}

/* ══════════════════════════════════════════════════
   MODE B — LIGHT PROFESSIONAL EDITOR
   Inspired by Spline / Framer — white panels, lavender canvas
══════════════════════════════════════════════════ */

#modeB { background: #EAECF5; }

/* ── Stats bar — white clean ── */
#modeB .sum-bar {
  background: #fff;
  border-bottom: 1px solid #E2E5F0;
  padding: 8px 22px; gap: 0;
  box-shadow: 0 1px 6px rgba(60,70,130,.08);
}
#modeB .sum-item {
  padding: 4px 20px;
  border-right: 1px solid #E8EBF4;
  flex-shrink: 0;
}
#modeB .sum-item:first-child { padding-right: 0; }
#modeB .sum-val { font-size: 1.4rem; font-weight: 900; color: #111827; letter-spacing: -.01em; }
#modeB .sum-lbl { font-size: .6rem; letter-spacing: .1em; color: #9CA3AF; margin-top: 1px; }
#modeB #bRptProjectName {
  border-color: #E2E5F0 !important;
  background: #F6F8FF !important;
  color: #374151 !important;
  border-radius: 8px !important;
}
#modeB #bRptProjectName:focus {
  border-color: #8BAE00 !important;
  box-shadow: 0 0 0 3px rgba(160,200,0,.12);
}
#modeB .btn-export {
  background: linear-gradient(135deg, #d1de26, #d8ff18);
  color: #1A1D2E; font-weight: 800;
  font-size: .8rem; letter-spacing: .04em; border-radius: 8px;
  box-shadow: 0 3px 12px rgba(160,200,0,.35);
}
#modeB .btn-export:hover { box-shadow: 0 6px 20px rgba(160,200,0,.5); transform: translateY(-1px); }

/* ── Icon bar — white with lime active ── */
#modeB .b-icon-bar {
  background: #fff;
  border-left: 1px solid #E8EBF4;
}
#modeB .b-icon-btn { color: #C8CDD8; }
#modeB .b-icon-btn:hover { background: #F4F6FF; color: #6B7280; }
#modeB .b-icon-btn.active { background: rgba(150,200,0,.1); color: #4D6A00; }
#modeB .b-icon-btn.active::after { background: #7A9E00; }
#modeB .b-icon-sep { background: #EEF0F8; }

/* ── Side panel — white clean, slides from right ── */
#modeB .b-side-panel { background: #fff; border-left: 1px solid #E2E5F0; box-shadow: -8px 0 24px rgba(60,70,130,.12); }
#modeB .b-side-panel.open { width: 272px; }
#modeB .b-panel-hd { background: #FAFBFE; border-bottom: 1px solid #F0F2F8; }
#modeB .b-panel-hd h3 { color: #111827; font-size: .84rem; font-weight: 800; }
#modeB .b-panel-hd h3 i { color: #6A9000; }
#modeB .b-panel-hd p { color: #9CA3AF; }

/* Search */
#modeB .b-panel-search input {
  background: #F4F6FF; border-color: #E2E5EE; color: #374151;
}
#modeB .b-panel-search input::placeholder { color: #B8BECE; }
#modeB .b-panel-search input:focus { border-color: rgba(130,180,0,.5); background: #fff; }
#modeB .b-ies-upload-btn { border-color: #D7DAE4; color: #8A93A8; }
#modeB .b-ies-upload-btn:hover { border-color: var(--lime-dark); color: var(--lime-dark); background: var(--lime-subtle); }

/* Panel body + empty states */
#modeB .b-panel-body { scrollbar-color: #E0E4F0 transparent; }
#modeB .b-panel-body .b-sidebar-empty { color: #9CA3AF; padding: 32px 12px; }
#modeB .b-panel-body .b-sidebar-empty i { color: #D0D4E8; font-size: 2rem; margin-bottom: 8px; display: block; }
#modeB .b-panel-body .b-sidebar-empty p { color: #B0B8CC; }

/* Category headers */
#modeB .b-fix-cat-hd { color: #9CA3AF; }
#modeB .b-fix-cat-hd:hover { color: #6B7280; }

/* Fixture list items */
#modeB .b-fix-item { border-color: transparent; }
#modeB .b-fix-item:hover { background: #F4F6FF; border-color: transparent; }
#modeB .b-fix-item.active { background: rgba(150,200,0,.1); border-color: rgba(130,180,0,.3); }
#modeB .b-fix-item.active .b-fix-name { color: #3D5C00; }
#modeB .b-fix-item.active .b-fix-icon { background: rgba(160,210,0,.18); color: #5E8000; }
#modeB .b-fix-icon { background: #F0F2F8; color: #B0B8CC; }
#modeB .b-fix-name { color: #374151; }
#modeB .b-fix-meta { color: #B0B8CC; }

/* Arrange panel */
#modeB .b-panel-arrange { background: #F6F8FC; border-top-color: #EEF0F8; }
#modeB .b-active-fix-row { color: #4D6A00; }
#modeB .b-arrange-row { color: #6B7280; }
#modeB .b-counter { background: #fff; border-color: #E2E5EE; }
#modeB .b-counter button { color: #9CA3AF; }
#modeB .b-counter button:hover { background: #F4F6FF; color: #374151; }
#modeB .b-counter input[type=number] { color: #374151; }

/* Arrangement tools */
#modeB .b-arr-tool { background: #fff; border-color: #E2E5EE; color: #6B7280; }
#modeB .b-arr-tool:hover { background: #F4F6FF; border-color: #D4D8E8; color: #374151; }
#modeB .b-arr-tool.active-tool { background: rgba(150,200,0,.1); border-color: rgba(130,180,0,.4); color: #3D5C00; }
#modeB .b-arr-tool.select-tool { border-color: rgba(80,140,240,.25); color: rgba(50,100,200,.75); }
#modeB .b-arr-tool.select-tool:hover { background: rgba(80,140,240,.07); color: rgba(40,90,200,1); }
#modeB .b-arr-tool.select-tool.active-tool { background: rgba(80,140,240,.1); border-color: rgba(80,140,240,.4); color: #2060CC; }
#modeB .b-arr-edit-panel { background: rgba(80,140,240,.05); border-color: rgba(80,140,240,.18); }
#modeB .b-arr-edit-name { color: #2060CC; }
#modeB .b-arr-del-btn { border-color: rgba(210,40,40,.3); background: rgba(210,40,40,.05); color: #CC2020; }
#modeB .b-arr-del-btn:hover { background: rgba(210,40,40,.12); }
#modeB .b-arr-edit-sec label { color: #9CA3AF; }

/* Room result cards */
#modeB .ri-card { background: #fff; border-color: #E8EBF4; box-shadow: 0 1px 4px rgba(60,70,130,.05); }
#modeB .ri-card:hover { border-color: rgba(130,180,0,.4); box-shadow: 0 4px 14px rgba(60,70,130,.09); }
#modeB .ri-top { background: #fff; }
#modeB .ri-name { color: #111827; }
#modeB .ri-meta { color: #9CA3AF; }
#modeB .ri-result { background: #F8F9FC; border-top-color: #EEF0F8; }
#modeB .ri-kpi-v { color: #4D6A00; }
#modeB .ri-kpi-l { color: #9CA3AF; }
#modeB .ri-btn { color: #C8CDD8; }
#modeB .ri-btn:hover { background: #F4F6FF; color: #6B7280; }
#modeB .ri-btn.del:hover { background: #FEF2F2; color: #DC2626; }
#modeB .ri-ok { background: #F0FDF4; color: #166534; }
#modeB .ri-warn { background: #FEFCE8; color: #854D0E; }

/* Building / room-group tree */
#modeB .ri-tree-building { background: #fff; border-color: #E8EBF4; }
#modeB .ri-tree-hd-building { background: #F6F8FC; }
#modeB .ri-tree-hd-building:hover { background: #EEF1FA; }
#modeB .ri-tree-hd-group { background: #fff; border-top-color: #EEF0F8; }
#modeB .ri-tree-hd-group:hover { background: #F6F8FC; }
#modeB .ri-tree-chevron { color: #9CA3AF; }
#modeB .ri-tree-hd-group > .fa-door-open { color: #9CA3AF; }
#modeB .ri-tree-name { color: #111827; }
#modeB .ri-tree-count { color: #9CA3AF; background: #EEF1FA; }
#modeB .ri-tree-hd-group .ri-tree-count { background: #E2E5EE; }
#modeB .ri-tree-btn { color: #C8CDD8; }
#modeB .ri-tree-btn:hover { background: #F4F6FF; color: #6B7280; }
#modeB .ri-tree-btn.del:hover { background: #FEF2F2; color: #DC2626; }
#modeB .ri-add-building-btn { border-color: #D4D8E8; color: #9CA3AF; }
#modeB .ri-add-building-btn:hover { border-color: #9AA419; color: #4D6A00; background: rgba(209,222,38,.08); }
#modeB .ri-move-row { background: #F8F9FC; border-top-color: #EEF0F8; color: #9CA3AF; }
#modeB .ri-move-select { background: #fff; border-color: #E2E5EE; color: #374151; }

/* Panel footer */
#modeB .b-panel-ft { border-top-color: #EEF0F8; background: #FAFBFE; }
#modeB .btn-calc-all {
  background: linear-gradient(135deg, #d1de26, #d8ff18); color: #1A1D2E;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .83rem;
  box-shadow: 0 4px 16px rgba(160,200,0,.35);
}
#modeB .btn-calc-all:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(160,200,0,.5); transform: translateY(-1px);
}
#modeB .btn-new-plan { border-color: #E2E5EE; color: #9CA3AF; background: transparent; }
#modeB .btn-new-plan:hover { background: #F4F6FF; color: #6B7280; }
#modeB .b3d-open-btn { background: rgba(80,110,220,.08); border-color: rgba(80,110,220,.2); color: #3050B0; }
#modeB .b3d-open-btn:hover { background: rgba(80,110,220,.14); }

/* ── Canvas — light lavender workspace (like Spline/Framer) ── */
#modeB .canvas-area {
  background: #E8EBF8;
  background-image:
    linear-gradient(rgba(100,110,180,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,110,180,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
#modeB .canvas-wrap {
  box-shadow: 0 12px 44px rgba(60,70,130,.18), 0 0 0 1px rgba(100,110,180,.12);
  border-radius: 4px;
}

/* ── Upload overlay — clean light drop zone ── */
#modeB .upload-ov {
  background: #E8EBF8;
  border: 2px dashed #C0C5DC;
}
#modeB .upload-ov:hover { background: #E2E5F4; border-color: rgba(130,180,0,.45); }
#modeB .upload-ov.drag { background: rgba(150,200,0,.04); border-color: #7A9E00; }
#modeB .upload-ov i { color: #BCC0D8; font-size: 4rem; }
#modeB .upload-ov:hover i, #modeB .upload-ov.drag i { color: #6A9000; }
#modeB .upload-ov h2 { color: #111827; font-size: 1.3rem; font-weight: 800; }
#modeB .upload-ov > p { color: #6B7280; }
#modeB .btn-up {
  background: linear-gradient(135deg, #d1de26, #d8ff18);
  color: #1A1D2E; font-size: .95rem; font-weight: 800;
  padding: 13px 34px; border-radius: 12px; border: none;
  box-shadow: 0 6px 20px rgba(160,200,0,.42);
}
#modeB .btn-up:hover { box-shadow: 0 10px 28px rgba(160,200,0,.58); transform: translateY(-2px); }
#modeB .fmt { background: #fff; border-color: #DDE0EE; color: #8890A4; box-shadow: 0 1px 3px rgba(0,0,0,.05); }

/* ── Topbar — white horizontal editor bar ── */
#modeB .b-topbar {
  background: #fff;
  border-bottom: 1px solid #E2E5F0;
  box-shadow: 0 1px 6px rgba(60,70,130,.07);
}
#modeB .b-tbar-group { background: #F4F6FA; }
#modeB .b-tbar-sep { background: #E2E5F0; }
#modeB .b-tbar-row + .b-tbar-row { border-top-color: #EEF0F8; }
#modeB .b-tbtn { color: #9CA3AF; }
#modeB .b-tbtn:hover { background: #EEF0FA; color: #374151; }
#modeB .b-tbtn.active, #modeB .b-tbtn.open { background: rgba(150,200,0,.13); color: #4D6A00; }
#modeB .b-proj-input {
  border-color: #E2E5F0; color: #374151; background: #F8F9FC;
}
#modeB .b-proj-input:focus { border-color: #8BAE00; background: #fff; }

/* ── Bottom strip — white BOQ ── */
#modeB .b-bottom-strip {
  background: #fff; border-top: 1px solid #EEF0F8;
  box-shadow: 0 -2px 10px rgba(60,70,130,.06);
}
#modeB .b-bot-chip { border-right-color: #EEF0F8; }
#modeB .b-bot-val { color: #4D6A00; }
#modeB .b-bot-chip small { color: #9CA3AF; }
#modeB .b-bot-divider { background: #EEF0F8; }
#modeB .b-bot-hint { color: #B0B8CC; }
#modeB .b-bot-fix-card { background: #F8F9FD; border-color: #E8EBF4; }
#modeB .b-bot-fix-name { color: #374151; }
#modeB .b-bot-fix-meta { color: #9CA3AF; }
#modeB .b-bot-fix-count { color: #4D6A00; }

/* Tip box */
#modeB .tip-box {
  background: rgba(17,24,39,.9); border: none;
  color: rgba(255,255,255,.88); border-radius: 10px;
  backdrop-filter: blur(8px);
}
#modeB .tip-box i { color: #d1de26; }
#modeB #bSidebarSub { color: #9CA3AF; }

/* ══════════════════════════════════════════════
   CALC TOPBAR — slim sticky app header
══════════════════════════════════════════════ */
.calc-topbar {
  position: sticky; top: 0; z-index: 200;
  height: 50px;
  background: #080c12;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center;
  padding: 0 20px; gap: 14px;
}
.ctp-brand {
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0; text-decoration: none;
}
.ctp-logo {
  width: 28px; height: 28px; background: var(--lime);
  border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
}
.ctp-logo svg { width: 15px; height: 15px; }
.ctp-title {
  font-size: .8rem; font-weight: 700;
  color: rgba(255,255,255,.5); letter-spacing: .06em; text-transform: uppercase;
}
.ctp-sep { width: 1px; height: 20px; background: rgba(255,255,255,.09); flex-shrink: 0; }
.ctp-status { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.ctp-idle { font-size: .74rem; color: rgba(255,255,255,.18); }
.ctp-result { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; }
.ctp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 50px;
  font-size: .72rem; font-weight: 700;
  border: 1px solid transparent;
}
.ctp-chip-main { background: rgba(209, 222, 38,.1); color: var(--lime); border-color: rgba(209, 222, 38,.22); }
.ctp-chip-sec  { background: rgba(255,255,255,.05); color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.09); }
.ctp-chip-warn { background: rgba(240,160,0,.1); color: #f0c050; border-color: rgba(240,160,0,.22); }
.ctp-actions { flex-shrink: 0; display: flex; gap: 6px; }
.ctp-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  background: transparent; border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.45); font-family: var(--font); font-size: .72rem; font-weight: 600;
  cursor: pointer; transition: all .18s;
}
.ctp-btn:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.8); }
.ctp-btn-primary { background: rgba(209, 222, 38,.09) !important; border-color: rgba(209, 222, 38,.25) !important; color: var(--lime) !important; }
.ctp-btn-primary:hover { background: rgba(209, 222, 38,.17) !important; box-shadow: 0 0 14px rgba(209, 222, 38,.13) !important; }

/* ── Fix sticky offsets (mode-bar hidden; topbar = 50px) ── */
#modeA .calc-wrap > div:first-child { top: 50px !important; }
#modeB .b-app-layout { height: calc(100vh - 50px) !important; }
@media(min-width:961px) {
  #modeA .calc-wrap > div:first-child { max-height: calc(100vh - 50px) !important; }
  #modeA .calc-wrap > div:last-child  { min-height: calc(100vh - 50px) !important; }
}
@media(max-width:960px) {
  #modeA .calc-wrap > div:first-child { max-height: none !important; }
  #modeA .calc-wrap > div:last-child  { min-height: auto !important; }
}

/* ── Dark right column (results area) ── */
#modeA .calc-wrap > div:last-child {
  background: #0e1117 !important;
  padding: 24px 24px 80px !important;
}
#modeA .calc-wrap > div:last-child .c-panel {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}
#modeA .calc-wrap > div:last-child .c-panel-header { border-bottom-color: rgba(255,255,255,.07) !important; }
#modeA .calc-wrap > div:last-child .c-panel-header h2 { color: rgba(255,255,255,.88) !important; }
#modeA .calc-wrap > div:last-child .c-panel-header p  { color: rgba(255,255,255,.32) !important; }
#modeA .calc-wrap > div:last-child .c-panel-icon { background: rgba(209, 222, 38,.1) !important; color: var(--lime) !important; }

/* ── KPI cards on dark ── */
#modeA .kpi {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
}
#modeA .kpi.hi {
  background: rgba(209, 222, 38,.07) !important;
  border-color: rgba(209, 222, 38,.2) !important;
  box-shadow: 0 0 28px rgba(209, 222, 38,.06) !important;
}
#modeA .kpi-val { color: rgba(255,255,255,.88) !important; font-size: 2rem !important; font-weight: 900 !important; }
#modeA .kpi.hi .kpi-val { color: var(--lime) !important; }
#modeA .kpi-lbl { color: rgba(255,255,255,.35) !important; }
#modeA .kpi-sub { color: rgba(255,255,255,.22) !important; }

/* Uniformity ring */
.uni-ring-wrap { position: relative; width: 64px; height: 64px; margin: 0 auto 6px; }
.uni-ring-wrap svg { transform: rotate(-90deg); display: block; }
.uni-ring-bg   { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 5; }
.uni-ring-fill {
  fill: none; stroke: #d1de26; stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset .7s cubic-bezier(.16,1,.3,1), stroke .3s;
}
.uni-ring-fill.uni-warn { stroke: #f0c050; }
.uni-ring-fill.uni-bad  { stroke: #f05050; }
.uni-ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.uni-ring-val .kpi-val { font-size: .8rem !important; }

/* ── Status row on dark ── */
#modeA .st { padding: 5px 12px; font-size: .75rem; }
#modeA .st-ok   { background: rgba(40,160,80,.13) !important; color: #56dd86 !important; border-color: rgba(40,160,80,.28) !important; }
#modeA .st-warn { background: rgba(220,160,0,.11) !important; color: #f0c050 !important; border-color: rgba(220,160,0,.25) !important; }

/* ── EN table on dark ── */
#modeA .en-tbl th { color: rgba(255,255,255,.28) !important; border-bottom-color: rgba(255,255,255,.08) !important; }
#modeA .en-tbl td { color: rgba(255,255,255,.7) !important; border-bottom-color: rgba(255,255,255,.05) !important; }
#modeA .en-tbl td:first-child { color: rgba(255,255,255,.38) !important; }
#modeA .en-tbl .td-hi   { color: var(--lime) !important; font-weight: 800 !important; }
#modeA .en-tbl .td-ok   { color: #56dd86 !important; }
#modeA .en-tbl .td-warn { color: #f0c050 !important; }

/* ── Details table on dark ── */
#modeA .dtbl tr { border-bottom-color: rgba(255,255,255,.06) !important; }
#modeA .dtbl td:first-child { color: rgba(255,255,255,.3) !important; font-size: .79rem; }
#modeA .dtbl td:last-child  { color: rgba(255,255,255,.82) !important; text-align: right; }
#modeA .dtbl .hi-row td { color: var(--lime) !important; font-weight: 700; }

/* ── Results tabs on dark ── */
#modeA .res-tabs { border-bottom-color: rgba(255,255,255,.07) !important; padding: 0 16px; }
#modeA .res-tab  { color: rgba(255,255,255,.3) !important; }
#modeA .res-tab:hover { color: rgba(255,255,255,.65) !important; background: rgba(255,255,255,.04) !important; }
#modeA .res-tab.active { color: rgba(255,255,255,.88) !important; border-bottom-color: var(--lime) !important; }
#modeA .res-tab.active i { color: var(--lime) !important; }

/* ── Advanced toggle (results side) on dark ── */
#modeA .calc-wrap > div:last-child .adv-toggle {
  background: rgba(255,255,255,.03) !important; border-color: rgba(255,255,255,.09) !important;
  color: rgba(255,255,255,.35) !important;
}
#modeA .calc-wrap > div:last-child .adv-toggle:hover {
  background: rgba(209, 222, 38,.06) !important; border-color: rgba(209, 222, 38,.28) !important;
  color: rgba(255,255,255,.68) !important;
}

/* ── LENI box on dark ── */
#modeA #rLeniBox { background: rgba(209, 222, 38,.05) !important; border-color: rgba(209, 222, 38,.18) !important; }
#modeA #leniValue { color: var(--lime) !important; }
#modeA .leni-label { color: rgba(255,255,255,.38) !important; }
#modeA .leni-bar   { background: rgba(255,255,255,.08) !important; }

/* ── Report button on dark ── */
#modeA .btn-report { border-color: rgba(209, 222, 38,.28) !important; color: rgba(255,255,255,.65) !important; background: transparent !important; }
#modeA .btn-report:hover { background: rgba(209, 222, 38,.08) !important; border-color: rgba(209, 222, 38,.48) !important; color: var(--lime) !important; }
#modeA #rptProjectRow input { background: rgba(0,0,0,.3) !important; border-color: rgba(255,255,255,.12) !important; color: rgba(255,255,255,.8) !important; }
#modeA #rptProjectRow input::placeholder { color: rgba(255,255,255,.2) !important; }

/* ── Calc note footer on dark ── */
.calc-note { background: #0e1117 !important; color: rgba(255,255,255,.2) !important; padding: 8px 24px 32px !important; }
.calc-note a { color: rgba(209, 222, 38,.6) !important; }

/* ── Empty state on dark ── */
#modeA .empty-calc { padding: 60px 24px 80px !important; background: transparent !important; }
#modeA .empty-calc i  { color: rgba(255,255,255,.07) !important; font-size: 4rem; margin-bottom: 16px; }
#modeA .empty-calc h3 { color: rgba(255,255,255,.42) !important; font-size: 1.05rem; font-weight: 700; }
#modeA .empty-calc p  { color: rgba(255,255,255,.18) !important; }

/* ── Fixture preview card ── */
.fix-preview {
  background: rgba(209, 222, 38,.06); border: 1px solid rgba(209, 222, 38,.18);
  border-radius: 10px; padding: 11px 13px; margin-top: 8px;
  animation: fp-in .2s ease;
}
@keyframes fp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fp-name {
  font-size: .76rem; font-weight: 700; color: var(--lime);
  margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fp-stats { display: flex; }
.fp-stat { flex: 1; text-align: center; padding: 2px 4px; }
.fp-stat + .fp-stat { border-left: 1px solid rgba(209, 222, 38,.12); }
.fp-val { font-size: .9rem; font-weight: 800; color: rgba(255,255,255,.82); line-height: 1; }
.fp-lbl { font-size: .59rem; color: rgba(255,255,255,.28); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

@media(max-width:960px) {
  .calc-topbar { padding: 0 12px; }
  .ctp-title, .ctp-sep { display: none; }
}

/* ════════════════════════════════════════════════
   LIGHT MODE (מצב יום) — body.calc-light overrides
════════════════════════════════════════════════ */

/* Topbar */
body.calc-light .calc-topbar { background: #fff !important; border-bottom-color: #e5e8f0 !important; }
body.calc-light .ctp-title { color: rgba(0,0,0,.42) !important; }
body.calc-light .ctp-sep   { background: #e5e8f0 !important; }
body.calc-light .ctp-idle  { color: rgba(0,0,0,.28) !important; }
body.calc-light .ctp-chip-main { background: rgba(160,210,0,.14) !important; color: #4d6a00 !important; border-color: rgba(140,190,0,.35) !important; }
body.calc-light .ctp-chip-sec  { background: rgba(0,0,0,.04) !important; color: rgba(0,0,0,.48) !important; border-color: rgba(0,0,0,.1) !important; }
body.calc-light .ctp-chip-warn { background: rgba(200,130,0,.1) !important; color: #b06000 !important; border-color: rgba(200,130,0,.25) !important; }
body.calc-light .ctp-btn { border-color: rgba(0,0,0,.14) !important; color: rgba(0,0,0,.42) !important; background: transparent !important; }
body.calc-light .ctp-btn:hover { background: rgba(0,0,0,.04) !important; border-color: rgba(0,0,0,.22) !important; color: rgba(0,0,0,.7) !important; }
body.calc-light .ctp-btn-primary { background: rgba(160,210,0,.1) !important; border-color: rgba(140,190,0,.38) !important; color: #4d6a00 !important; }
body.calc-light .ctp-btn-primary:hover { background: rgba(160,210,0,.18) !important; box-shadow: none !important; }

/* Mode A wrapper */
body.calc-light #modeA { background: #eef0f8 !important; }

/* Left sidebar */
body.calc-light #modeA .calc-wrap > div:first-child {
  background: #fff !important; border-right-color: #e2e6f0 !important;
  scrollbar-color: rgba(0,0,0,.1) transparent !important;
}
body.calc-light #modeA .calc-wrap > div:first-child .c-panel {
  background: #fff !important; border-color: #e8ecf5 !important;
}
body.calc-light #modeA .calc-wrap > div:first-child .c-panel .c-panel-icon::after { border-color: #fff !important; }
body.calc-light #modeA .calc-wrap > div:first-child .c-panel-header { border-bottom-color: #eef0f8 !important; }
body.calc-light #modeA .calc-wrap > div:first-child .c-panel-header h2 { color: #1a1d2e !important; }
body.calc-light #modeA .calc-wrap > div:first-child .c-panel-header p  { color: #9ca3af !important; }
body.calc-light #modeA .calc-wrap > div:first-child .c-panel-icon { background: rgba(160,210,0,.1) !important; color: #4d6a00 !important; }

/* Room cards */
body.calc-light #modeA .room-card { background: #f8f9fc !important; border-color: #dde1ee !important; }
body.calc-light #modeA .room-card .rn { color: #374151 !important; }
body.calc-light #modeA .room-card .rl { background: #f0f2f8 !important; border-color: #dde1ee !important; color: #9ca3af !important; }
body.calc-light #modeA .room-card:hover { background: rgba(160,210,0,.06) !important; border-color: rgba(120,180,0,.38) !important; }
body.calc-light #modeA .room-card:hover .rn { color: #3d5c00 !important; }
body.calc-light #modeA .room-card.selected { background: rgba(160,210,0,.12) !important; border-color: rgba(120,180,0,.55) !important; box-shadow: 0 0 0 2px rgba(120,180,0,.12) !important; }
body.calc-light #modeA .room-card.selected .rn { color: #3d5c00 !important; }
body.calc-light #modeA .room-card.selected .rl { background: rgba(160,210,0,.18) !important; border-color: rgba(120,180,0,.45) !important; color: #4d6a00 !important; }

/* Inputs */
body.calc-light #modeA .calc-wrap > div:first-child .inp-wrap input,
body.calc-light #modeA .calc-wrap > div:first-child .inp-wrap select {
  background: #fff !important; border-color: #d4d8e8 !important; color: #1a1d2e !important;
}
body.calc-light #modeA .calc-wrap > div:first-child .inp-wrap input:focus,
body.calc-light #modeA .calc-wrap > div:first-child .inp-wrap select:focus {
  border-color: #7a9e00 !important; box-shadow: 0 0 0 3px rgba(120,180,0,.1) !important; background: #fff !important;
}
body.calc-light #modeA .calc-wrap > div:first-child .inp-wrap input::placeholder { color: #b0b8cc !important; }
body.calc-light #modeA .calc-wrap > div:first-child .inp-unit { color: #9ca3af !important; }
body.calc-light #modeA .calc-wrap > div:first-child .field-grp label { color: #6b7280 !important; }
body.calc-light #modeA .calc-wrap > div:first-child .field-grp label span { color: #b0b8cc !important; }
body.calc-light #modeA .calc-wrap > div:first-child select option { background: #fff !important; color: #1a1d2e !important; }

/* Lux mode toggle */
body.calc-light #modeA .lux-mode-toggle { background: #eef0f8 !important; }
body.calc-light #modeA .lmt-btn { color: #9ca3af !important; }
body.calc-light #modeA .lmt-btn.active { background: #fff !important; color: #1a1d2e !important; box-shadow: 0 1px 4px rgba(0,0,0,.08) !important; }
body.calc-light #modeA .lmt-btn.active i { color: #4d6a00 !important; }

/* EN version buttons */
body.calc-light #modeA .en-ver-btn { background: #f4f6ff !important; border-color: #dde1f0 !important; color: #6b7280 !important; }
body.calc-light #modeA .en-ver-btn.active { background: rgba(140,190,0,.12) !important; border-color: rgba(120,180,0,.45) !important; color: #3d5c00 !important; }

/* Adv toggle (form) */
body.calc-light #modeA .adv-toggle { background: #f4f6ff !important; border-color: #dde1f0 !important; color: #9ca3af !important; }
body.calc-light #modeA .adv-toggle:hover { background: rgba(140,190,0,.06) !important; border-color: rgba(120,180,0,.35) !important; color: #3d5c00 !important; }
body.calc-light #modeA .adv-toggle.open { background: rgba(140,190,0,.08) !important; border-color: rgba(120,180,0,.3) !important; color: #374151 !important; }

/* Misc form elements */
body.calc-light #modeA .calc-wrap > div:first-child .cdiv { background: #e8ecf5 !important; }
body.calc-light #modeA .sl-wrap input[type=range] { background: #dde1f0 !important; }
body.calc-light #modeA .sl-val { color: #3d5c00 !important; }
body.calc-light #modeA .calc-wrap > div:first-child .badge-gray { background: #f0f2f8 !important; color: #6b7280 !important; border-color: #dde1f0 !important; }
body.calc-light #modeA .calc-wrap > div:first-child .badge-lime { background: rgba(140,190,0,.1) !important; color: #3d5c00 !important; }
body.calc-light #modeA .no-ies { background: rgba(220,160,0,.07) !important; border-color: rgba(180,130,0,.2) !important; }
body.calc-light #modeA .no-ies i { color: #a07800 !important; }
body.calc-light #modeA .no-ies p, body.calc-light #modeA .no-ies strong { color: #7a5c00 !important; }
body.calc-light #modeA .en-profile-card { background: rgba(140,190,0,.07) !important; border-color: rgba(120,180,0,.2) !important; }
body.calc-light #modeA .enpc-val { color: #1a1d2e !important; }
body.calc-light #modeA .enpc-lbl, body.calc-light #modeA .enpc-std,
body.calc-light #modeA .enpc-zones, body.calc-light #modeA .enpc-meta { color: #9ca3af !important; }
body.calc-light #modeA .enpc-ref { background: rgba(140,190,0,.14) !important; color: #3d5c00 !important; }

/* Right column */
body.calc-light #modeA .calc-wrap > div:last-child { background: #eef0f8 !important; }
body.calc-light #modeA .calc-wrap > div:last-child .c-panel { background: #fff !important; border-color: #e8ecf5 !important; box-shadow: 0 1px 6px rgba(0,0,20,.05) !important; }
body.calc-light #modeA .calc-wrap > div:last-child .c-panel-header { border-bottom-color: #eef0f8 !important; }
body.calc-light #modeA .calc-wrap > div:last-child .c-panel-header h2 { color: #1a1d2e !important; }
body.calc-light #modeA .calc-wrap > div:last-child .c-panel-header p  { color: #9ca3af !important; }
body.calc-light #modeA .calc-wrap > div:last-child .c-panel-icon { background: rgba(140,190,0,.1) !important; color: #4d6a00 !important; }

/* KPI cards */
body.calc-light #modeA .kpi { background: #fff !important; border-color: #e8ecf5 !important; box-shadow: 0 1px 4px rgba(0,0,20,.04) !important; }
body.calc-light #modeA .kpi.hi { background: var(--lime-subtle) !important; border-color: rgba(160,210,0,.38) !important; box-shadow: 0 2px 12px rgba(160,210,0,.1) !important; }
body.calc-light #modeA .kpi-val { color: #1a1d2e !important; }
body.calc-light #modeA .kpi.hi .kpi-val { color: #3d5c00 !important; }
body.calc-light #modeA .kpi-lbl { color: #6b7280 !important; }
body.calc-light #modeA .kpi-sub { color: #9ca3af !important; }
body.calc-light .uni-ring-bg { stroke: rgba(0,0,0,.07) !important; }
body.calc-light .uni-ring-fill { stroke: #6a9000 !important; }
body.calc-light .uni-ring-fill.uni-warn { stroke: #a07000 !important; }
body.calc-light .uni-ring-fill.uni-bad  { stroke: #b81c1c !important; }
body.calc-light .uni-ring-val .kpi-val { color: #1a1d2e !important; }

/* Status row */
body.calc-light #modeA .st-ok   { background: #edfaed !important; color: #1a6b1a !important; border-color: #8ed88e !important; }
body.calc-light #modeA .st-warn { background: #fff3cc !important; color: #6e4400 !important; border-color: #e8b800 !important; }

/* EN + Details tables */
body.calc-light #modeA .en-tbl th { color: #9ca3af !important; border-bottom-color: #e8ecf5 !important; }
body.calc-light #modeA .en-tbl td { color: #374151 !important; border-bottom-color: #f0f2f8 !important; }
body.calc-light #modeA .en-tbl td:first-child { color: #6b7280 !important; }
body.calc-light #modeA .en-tbl .td-hi   { color: #3d5c00 !important; }
body.calc-light #modeA .en-tbl .td-ok   { color: #166534 !important; }
body.calc-light #modeA .en-tbl .td-warn { color: #854d0e !important; }
body.calc-light #modeA .dtbl tr { border-bottom-color: #f0f2f8 !important; }
body.calc-light #modeA .dtbl td:first-child { color: #9ca3af !important; }
body.calc-light #modeA .dtbl td:last-child  { color: #1a1d2e !important; }
body.calc-light #modeA .dtbl .hi-row td { color: #3d5c00 !important; }

/* Results tabs */
body.calc-light #modeA .res-tabs { border-bottom-color: #e8ecf5 !important; }
body.calc-light #modeA .res-tab  { color: #9ca3af !important; }
body.calc-light #modeA .res-tab:hover { color: #374151 !important; background: #f4f6ff !important; }
body.calc-light #modeA .res-tab.active { color: #1a1d2e !important; border-bottom-color: #6a9000 !important; }
body.calc-light #modeA .res-tab.active i { color: #6a9000 !important; }

/* Adv toggle (results) */
body.calc-light #modeA .calc-wrap > div:last-child .adv-toggle { background: #f4f6ff !important; border-color: #dde1f0 !important; color: #9ca3af !important; }
body.calc-light #modeA .calc-wrap > div:last-child .adv-toggle:hover { background: rgba(140,190,0,.06) !important; border-color: rgba(120,180,0,.35) !important; color: #3d5c00 !important; }

/* LENI */
body.calc-light #modeA #rLeniBox { background: rgba(140,190,0,.07) !important; border-color: rgba(120,180,0,.22) !important; }
body.calc-light #modeA #leniValue { color: #3d5c00 !important; }
body.calc-light #modeA .leni-label { color: #6b7280 !important; }
body.calc-light #modeA .leni-bar   { background: #e0e4f0 !important; }

/* Report */
body.calc-light #modeA .btn-report { border-color: rgba(120,180,0,.35) !important; color: #374151 !important; background: transparent !important; }
body.calc-light #modeA .btn-report:hover { background: rgba(140,190,0,.07) !important; border-color: rgba(120,180,0,.5) !important; color: #3d5c00 !important; }
body.calc-light #modeA #rptProjectRow input { background: #fff !important; border-color: #dde1f0 !important; color: #1a1d2e !important; }
body.calc-light #modeA #rptProjectRow input::placeholder { color: #b0b8cc !important; }
/* BOQ light mode */
body.calc-light #modeA .boq-table th { color:#3d5c00 !important; border-color:rgba(100,150,0,.25) !important; }
body.calc-light #modeA .boq-table td { border-color:rgba(0,0,0,.08) !important; color:#374151 !important; }
body.calc-light #modeA .boq-price-inp { background:#fff !important; border-color:#dde1f0 !important; color:#1a1d2e !important; }
body.calc-light #modeA .boq-total-row { background:rgba(120,170,0,.06) !important; border-color:rgba(100,150,0,.2) !important; }
body.calc-light #modeA .boq-total-lbl { color:#374151 !important; }
body.calc-light #modeA .boq-total-val { color:#3d5c00 !important; }
body.calc-light #modeA .boq-export-btn { border-color:#dde1f0 !important; color:#9ca3af !important; }
body.calc-light #modeA .boq-export-btn:hover { border-color:rgba(100,150,0,.4) !important; color:#3d5c00 !important; }

/* Calc note footer */
body.calc-light .calc-note { background: #eef0f8 !important; color: #9ca3af !important; }
body.calc-light .calc-note a { color: #4d6a00 !important; }

/* Empty state */
body.calc-light #modeA .empty-calc i  { color: #c8cdd8 !important; }
body.calc-light #modeA .empty-calc h3 { color: #5a6272 !important; }
body.calc-light #modeA .empty-calc p  { color: #9aa3b2 !important; }

/* Fixture preview card */
body.calc-light .fix-preview { background: rgba(140,190,0,.07) !important; border-color: rgba(120,180,0,.25) !important; }
body.calc-light .fp-name { color: #3d5c00 !important; }
body.calc-light .fp-val  { color: #1a1d2e !important; }
body.calc-light .fp-lbl  { color: #9ca3af !important; }
body.calc-light .fp-stat + .fp-stat { border-left-color: rgba(120,180,0,.18) !important; }

/* ══════════════════════════════════════
   REFLECTANCE SELECTOR (מישורים)
══════════════════════════════════════ */
.refl-pills {
  display: flex; gap: 5px; margin-bottom: 7px;
}
.refl-pill {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 5px; padding: 8px 4px 7px;
  border-radius: 9px; border: 1.5px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); color: rgba(255,255,255,.4);
  font-family: var(--font); font-size: .72rem; font-weight: 600;
  cursor: pointer; transition: all .2s; line-height: 1;
}
.refl-pill:hover {
  border-color: rgba(209, 222, 38,.28); color: rgba(255,255,255,.72);
  background: rgba(209, 222, 38,.05);
}
.refl-pill.active {
  border-color: rgba(209, 222, 38,.5); background: rgba(209, 222, 38,.1);
  color: var(--lime);
}
/* Mini room cross-section swatch */
.refl-room {
  width: 32px; height: 20px; border-radius: 4px;
  overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.1); flex-shrink: 0;
}
.refl-room-ceil  { height: 5px; }
.refl-room-mid   { flex: 1; display: flex; }
.refl-room-wall-l, .refl-room-wall-r { width: 4px; }
.refl-room-air   { flex: 1; background: rgba(255,255,255,.04); }
.refl-room-floor { height: 4px; }
/* Values subtitle */
.refl-vals { font-size: .61rem; color: rgba(255,255,255,.25); font-weight: 500; }
.refl-pill.active .refl-vals { color: rgba(209, 222, 38,.5); }
.refl-pill:hover .refl-vals  { color: rgba(255,255,255,.42); }
/* Custom pill icon */
.refl-pill-icon { font-size: .9rem; color: inherit; margin-bottom: 1px; }

/* Live values readout bar */
.refl-readout {
  display: flex; align-items: center;
  padding: 5px 10px; border-radius: 7px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
}
.refl-ro-item { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1; }
.refl-ro-lbl  { font-size: .59rem; color: rgba(255,255,255,.22); text-transform: uppercase; letter-spacing: .05em; }
.refl-ro-val  { font-size: .79rem; font-weight: 800; color: rgba(255,255,255,.62); }
.refl-ro-sep  { width: 1px; height: 22px; background: rgba(255,255,255,.07); }

/* Light mode overrides */
/* Work plane row */
.wp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 15px 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.wp-icon { font-size: .8rem; color: var(--lime); opacity: .7; flex-shrink: 0; }
.wp-label { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.45); flex-shrink: 0; }
.wp-inp-wrap { width: 70px; flex-shrink: 0; }
.wp-inp-wrap input { padding: 5px 8px !important; font-weight: 700 !important; text-align: center; }
.wp-hint { font-size: .62rem; color: rgba(255,255,255,.18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.calc-light .wp-row { border-top-color: #e8ecf5; background: #f8f9fc; }
body.calc-light .wp-label { color: #6b7280; }
body.calc-light .wp-hint  { color: #b0b8cc; }
body.calc-light .wp-icon  { opacity: .8; }

body.calc-light .refl-pill { border-color: #e0e4f0; background: #f8f9fc; color: #6b7280; }
body.calc-light .refl-pill:hover { border-color: rgba(120,180,0,.38); color: #3d5c00; background: rgba(140,190,0,.06); }
body.calc-light .refl-pill.active { border-color: rgba(120,180,0,.55); background: rgba(140,190,0,.1); color: #3d5c00; }
body.calc-light .refl-room { border-color: rgba(0,0,0,.12); }
body.calc-light .refl-room-air { background: rgba(0,0,0,.03); }
body.calc-light .refl-vals { color: #b0b8cc; }
body.calc-light .refl-pill.active .refl-vals { color: #4d6a00; }
body.calc-light .refl-readout { background: rgba(0,0,0,.03); border-color: #e8ecf5; }
body.calc-light .refl-ro-lbl  { color: #9ca3af; }
body.calc-light .refl-ro-val  { color: #374151; }
body.calc-light .refl-ro-sep  { background: #e8ecf5; }
