.dimensionamento-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0.5rem 0 1.5rem;
}
.dim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.dim-disclaimer {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  text-align: center;
}
#dim-demo-gate-disclaimer:not(.d-none) + .dim-canvas-wrap {
  margin-top: 1rem;
}
.dim-disclaimer-gate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.dim-disclaimer-register-btn {
  flex-shrink: 0;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: #fff !important;
}
.dim-disclaimer-register-btn:hover,
.dim-disclaimer-register-btn:focus {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}
.dim-header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
}
.dim-icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.dim-icon-btn i,
.dim-icon-btn .fas {
  margin: 0;
}
.dim-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 736px;
  align-items: stretch;
}
.dim-drawing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.2rem 0 0.25rem;
}
.dim-drawing-title {
  max-width: 280px;
  font-weight: 600;
}
.dim-drawing-meta-btn {
  flex-shrink: 0;
}
.dim-tools-panel,
.dim-sidebar,
.dim-coach {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem;
}
.dim-tools-panel {
  display: none;
}
.dim-canvas-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  pointer-events: none;
}
.dim-canvas-tools,
.dim-canvas-palettes {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: auto;
}
.dim-canvas-tools .dim-tool,
.dim-canvas-palettes .dim-tool {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dim-canvas-tools .dim-tool:hover,
.dim-canvas-palettes .dim-tool:hover { border-color: #93c5fd; }
.dim-tool.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.dim-tool-cable.active,
.dim-canvas[data-tool="connect"] #dim-open-cable-palette {
  box-shadow: 0 0 0 2px #2563eb;
}
.dim-cable-swatch {
  width: 32px;
  height: 14px;
  display: block;
}
.dim-canvas-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dim-zoom-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dim-zoom-btn:hover { border-color: #93c5fd; }
.dim-zoom-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.dim-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.dim-canvas .dim-inspector {
  position: absolute;
  left: 58px;
  top: auto;
  bottom: auto;
  z-index: 8;
  width: min(280px, calc(100% - 16px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: visible;
}
#dim-device-inspector .form-text { font-size: 0.72rem; }
.dim-cable-palette-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
.dim-cable-pick {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.dim-cable-pick:hover,
.dim-cable-pick.is-current { border-color: #2563eb; background: #eff6ff; }
.dim-cable-pick svg { flex: 0 0 72px; height: 22px; }
.dim-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.dim-library-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.4rem;
  cursor: pointer;
  text-align: left;
}
.dim-library-card:hover { border-color: #2563eb; }
.dim-library-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  width: 100%;
  color: #334155;
  border-style: dashed;
  background: #f8fafc;
}
.dim-library-new:hover {
  background: #eff6ff;
  border-color: #2563eb;
}
.dim-lib-plus {
  font-size: 2rem;
  line-height: 1;
  margin: 0.35rem 0 0.15rem;
}
.dim-library-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 6px;
}
.dim-library-card .dim-lib-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.35rem 0 0.1rem;
  word-break: break-word;
}
.dim-library-card .dim-lib-meta { font-size: 0.7rem; color: #64748b; }
.dim-library-card .dim-lib-del {
  border: 0;
  background: none;
  color: #b91c1c;
  font-size: 0.75rem;
  padding: 0;
  cursor: pointer;
}
.dim-library-confirm {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
}
.dim-library-confirm.d-none { display: none !important; }
.dim-library-confirm p {
  font-size: 0.9rem;
  color: #7f1d1d;
}
.dim-buylist-shop {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.85rem;
}
#dimensionamento-prices .dim-buylist-shop {
  border-top: 0;
  padding-top: 0;
}
.dim-prices-group {
  margin-bottom: 1.15rem;
}
.dim-prices-grand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.15rem 0.25rem;
  border-top: 2px solid #cbd5e1;
  font-size: 0.95rem;
  font-weight: 700;
}
.dim-prices-grand.d-none { display: none !important; }
.dim-price-input {
  max-width: 7rem;
  display: inline-block;
}
.dim-qty-input {
  max-width: 4.5rem;
}
.dim-price-unit {
  font-size: 0.72rem;
  color: #64748b;
  margin-left: 0.25rem;
  white-space: nowrap;
}
.dim-buylist-table tfoot th,
.dim-buylist-table tfoot td {
  font-weight: 700;
  border-top: 2px solid #cbd5e1;
}
.dim-live-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  margin: 0;
  max-width: min(36rem, calc(100% - 140px));
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}
.dim-live-hint.d-none { display: none !important; }
.dim-live-hint.is-warning {
  color: #b45309;
  border-color: #fcd34d;
}
.dim-roof-map-wrap .dim-roof-coach {
  z-index: 12;
}
.dim-roof-link-start-guide {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}
.dim-roof-link-start-guide-inner {
  max-width: 26rem;
  padding: 1rem 1.15rem;
  text-align: center;
  color: #92400e;
  background: rgba(254, 243, 199, 0.96);
  border: 1px solid #fcd34d;
  border-radius: 0.75rem;
  box-shadow: 0 4px 18px rgba(180, 83, 9, 0.12);
}
.dim-roof-link-start-guide-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.dim-roof-link-start-guide-body {
  color: #78350f;
  line-height: 1.45;
}
.dim-canvas-legend {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  max-width: calc(100% - 120px);
  overflow-x: auto;
}
.dim-canvas-legend.is-empty { display: none; }
.dim-legend-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.dim-legend-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
}
.dim-legend-group-sep {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
  flex-shrink: 0;
}
.dim-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}
.dim-legend-pill {
  width: 22px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.dim-legend-pill-pe {
  background: linear-gradient(90deg, #2e7d32 0 36%, #f9e154 36% 64%, #2e7d32 64% 100%);
}
.dim-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
  background: #f8fafc;
}
.dim-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1e293b;
}
.dim-faq-item p {
  color: #475569;
  margin-top: 0.45rem;
}
.dim-view-tabs { flex-wrap: wrap; }
.dim-right-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.dim-coach {
  margin-top: 0.75rem;
}
.dim-side-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.dim-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.dim-palette-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  text-align: left;
  font-size: 0.8rem;
  cursor: grab;
}
.dim-palette-item:hover { border-color: #667eea; background: #f5f3ff; }
.dim-palette-img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}
.dim-palette-icon { width: 43px; text-align: center; color: #4b5563; }
.dim-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dim-canvas-wrap {
  flex: 1;
  min-height: 644px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.dim-view-tabs {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 11px 11px 0 0;
}
.dim-view-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dim-view-tab:hover { color: #334155; background: #f1f5f9; }
.dim-view-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: #fff;
}
.dim-canvas {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 598px;
  overflow: hidden;
  background-image: radial-gradient(#eef2f7 1px, transparent 1px);
  background-size: 18px 18px;
}
.dim-canvas.d-none,
.dim-buylist.d-none { display: none !important; }
.dim-buylist {
  flex: 1;
  min-height: 598px;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
}
.dim-buylist-table {
  font-size: 0.82rem;
}
.dim-shop-table {
  table-layout: fixed;
  width: 100%;
}
.dim-shop-table th:nth-child(1),
.dim-shop-table td:nth-child(1) { width: 12%; }
.dim-shop-table th:nth-child(2),
.dim-shop-table td:nth-child(2) { width: 38%; }
.dim-shop-table th:nth-child(3),
.dim-shop-table td:nth-child(3) { width: 16%; }
.dim-shop-table th:nth-child(4),
.dim-shop-table td:nth-child(4) { width: 20%; }
.dim-shop-table th:nth-child(5),
.dim-shop-table td:nth-child(5) { width: 14%; }
.dim-buylist-table th {
  white-space: nowrap;
  font-weight: 600;
  color: #475569;
}
.dim-buylist-cross {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.dim-buylist-totals {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}
.dim-buylist-totals-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dim-buylist-totals-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}
.dim-buylist-totals-list li:last-child { border-bottom: 0; }
.dim-buylist-totals-list .dim-total-m {
  font-weight: 700;
  white-space: nowrap;
}
.dim-canvas[data-tool="move"] { cursor: grab; }
.dim-canvas[data-tool="move"].is-dragging { cursor: grabbing; }
.dim-canvas[data-tool="connect"] { cursor: crosshair; }
.dim-canvas[data-tool="delete"] { cursor: not-allowed; }
.dim-canvas[data-tool="pan"] { cursor: grab; }
.dim-canvas[data-tool="pan"].is-dragging { cursor: grabbing; }
.dim-canvas[data-tool="move"] .dim-node { cursor: grab; }
.dim-canvas[data-tool="connect"] .dim-node { cursor: crosshair; }
.dim-canvas[data-tool="delete"] .dim-node { cursor: not-allowed; }
.dim-wires {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}
.dim-wires path {
  pointer-events: stroke;
  cursor: pointer;
  fill: none;
  stroke-width: 4;
}
.dim-wires path.is-tri-bundle {
  stroke-width: 2.4;
}
.dim-wires path.pe { stroke-dasharray: 7 5; }
.dim-wires path.is-tri-bundle.pe { stroke-dasharray: 5 4; }
.dim-wires path.dim-wire-hit {
  pointer-events: stroke;
  cursor: pointer;
  fill: none;
  stroke: transparent;
}
.dim-wires path.selected { stroke-width: 6; filter: drop-shadow(0 0 3px rgba(102,126,234,0.8)); }
.dim-wires path.is-tri-bundle.selected { stroke-width: 3.6; }
.dim-node {
  position: absolute;
  width: 110px;
  text-align: center;
  user-select: none;
  z-index: 2;
}
.dim-node img, .dim-node-icon {
  width: 86px;
  height: 67px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}
.dim-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #4b5563;
}
.dim-node-label {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  line-height: 1.15;
}
.dim-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #f59e0b;
  color: #111;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
}
.dim-node.is-just-placed img,
.dim-node.is-just-placed .dim-node-icon {
  outline: 3px solid #22c55e;
  outline-offset: 3px;
  animation: dim-place-flash 0.85s ease-out;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
}
@keyframes dim-place-flash {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); transform: scale(1.06); }
  40% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.18); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); transform: scale(1); }
}
.dim-badge-breaker {
  background: #2563eb;
  color: #fff;
}
.dim-badge-breaker.dim-badge-warn {
  background: #d97706;
}
.dim-badge-amp {
  right: auto;
  left: -6px;
}
.dim-port {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #111;
  cursor: crosshair;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.dim-canvas[data-tool="connect"] .dim-port {
  opacity: 1;
  pointer-events: auto;
}
.dim-canvas[data-tool="connect"] .dim-port:hover,
.dim-canvas[data-tool="connect"] .dim-port.is-port-hover {
  background: #2563eb;
  border-color: #fff;
  box-shadow: 0 0 0 2px #2563eb, 0 0 0 5px rgba(37, 99, 235, 0.28);
  transform: scale(1.45);
}
.dim-port.is-pending {
  background: #2563eb;
  border-color: #fff;
  box-shadow: 0 0 0 2px #2563eb, 0 0 0 4px #fff;
  transform: scale(1.35);
  opacity: 1;
  pointer-events: auto;
}
.dim-canvas[data-tool="move"] .dim-node:hover img,
.dim-canvas[data-tool="move"] .dim-node:hover .dim-node-icon {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  animation: dim-move-pulse 1.1s ease-in-out infinite;
}
@keyframes dim-move-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.12); }
}
.dim-canvas[data-tool="move"] .dim-wires path.is-wire-hover,
.dim-canvas[data-tool="move"] .dim-wires path.selected {
  filter: drop-shadow(0 0 2px #2563eb) drop-shadow(0 0 6px #3b82f6);
  stroke-width: 6;
}
.dim-canvas[data-tool="move"] .dim-wires path.is-tri-bundle.is-wire-hover,
.dim-canvas[data-tool="move"] .dim-wires path.is-tri-bundle.selected {
  stroke-width: 3.6;
}
.dim-canvas[data-tool="connect"] .dim-wires path.is-connect-hover,
.dim-canvas[data-tool="connect"] .dim-wires path.is-connect-pending {
  filter: drop-shadow(0 0 2px #2563eb) drop-shadow(0 0 6px #3b82f6);
  stroke-width: 6;
}
.dim-canvas[data-tool="connect"] .dim-wires path.is-tri-bundle.is-connect-hover,
.dim-canvas[data-tool="connect"] .dim-wires path.is-tri-bundle.is-connect-pending {
  stroke-width: 3.6;
}
.dim-canvas[data-tool="delete"] .dim-node:hover img,
.dim-canvas[data-tool="delete"] .dim-node:hover .dim-node-icon {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25);
}
.dim-canvas[data-tool="delete"] .dim-wires path.is-delete-hover {
  filter: drop-shadow(0 0 2px #dc2626) drop-shadow(0 0 6px #ef4444);
  stroke-width: 6;
}
.dim-canvas[data-tool="delete"] .dim-wires path.is-tri-bundle.is-delete-hover {
  stroke-width: 3.6;
}
.dim-port.left { left: -5px; top: 34px; }
.dim-port.right { right: -5px; top: 34px; }
.dim-port.top { left: 50px; top: -5px; }
.dim-port.bottom { left: 50px; bottom: 22px; }
.dim-tap-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #111;
  z-index: 5;
  cursor: grab;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: auto;
}
.dim-tap-handle:active { cursor: grabbing; }
.dim-wires path.dim-tap-helper {
  stroke: #64748b;
  stroke-width: 2;
  fill: none;
  pointer-events: none;
  stroke-dasharray: 4 3;
}
.dim-split-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0 4px;
  z-index: 5;
  pointer-events: none;
  color: #111;
  font-weight: 600;
}
.dim-wire-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 5px;
  padding: 2px 6px;
  z-index: 4;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.15;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.dim-size-chip {
  pointer-events: auto;
  cursor: pointer;
  font-weight: 600;
  color: #374151;
}
.dim-chip-section {
  font-weight: 700;
}
.dim-chip-amps {
  font-weight: 600;
  font-size: 0.62rem;
  color: #1f2937;
}
.dim-chip-length {
  font-weight: 500;
  font-size: 0.58rem;
  color: #4b5563;
}
.dim-wire-chip.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28);
  background: rgba(255, 255, 255, 0.96);
}
.dim-bank-coupling {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.45rem;
}
.dim-coupling-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.78rem;
  margin: 0.15rem 0;
  cursor: pointer;
}
.dim-coupling-opt input { margin-top: 0.15rem; }
.dim-howto { padding-left: 1.1rem; }
.dim-coach-body p { font-size: 0.85rem; }
.dim-inspector .dim-cross-thumb { width: 40px; height: 40px; }

.dim-gate-panel { position: relative; min-height: 12rem; }
.dimensionamento-page.dim-sizing-gated .dim-gate-blur-target.dim-gate-active {
  filter: blur(10px);
  user-select: none;
  pointer-events: none;
}
.dim-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
.dim-gate-overlay.d-none { display: none !important; }
.dim-sizing-detail.d-none { display: none !important; }
.dim-size-chip.is-sizing-gated .dim-chip-section { display: none; }
.dim-size-row { display: flex; gap: 0.5rem; align-items: center; }
.dim-cross-thumb { width: 56px; height: 56px; object-fit: contain; }
.dim-legend-row { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; }
.dim-swatch { width: 18px; height: 8px; border-radius: 4px; display: inline-block; }
.dim-swatch-pe {
  background: repeating-linear-gradient(90deg, #2e7d32 0 6px, #f9e154 6px 12px);
}
@media (max-width: 1100px) {
  .dim-workspace { grid-template-columns: 1fr; }
}
.dim-roof-panels {
  min-height: 640px;
  padding: 0.5rem 0 0;
}
.dim-roof-workspace {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 0.75rem;
  min-height: 520px;
}
.dim-roof-canvas-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.dim-roof-lock-map-btn {
  flex-shrink: 0;
}
.dim-roof-map-wrap {
  position: relative;
  min-height: 520px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}
.dim-roof-map-wrap .dim-roof-inspector {
  position: absolute;
  z-index: 11;
  width: max-content;
  min-width: 0;
  max-width: min(200px, calc(100% - 16px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}
.dim-roof-map-wrap .dim-roof-inspector .dim-roof-inspector-title {
  font-size: 0.78rem;
  line-height: 1.2;
}
.dim-roof-map-wrap .dim-roof-inspector .dim-roof-inspector-label {
  font-size: 0.7rem;
  line-height: 1.2;
}
.dim-roof-map-wrap .dim-roof-inspector .dim-roof-inspector-input {
  width: 5.25rem;
  max-width: 100%;
  padding: 0.12rem 0.3rem;
  font-size: 0.78rem;
  line-height: 1.2;
}
.dim-roof-map-wrap .dim-roof-inspector .btn-group .btn {
  font-size: 0.72rem;
  padding: 0.15rem 0.35rem;
}
.dim-roof-map-wrap .dim-roof-inspector .btn-group .btn.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}
.dim-roof-compass {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 12;
  width: 56px;
  height: 56px;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.28));
}
.dim-roof-compass-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.dim-roof-compass-ring {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(15, 23, 42, 0.18);
  stroke-width: 1;
}
.dim-roof-compass-needle-n {
  fill: #d32f2f;
}
.dim-roof-compass-needle-s {
  fill: #1565c0;
}
.dim-roof-compass-n {
  fill: #d32f2f;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.dim-roof-compass-s {
  fill: #1565c0;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.dim-roof-compass-ew {
  fill: #37474f;
  font-size: 8px;
  font-weight: 600;
  text-anchor: middle;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.dim-roof-units .form-select {
  max-width: 100%;
}
.dim-roof-frozen.is-tool-move .dim-roof-restriction-marker.is-interactive,
.dim-roof-frozen.is-tool-move .dim-roof-measurement-group.is-interactive {
  cursor: move;
}
.dim-roof-canvas-chrome {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}
.dim-roof-canvas-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}
.dim-roof-canvas-tools {
  pointer-events: auto;
  gap: 0;
}
.dim-roof-tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dim-roof-tool-group + .dim-roof-tool-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}
.dim-roof-canvas-tools .dim-tool-icon,
.dim-roof-tool-icon {
  width: 22px;
  height: 14px;
  display: block;
}
.dim-roof-canvas-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  pointer-events: auto;
}
.dim-roof-canvas-zoom .dim-roof-screenshot-btn {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dim-roof-canvas-zoom .dim-roof-screenshot-btn .screenshot-icon {
  font-size: 0.92rem;
  line-height: 1;
}
.dim-roof-canvas-zoom .dim-roof-screenshot-btn .screenshot-spinner {
  width: 0.95rem;
  height: 0.95rem;
}
.dim-roof-canvas-zoom .dim-roof-screenshot-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dim-roof-frozen {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 520px;
  background: #f8fafc;
  cursor: default;
  overflow: hidden;
  outline: none;
}
.dim-roof-map-wrap .dim-roof-map {
  position: relative;
  z-index: 1;
}
.dim-roof-frozen-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 1;
}
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-pin,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-restrictions,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-shadows,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-roof-faces,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-measurements,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-overlays,
.dim-roof-frozen-stage.is-overlays-pending .dim-roof-frozen-panel-tools {
  visibility: hidden;
}
.dim-roof-frozen.is-tool-pan {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%F0%9F%96%90%EF%B8%8F%3C/text%3E%3C/svg%3E") 12 12, grab;
}
.dim-roof-frozen.is-tool-pan.is-pan-dragging {
  cursor: grabbing;
}
.dim-roof-frozen.is-pan-dragging {
  cursor: grabbing;
}
.dim-roof-frozen.is-tool-move:not(.is-pan-dragging):not(.is-measurement-dragging):not(.is-restriction-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%E2%9C%8B%3C/text%3E%3C/svg%3E") 12 12, grab;
}
.dim-roof-frozen.is-tool-string:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%E2%9A%A1%3C/text%3E%3C/svg%3E") 12 12, crosshair;
}
.dim-roof-frozen.is-tool-paint:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%F0%9F%96%8C%EF%B8%8F%3C/text%3E%3C/svg%3E") 12 12, copy;
}
.dim-roof-frozen.is-tool-delete:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%F0%9F%A7%B9%3C/text%3E%3C/svg%3E") 12 12, not-allowed;
}
.dim-roof-frozen.is-tool-measure:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%F0%9F%93%8F%3C/text%3E%3C/svg%3E") 12 12, crosshair;
}
.dim-roof-frozen.is-tool-roofface:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20text-anchor%3D%22middle%22%20font-size%3D%2216%22%3E%F0%9F%8F%A0%EF%B8%8F%3C/text%3E%3C/svg%3E") 12 12, crosshair;
}
.dim-roof-frozen.is-tool-restrict:not(.is-pan-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20fill%3D%22rgba%28198%2C40%2C40%2C0.35%29%22%20stroke%3D%22%23c62828%22%20stroke-width%3D%222%22/%3E%3C/svg%3E") 12 12, crosshair;
}
.dim-roof-restrict-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #c62828;
  background: rgba(198, 40, 40, 0.35);
  box-sizing: border-box;
}
.dim-roof-frozen-restrictions {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.dim-roof-frozen-shadows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.dim-roof-shadow-polygon {
  fill: rgba(20, 20, 40, 0.52);
  stroke: rgba(30, 30, 60, 0.65);
  stroke-width: 1;
}
.dim-roof-shadow-controls,
.dim-roof-shadow-panel {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 0.5rem;
  background: rgba(102, 126, 234, 0.06);
}
.dim-roof-shadow-slider {
  margin-bottom: 0.15rem;
}
.dim-roof-shadow-slider-block {
  margin-bottom: 0.55rem;
}
.dim-roof-shadow-slider-block--month {
  --dim-roof-range-thumb-inset: 0.5rem;
}
.dim-roof-shadow-slider--month {
  margin-bottom: 0.15rem;
}
.dim-roof-shadow-month-ticks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  padding-inline: var(--dim-roof-range-thumb-inset);
  margin-top: 0.05rem;
}
.dim-roof-shadow-month-ticks span {
  flex: none;
  min-width: 0;
  font-size: 0.62rem;
  line-height: 1.1;
  color: rgba(55, 65, 81, 0.72);
  text-align: center;
  justify-self: center;
}
.dim-roof-shadow-month-ticks span:first-child {
  justify-self: start;
  text-align: left;
}
.dim-roof-shadow-month-ticks span:last-child {
  justify-self: end;
  text-align: right;
}
.dim-roof-shadow-slider-value {
  color: #4c51bf;
  min-width: 2.5rem;
  text-align: right;
}
.dim-roof-shadow-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  line-height: 1.1;
  color: rgba(55, 65, 81, 0.72);
  padding: 0 0.05rem 0.1rem;
  user-select: none;
}
.dim-roof-shadow-day-ticks span,
.dim-roof-shadow-hour-ticks span {
  flex: 0 0 auto;
}
.dim-roof-shadow-hour-wrap {
  position: relative;
  margin-bottom: 0.15rem;
  padding: 0.35rem 0;
}
.dim-roof-shadow-hour-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  pointer-events: none;
  z-index: 0;
}
.dim-roof-shadow-hour-slider {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  background: transparent;
}
.dim-roof-shadow-hour-slider::-webkit-slider-runnable-track {
  background: transparent;
  height: 8px;
}
.dim-roof-shadow-hour-slider::-moz-range-track {
  background: transparent;
  height: 8px;
}
.dim-roof-shadow-hour-slider::-webkit-slider-thumb {
  position: relative;
  z-index: 2;
}
#dim-roof-shadow-power {
  color: #4c51bf;
  font-weight: 600;
}
.dim-roof-shadow-pvgis-btn {
  min-width: 4.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dim-roof-shadow-pvgis-btn--ready {
  background-color: #22c55e;
  border-color: #16a34a;
  color: #fff;
}
.dim-roof-shadow-pvgis-btn--ready:hover,
.dim-roof-shadow-pvgis-btn--ready:focus {
  background-color: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.dim-roof-shadow-pvgis-btn--missing {
  background-color: #e5e7eb;
  border-color: #d1d5db;
  color: #6b7280;
}
.dim-roof-shadow-pvgis-btn--missing:not(:disabled):hover,
.dim-roof-shadow-pvgis-btn--missing:not(:disabled):focus {
  background-color: #d1d5db;
  border-color: #9ca3af;
  color: #374151;
}
.dim-roof-shadow-pvgis-btn--loading {
  background-color: #fef3c7;
  border-color: #facc15;
  color: #92400e;
}
.dim-roof-shadow-pvgis-btn--unavailable {
  background-color: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}
.dim-roof-shadow-charts-band {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid rgba(102, 126, 234, 0.22);
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  position: relative;
}
.dim-roof-shadow-charts-title {
  color: #4c51bf;
  font-weight: 600;
}
.dim-roof-shadow-charts-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}
.dim-roof-shadow-chart-card {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fafbff;
}
.dim-roof-shadow-charts-wrap {
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  padding-top: 0.5rem;
}
.dim-roof-shadow-charts-summary {
  cursor: pointer;
  color: #4c51bf;
  user-select: none;
}
.dim-roof-shadow-chart-block {
  margin-bottom: 0.85rem;
}
.dim-roof-shadow-chart-heading {
  color: #374151;
  font-weight: 600;
}
.dim-roof-shadow-chart-canvas-wrap {
  position: relative;
  height: 200px;
  width: 100%;
}
.dim-roof-shadow-chart-canvas-wrap--day,
.dim-roof-shadow-chart-canvas-wrap--year {
  height: min(280px, 38vh);
}
.dim-roof-shadow-chart-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 0.35rem;
}
.dim-roof-shadow-chart-loading.d-none {
  display: none !important;
}
.dim-roof-shadow-chart-canvas-wrap--month {
  height: 220px;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-shaded {
  background: #2a2a3a;
  border-color: #4a4a6a;
  box-shadow: inset 0 0 0 2px rgba(80, 80, 120, 0.85);
}
.dim-roof-frozen-restrictions .dim-roof-restriction-marker {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #c62828;
  background: rgba(198, 40, 40, 0.35);
  pointer-events: auto;
  overflow: visible;
}
.dim-roof-frozen-restrictions .dim-roof-restriction-marker.is-draft {
  border-style: dashed;
  background: rgba(198, 40, 40, 0.22);
}
.dim-roof-frozen-restrictions .dim-roof-restriction-marker.is-selected {
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.45);
}
.dim-roof-frozen-restrictions .dim-roof-restriction-marker.is-hovered {
  border-width: 2px;
  filter: drop-shadow(0 0 1px rgba(15, 23, 42, 0.25));
}
.dim-roof-restriction-shadow-arrows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  color: #991b1b;
}
.dim-roof-restriction-shadow-arrow {
  position: absolute;
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.85));
}
.dim-roof-restriction-shadow-arrows--left .dim-roof-restriction-shadow-arrow {
  left: 0;
  transform: translate(calc(-100% - 2px), -50%) rotate(180deg);
}
.dim-roof-restriction-shadow-arrows--right .dim-roof-restriction-shadow-arrow {
  left: 100%;
  transform: translate(2px, -50%);
}
.dim-roof-restriction-shadow-arrows--above .dim-roof-restriction-shadow-arrow {
  top: 0;
  transform: translate(-50%, calc(-100% - 2px)) rotate(-90deg);
}
.dim-roof-restriction-shadow-arrows--below .dim-roof-restriction-shadow-arrow {
  top: 100%;
  transform: translate(-50%, 2px) rotate(90deg);
}
.dim-roof-restriction-height-label {
  position: absolute;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
  text-shadow:
    0 0 3px rgba(15, 23, 42, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.75);
}
.dim-roof-restriction-height-label.is-placement-inside {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  padding: 0;
  text-shadow:
    0 0 3px rgba(15, 23, 42, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.75);
}
.dim-roof-restriction-height-label.is-placement-above {
  left: 50%;
  top: 0;
  transform: translate(-50%, calc(-100% - 4px));
}
.dim-roof-restriction-height-label.is-placement-below {
  left: 50%;
  top: 100%;
  transform: translate(-50%, 4px);
}
.dim-roof-restriction-height-label.is-placement-left {
  left: 0;
  top: 50%;
  transform: translate(calc(-100% - 4px), -50%);
}
.dim-roof-restriction-height-label.is-placement-right {
  left: 100%;
  top: 50%;
  transform: translate(4px, -50%);
}
.dim-roof-restriction-height-label.is-external {
  background: rgba(0, 0, 0, 0.84);
  padding: 0.1rem 0.28rem;
  border-radius: 4px;
  text-shadow: none;
}
.dim-roof-restriction-handle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  border-style: solid;
  border-color: #c62828;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.dim-roof-restriction-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--dim-roof-restriction-handle-hit, 12px);
  height: var(--dim-roof-restriction-handle-hit, 12px);
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  border-radius: 0;
}
.dim-roof-restriction-marker.is-selected .dim-roof-restriction-handle,
.dim-roof-restriction-marker.is-dragging .dim-roof-restriction-handle {
  opacity: 1;
  pointer-events: auto;
}
.dim-roof-restriction-handle-nw { cursor: nwse-resize; }
.dim-roof-restriction-handle-ne { cursor: nesw-resize; }
.dim-roof-restriction-handle-se { cursor: nwse-resize; }
.dim-roof-restriction-handle-sw { cursor: nesw-resize; }
.dim-roof-restriction-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: 6px;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
}
.dim-roof-restriction-item.is-selected {
  background: rgba(198, 40, 40, 0.1);
  outline: 1px solid rgba(198, 40, 40, 0.35);
}
.dim-roof-restriction-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 2px solid #c62828;
  background: rgba(198, 40, 40, 0.35);
}
.dim-roof-restriction-item-body {
  flex: 1;
  min-width: 0;
}
.dim-roof-restriction-delete {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  line-height: 1.2;
}
.dim-roof-sidebar-section {
  flex-shrink: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
}
.dim-roof-sidebar-collapsible {
  flex-shrink: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}
.dim-roof-sidebar-collapsible:first-of-type {
  margin-top: 0.25rem;
}
.dim-roof-sidebar-collapse-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  padding: 0.15rem 0;
}
.dim-roof-sidebar-collapse-summary::-webkit-details-marker {
  display: none;
}
.dim-roof-sidebar-collapse-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
}
.dim-roof-sidebar-collapse-summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.dim-roof-sidebar-collapsible[open] > .dim-roof-sidebar-collapse-summary::after {
  transform: rotate(-135deg);
}
.dim-roof-sidebar-collapse-summary:hover .dim-roof-sidebar-collapse-title {
  color: #667eea;
}
.dim-roof-sidebar-collapse-body {
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
}
.dim-roof-sidebar-collapsible[open] .dim-roof-strings-scroll {
  max-height: 14rem;
  overflow-y: auto;
}
.dim-roof-map {
  width: 100%;
  height: 520px;
}
.dim-roof-frozen-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.dim-roof-frozen.is-tool-place {
  cursor: none;
}
.dim-roof-frozen.is-tool-place .dim-roof-place-ghost {
  pointer-events: none;
}
.dim-roof-place-ghost {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 1;
  transform-origin: 0 0;
  box-sizing: border-box;
  backface-visibility: hidden;
  contain: layout paint style;
  will-change: transform;
}
.dim-roof-frozen-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.dim-roof-frozen-panel-tools {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker {
  position: absolute;
  pointer-events: auto;
  box-sizing: border-box;
  border: 1px solid #1a1a1a;
  background: #050505;
  opacity: 1;
  transform-origin: center center;
  box-shadow: none;
}
.dim-roof-panel-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.45rem;
}
.dim-roof-panel-palette-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-size: 0.8rem;
  cursor: pointer;
}
.dim-roof-panel-palette-item:hover,
.dim-roof-panel-palette-item.is-active {
  border-color: #667eea;
  background: #f5f3ff;
}
.dim-roof-panel-palette-edit {
  flex-shrink: 0;
  color: #667eea;
  line-height: 1;
  margin-top: 0.1rem;
}
.dim-roof-panel-palette-edit:hover {
  color: #4c51bf;
}
.dim-roof-panel-palette-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.dim-roof-panel-palette-meta span.dim-roof-panel-palette-spec {
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.3;
  white-space: nowrap;
}
.dim-roof-panel-palette-meta strong {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dim-roof-panel-palette-meta span {
  font-size: 0.72rem;
  color: #6b7280;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-in-string {
  box-shadow: inset 0 0 0 2px var(--dim-roof-string-color);
}
.dim-roof-frozen.is-tool-string .dim-roof-frozen-overlays .dim-roof-panel-marker.is-in-string {
  box-shadow: inset 0 0 0 3px var(--dim-roof-string-color);
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-selected {
  box-shadow: inset 0 0 0 2px #667eea;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-in-string.is-selected {
  box-shadow: inset 0 0 0 2px #667eea, inset 0 0 0 5px var(--dim-roof-string-color);
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-string-draft {
  box-shadow: inset 0 0 0 3px var(--dim-roof-draft-string-color, #667eea);
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-in-restriction {
  box-shadow: inset 0 0 0 3px #c62828;
  animation: dim-roof-restriction-flash 1.2s ease-in-out infinite;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-in-string.is-in-restriction {
  box-shadow: inset 0 0 0 3px #c62828, inset 0 0 0 6px var(--dim-roof-string-color);
}
.dim-roof-maps-quota-block {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}
.dim-roof-maps-quota-inner {
  max-width: 22rem;
}
.dim-roof-map-freezing {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 245, 249, 0.82);
  backdrop-filter: blur(1px);
  pointer-events: auto;
}
.dim-roof-map-freezing-inner {
  text-align: center;
  color: #334155;
  max-width: 16rem;
  padding: 1rem;
}
.dim-roof-map-wrap.is-freezing .dim-roof-canvas-chrome {
  pointer-events: none;
  opacity: 0.55;
}
.dim-roof-maps-url.is-geocode-cooldown-alt {
  border: 1px solid rgba(102, 126, 234, 0.45);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem 0.5rem;
  background: rgba(102, 126, 234, 0.06);
}
.dim-roof-map-wrap.is-quota-blocked #dim-roof-map,
.dim-roof-map-wrap.is-quota-blocked #dim-roof-frozen,
.dim-roof-map-wrap.is-quota-blocked .dim-roof-canvas-chrome {
  visibility: hidden;
  pointer-events: none;
}
.dim-roof-frozen-overlays .dim-roof-panel-marker.is-selected.is-in-restriction {
  box-shadow: inset 0 0 0 2px #667eea, inset 0 0 0 5px #c62828;
}
@keyframes dim-roof-restriction-flash {
  0%, 100% { background-color: #050505; }
  50% { background-color: #3b1212; }
}
.dim-roof-frozen-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #c62828;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.dim-roof-frozen-measurements {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.dim-roof-frozen-roof-faces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.dim-roof-roof-face-group.is-interactive {
  pointer-events: auto;
  cursor: pointer;
}
.dim-roof-roof-face-fill {
  fill: rgba(27, 122, 61, 0.22);
  stroke: #1b5e20;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.dim-roof-roof-face-stroke {
  stroke: #1b7a3d;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-stroke.is-rubber-band {
  stroke-dasharray: 6 4;
  stroke: #43a047;
  opacity: 0.95;
}
.dim-roof-roof-face-stroke.is-close-hint {
  stroke: #1b7a3d;
  stroke-dasharray: 4 6;
  opacity: 0.5;
}
.dim-roof-roof-face-stroke.is-close-preview {
  stroke: #0d9488;
  stroke-width: 3;
  opacity: 1;
}
.dim-roof-roof-face-vertex.is-close-target {
  fill: #0d9488;
  stroke: #fff;
  stroke-width: 1;
}
.dim-roof-roof-face-group.is-selected .dim-roof-roof-face-fill,
.dim-roof-roof-face-group.is-hovered .dim-roof-roof-face-fill {
  fill: rgba(21, 101, 47, 0.32);
  stroke: #0d4d24;
  stroke-width: 3;
}
.dim-roof-roof-face-group.is-delete-hover .dim-roof-roof-face-fill {
  fill: rgba(198, 40, 40, 0.25);
  stroke: #c62828;
}
.dim-roof-roof-face-group.is-draft .dim-roof-roof-face-fill {
  fill: rgba(27, 122, 61, 0.14);
  stroke: #1b7a3d;
  stroke-dasharray: 6 4;
}
.dim-roof-roof-face-group.is-draft .dim-roof-roof-face-stroke {
  stroke: #1b7a3d;
}
.dim-roof-roof-face-label {
  fill: #0d4d24;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.dim-roof-roof-face-vertex {
  fill: #1b7a3d;
  stroke: #fff;
  stroke-width: 1;
  pointer-events: none;
}
.dim-roof-roof-face-slope-arrow.is-primary {
  fill: #1b5e20;
  stroke: #fff;
  stroke-width: 1;
}
.dim-roof-roof-face-slope-arrow.is-primary.is-cardinal-snap {
  fill: #0d9488;
}
.dim-roof-roof-face-slope-arrow.is-ghost {
  fill: rgba(27, 122, 61, 0.35);
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1;
}
.dim-roof-roof-face-slope-shaft {
  stroke: #1b5e20;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-azimuth-label {
  fill: #0d4d24;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}
.dim-roof-roof-face-edge-perp {
  stroke: #0d9488;
  stroke-width: 4;
  stroke-dasharray: 6 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-edge-perp.is-active,
.dim-roof-roof-face-perp-mark.is-active {
  stroke: #047857;
  stroke-width: 5;
}
.dim-roof-roof-face-perp-mark.is-active {
  fill: #047857;
}
.dim-roof-roof-face-slope-arrow.is-edge-snap {
  fill: #047857;
}
.dim-roof-roof-face-vertex-hit {
  fill: rgba(67, 160, 71, 0.15);
  stroke: transparent;
  cursor: grab;
  pointer-events: all;
}
.dim-roof-frozen.is-roof-face-vertex-dragging .dim-roof-roof-face-vertex-hit {
  cursor: grabbing;
}
.dim-roof-roof-face-perp-mark {
  fill: #0d9488;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}
.dim-roof-roof-face-vertex.is-reference {
  fill: none;
  stroke: #43a047;
  stroke-width: 2;
  stroke-dasharray: 3 2;
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-reference-hint {
  fill: none;
  stroke: rgba(67, 160, 71, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 2 2;
  pointer-events: none;
}
.dim-roof-roof-face-edge-constraint-preview {
  stroke: #0d9488;
  stroke-width: 4;
  stroke-dasharray: 5 4;
  pointer-events: none;
}
.dim-roof-roof-face-edge-constraint-edge {
  stroke: #0d9488;
  stroke-width: 4;
  stroke-dasharray: 8 4;
  pointer-events: none;
}
.dim-roof-roof-face-edge-constraint-leader {
  stroke: rgba(13, 148, 136, 0.65);
  stroke-width: 1.5;
  stroke-dasharray: 3 2;
  pointer-events: none;
}
.dim-roof-roof-face-edge-constraint-vertex {
  fill: none;
  stroke: #0d9488;
  stroke-width: 2.5;
  pointer-events: none;
}
.dim-roof-roof-face-constraint-icon {
  pointer-events: none;
}
.dim-roof-roof-face-constraint-icon.is-concentricity circle.is-outer {
  fill: none;
  stroke: #2e7d32;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-constraint-icon.is-concentricity circle.is-inner {
  fill: none;
  stroke: #43a047;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-constraint-icon.is-concentricity circle.is-center {
  fill: #1b7a3d;
  stroke: #fff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-constraint-icon.is-point_on_edge .is-glyph {
  fill: #0d9488;
  stroke: #fff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-roof-face-constraint-snap-preview {
  pointer-events: none;
}
.dim-roof-roof-face-constraint-snap-preview .dim-roof-roof-face-constraint-icon.is-preview {
  opacity: 0.92;
}
.dim-roof-roof-face-edge-constraint-glyph {
  fill: #0d9488;
  stroke: #fff;
  stroke-width: 1;
  pointer-events: none;
}
.dim-roof-roof-face-edge-constraint-hit {
  fill: transparent;
  stroke: none;
  cursor: pointer;
}
.dim-roof-roof-face-concentric-leader {
  stroke: rgba(46, 125, 50, 0.55);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  pointer-events: none;
}
.dim-roof-roof-face-concentric-hit {
  fill: transparent;
  stroke: none;
  cursor: pointer;
}
.dim-roof-roof-face-concentric.is-selected .dim-roof-roof-face-concentric-leader,
.dim-roof-roof-face-concentric.is-hovered .dim-roof-roof-face-concentric-leader {
  stroke: #667eea;
}
.dim-roof-roof-face-concentric.is-delete-hover .dim-roof-roof-face-concentric-leader {
  stroke: #c62828;
}
.dim-roof-roof-face-concentric.is-selected .dim-roof-roof-face-constraint-icon circle.is-outer,
.dim-roof-roof-face-concentric.is-hovered .dim-roof-roof-face-constraint-icon circle.is-outer {
  stroke: #667eea;
  stroke-width: 1;
}
.dim-roof-roof-face-concentric.is-selected .dim-roof-roof-face-constraint-icon circle.is-inner,
.dim-roof-roof-face-concentric.is-hovered .dim-roof-roof-face-constraint-icon circle.is-inner {
  stroke: #764ba2;
}
.dim-roof-roof-face-concentric.is-delete-hover .dim-roof-roof-face-constraint-icon circle.is-outer {
  stroke: #c62828;
  stroke-width: 2;
}
.dim-roof-roof-face-concentric.is-delete-hover .dim-roof-roof-face-constraint-icon circle.is-inner {
  stroke: #ef5350;
}
.dim-roof-roof-face-vertex.is-snap-zone {
  fill: none;
  stroke: rgba(67, 160, 71, 0.8);
  stroke-width: 1;
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-snap-zone.is-close-zone {
  stroke: rgba(13, 148, 136, 0.85);
}
.dim-roof-roof-face-vertex.is-snap-zone.is-active,
.dim-roof-roof-face-vertex.is-snap-target {
  fill: #43a047;
  stroke: #fff;
  stroke-width: 1;
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-snap-target.is-edge-snap,
.dim-roof-roof-face-vertex.is-snap-zone.is-close-zone.is-active,
.dim-roof-roof-face-vertex.is-snap-target.is-close-snap {
  fill: #0d9488;
}
.dim-roof-roof-face-group.is-draw-pass-through {
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-reference.is-snap-active,
.dim-roof-roof-face-vertex.is-anchor-preview {
  fill: rgba(67, 160, 71, 0.35);
  stroke: #2e7d32;
  stroke-width: 1;
  stroke-dasharray: none;
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-anchor-preview.is-edge-anchor {
  fill: rgba(13, 148, 136, 0.35);
  stroke: #0d9488;
}
.dim-roof-roof-face-group.is-anchor-preview {
  pointer-events: none;
}
.dim-roof-roof-face-vertex.is-close-active {
  fill: #0d9488;
  animation: dim-roof-face-pulse 0.7s ease-in-out infinite;
}
.dim-roof-roof-face-vertex.is-snap-active {
  fill: #66bb6a;
}
.dim-roof-roof-face-group.is-close-hover .dim-roof-roof-face-stroke.is-close-preview {
  animation: dim-roof-face-pulse-stroke 0.7s ease-in-out infinite;
}
@keyframes dim-roof-face-pulse {
  0%, 100% { r: 6; opacity: 1; }
  50% { r: 8; opacity: 0.75; }
}
@keyframes dim-roof-face-pulse-stroke {
  0%, 100% { stroke-width: 3; opacity: 1; }
  50% { stroke-width: 5; opacity: 0.8; }
}
.dim-roof-roof-face-slope-arrow {
  fill: #2e7d32;
  stroke: #fff;
  stroke-width: 1.25;
  pointer-events: none;
}
.dim-roof-roof-face-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dim-roof-roof-face-item.is-selected {
  background: rgba(46, 125, 50, 0.1);
  border-radius: 4px;
}
.dim-roof-roof-face-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(135deg, #43a047, #1b5e20);
  border: 1px solid rgba(13, 77, 36, 0.35);
  flex-shrink: 0;
}
.dim-roof-frozen.is-tool-delete .dim-roof-panel-marker.is-delete-hover {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25);
}
.dim-roof-frozen.is-tool-delete .dim-roof-restriction-marker.is-delete-hover {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.35);
  filter: drop-shadow(0 0 2px #dc2626);
}
.dim-roof-frozen.is-tool-delete .dim-roof-measurement-group.is-delete-hover .dim-roof-measurement-stroke {
  filter: drop-shadow(0 0 2px #dc2626) drop-shadow(0 0 6px #ef4444);
  stroke-width: 2;
}
.dim-roof-frozen.is-tool-delete .dim-roof-measurement-group.is-delete-hover .dim-roof-measurement-handle {
  opacity: 1;
  stroke: #dc2626;
}
/* Move/delete: keep tool emoji on canvas; grab/pointer only on hovered markers */
.dim-roof-frozen.is-tool-string .dim-roof-panel-marker.is-string-hover {
  outline: 2px solid var(--dim-roof-string-color, #f59e0b);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dim-roof-string-color, #f59e0b) 28%, transparent);
  z-index: 3;
}
.dim-roof-frozen.is-tool-paint .dim-roof-panel-marker.is-paint-hover {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.28);
  z-index: 3;
}
.dim-roof-frozen.is-tool-paint .dim-roof-restriction-marker.is-paint-hover {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.32);
}
.dim-roof-canvas-tools .dim-roof-tool.is-paint-loaded {
  box-shadow: 0 0 0 2px #667eea, 0 0 0 4px rgba(102, 126, 234, 0.35);
}
.dim-roof-frozen.is-tool-move.is-tool-hover-active .dim-roof-panel-marker.is-move-hover,
.dim-roof-frozen.is-tool-move.is-tool-hover-active .dim-roof-restriction-marker.is-move-hover {
  cursor: grab;
}
.dim-roof-strings-summary {
  font-weight: 500;
  color: #334155;
}
.dim-roof-frozen.is-tool-move.is-measurement-hover {
  cursor: grab;
}
.dim-roof-frozen.is-measurement-dragging {
  cursor: grabbing;
}
.dim-roof-measurement-group.is-draft .dim-roof-measurement-stroke {
  stroke-dasharray: 6 4;
}
.dim-roof-measurement-group.is-interactive .dim-roof-measurement-hit {
  cursor: pointer;
}
.dim-roof-measurement-group.is-hovered .dim-roof-measurement-stroke,
.dim-roof-measurement-group.is-selected .dim-roof-measurement-stroke {
  stroke-width: 1.5;
  filter: drop-shadow(0 0 2px rgba(15, 23, 42, 0.35));
}
.dim-roof-measurement-group.is-selected .dim-roof-measurement-stroke {
  stroke-width: 1.5;
}
.dim-roof-measurement-handle {
  fill: #fff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.dim-roof-measurement-handle-hit {
  fill: transparent;
  stroke: transparent;
  opacity: 0;
  pointer-events: none;
}
.dim-roof-frozen.is-tool-move .dim-roof-measurement-group.is-interactive .dim-roof-measurement-handle,
.dim-roof-frozen.is-tool-move .dim-roof-measurement-group.is-interactive .dim-roof-measurement-handle-hit,
.dim-roof-measurement-group.is-hovered .dim-roof-measurement-handle,
.dim-roof-measurement-group.is-hovered .dim-roof-measurement-handle-hit,
.dim-roof-measurement-group.is-selected .dim-roof-measurement-handle,
.dim-roof-measurement-group.is-selected .dim-roof-measurement-handle-hit,
.dim-roof-measurement-group.is-dragging .dim-roof-measurement-handle,
.dim-roof-measurement-group.is-dragging .dim-roof-measurement-handle-hit {
  opacity: 1;
  pointer-events: auto;
  cursor: grab;
}
.dim-roof-measurement-handle-hit {
  cursor: grab;
}
.dim-roof-measurement-group.is-calibration .dim-roof-measurement-handle {
  stroke: #667eea;
}
.dim-roof-measurement-group:not(.is-calibration) .dim-roof-measurement-handle {
  stroke: #0ea5e9;
}
.dim-roof-frozen.is-measurement-dragging .dim-roof-measurement-handle,
.dim-roof-frozen.is-measurement-dragging .dim-roof-measurement-handle-hit {
  cursor: grabbing;
}
.dim-roof-measurement-item {
  cursor: pointer;
}
.dim-roof-measurement-hit {
  stroke: transparent;
  stroke-width: 6;
  stroke-linecap: butt;
  pointer-events: stroke;
}
.dim-roof-measurement-stroke {
  stroke-width: 1;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.dim-roof-measurement-item.is-selected {
  background: rgba(14, 165, 233, 0.1);
  outline: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 6px;
}
.dim-roof-layer-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dim-roof-layer-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.25rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(102, 126, 234, 0.12);
}
.dim-roof-layer-row.is-dragging {
  opacity: 0.65;
}
.dim-roof-layer-drag-handle {
  cursor: grab;
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1;
  user-select: none;
  padding: 0 0.15rem;
}
.dim-roof-layer-row[draggable="true"] .dim-roof-layer-drag-handle {
  cursor: grab;
}
.dim-roof-layer-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dim-roof-layer-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin: 0;
  cursor: pointer;
}
.dim-roof-measurement-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.dim-roof-measurement-swatch {
  width: 12px;
  height: 3px;
  border-radius: 1px;
  flex-shrink: 0;
  background: #0ea5e9;
}
.dim-roof-measurement-item-body {
  flex: 1;
  min-width: 0;
}
.dim-roof-measurement-delete {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  line-height: 1.2;
}
.dim-roof-frozen-measurements line {
  stroke-width: 2;
  stroke-linecap: butt;
}
.dim-roof-frozen-measurements .dim-roof-calib-label,
.dim-roof-frozen-calib .dim-roof-calib-label {
  fill: #fff;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, 0.85);
  stroke-width: 3px;
}
.dim-roof-map-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 1rem;
  text-align: center;
}
.dim-roof-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
}
.dim-roof-strings-scroll {
  overflow-y: auto;
}
.dim-roof-string-draft-banner {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.dim-roof-tool.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}
.dim-roof-tool.is-locked-out {
  opacity: 0.45;
  pointer-events: none;
}
.dim-roof-canvas-tools .dim-roof-tool.is-locked-out {
  opacity: 0.45;
  pointer-events: none;
}
.dim-roof-map-locked-indicator {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 12;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffc107;
  color: #212529;
  border: 1px solid #ffca2c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  user-select: none;
  font-size: 0.95rem;
  line-height: 1;
}
.dim-roof-panel-marker {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #667eea;
  background: rgba(102, 126, 234, 0.35);
  transform-origin: center center;
  cursor: pointer;
  pointer-events: auto;
}
.dim-roof-panel-marker.is-selected {
  box-shadow: 0 0 0 2px #764ba2;
}
.dim-roof-panel-rotate-ui {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.dim-roof-panel-rotate-handle {
  --dim-roof-rotate-size: 0.88rem;
  pointer-events: auto;
  position: relative;
  width: var(--dim-roof-rotate-size);
  height: var(--dim-roof-rotate-size);
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.9);
  padding: 0;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}
.dim-roof-panel-rotate-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--dim-roof-rotate-size);
  height: var(--dim-roof-rotate-size);
  transform: translate(-50%, -50%);
  display: block;
  color: rgba(255, 255, 255, 0.44);
  pointer-events: none;
}
.dim-roof-panel-rotate-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.dim-roof-panel-rotate-deg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: transparent;
  font-size: 0.414rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  letter-spacing: -0.02em;
}
.dim-roof-panel-rotate-deg.is-wide {
  font-size: 0.342rem;
}
.dim-roof-panel-rotate-handle:hover {
  background: rgba(0, 0, 0, 0.95);
}
.dim-roof-panel-rotate-handle:hover .dim-roof-panel-rotate-icon {
  color: rgba(255, 255, 255, 0.5);
}
.dim-roof-panel-rotate-handle:hover .dim-roof-panel-rotate-deg {
  color: #fff;
}
body.dim-roof-rotating .dim-roof-panel-rotate-handle {
  cursor: grabbing;
}
body.dim-roof-rotating {
  user-select: none;
}
.dim-roof-string-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: 6px;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
}
.dim-roof-string-item.is-selected {
  background: rgba(102, 126, 234, 0.12);
  outline: 1px solid rgba(102, 126, 234, 0.45);
}
.dim-roof-string-item-body {
  flex: 1;
  min-width: 0;
}
.dim-roof-string-delete {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  line-height: 1.2;
}
.dim-roof-string-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dim-roof-catalog-table .btn-link {
  padding: 0;
  font-size: 0.85rem;
}
.dim-roof-catalog-table tr.is-inactive td {
  opacity: 0.55;
}
@media (max-width: 900px) {
  .dim-roof-workspace { grid-template-columns: 1fr; }
}
.dim-canvas.is-readonly .dim-tool[data-tool="connect"],
.dim-canvas.is-readonly .dim-tool[data-tool="delete"],
.dim-canvas.is-readonly #dimensionamento-palettes {
  display: none;
}
