/* ═══════════════════════════════════════════════════════
   Drawings Panel
   ═══════════════════════════════════════════════════════ */
.drawings-panel {
  position: fixed; top: 0; left: var(--toolbar-w);
  width: 230px; height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  z-index: 55;
  display: none; flex-direction: column;
  box-shadow: 4px 0 16px rgba(0, 0, 0, .3);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.drawings-panel.open { display: flex; }

.dp-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.dp-header h3 { font-family: var(--font-ui); font-size: 1.07rem; font-weight: 700; color: var(--text-bright); }

.dp-header-actions { display: flex; align-items: center; gap: 2px; }

.dp-global-eye {
  background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.dp-global-eye:hover { background: var(--hover-medium); color: var(--text-bright); }
.dp-global-eye svg {
  width: 15px; height: 15px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.dp-close {
  background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 1.2rem; font-weight: 700;
}
.dp-close:hover { background: var(--hover-medium); color: var(--text-bright); }

.dp-body { flex: 1; overflow-y: auto; padding: 6px 0; }

.dp-cat {
  font-size: .83rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 14px 8px;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: background var(--ease), color var(--ease);
}
.dp-cat:hover { background: var(--hover-subtle); color: var(--text); }
.dp-cat:hover .dp-cat-caret { color: var(--text); }
.dp-cat-caret {
  flex-shrink: 0; color: var(--text-faint);
  transition: transform .18s ease;
}
.dp-cat.collapsed .dp-cat-caret { transform: rotate(-90deg); }
.dp-cat-label { flex: 1; min-width: 0; }
.dp-cat-count {
  font-size: .83rem; color: var(--text-faint); font-weight: 500;
  background: var(--surface-raised);
  padding: 1px 7px; border-radius: 10px;
  min-width: 20px; text-align: center;
}
.dp-cat-del {
  background: none; border: none;
  color: var(--text-faint); cursor: pointer;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0; padding: 0;
  opacity: 0;
  transition: opacity var(--ease), background var(--ease), color var(--ease);
}
.dp-cat:hover .dp-cat-del { opacity: 1; }
.dp-cat-del:hover { background: var(--red-dim); color: var(--red); }
.dp-cat-eye {
  background: none; border: none;
  color: var(--text-faint); cursor: pointer;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0; padding: 0;
  opacity: 0;
  transition: opacity var(--ease), background var(--ease), color var(--ease);
}
.dp-cat:hover .dp-cat-eye { opacity: 1; }
.dp-cat.cat-hidden .dp-cat-eye { opacity: 1; color: var(--text-dim); }
.dp-cat-eye:hover { background: var(--surface-border); color: var(--text-bright); }
.dp-cat-eye svg {
  width: 13px; height: 13px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.dp-cat-items {
  overflow: hidden;
  transition: max-height .22s ease, opacity .18s ease;
  max-height: 2000px; opacity: 1;
}
.dp-cat-items.collapsed {
  max-height: 0; opacity: 0;
  pointer-events: none;
}

.dp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; cursor: pointer;
  transition: background var(--ease);
}
.dp-item:hover { background: var(--hover-subtle); }
.dp-item.selected { background: var(--blue-dim); }
.dp-item.hidden-item { opacity: .35; }
.dp-comp-parent { font-weight: 600; }
.dp-comp-child { padding-left: 28px; font-size: .82rem; opacity: .75; }
.dp-comp-child:hover { opacity: 1; }

.dp-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
  cursor: pointer; transition: transform .15s;
}
.dp-dot:hover { transform: scale(1.5); }

.dp-name {
  flex: 1; font-size: .99rem; font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-item:hover .dp-name { color: var(--text-bright); }
.dp-item.selected .dp-name { color: var(--blue); }

.dp-act {
  background: none; border: none;
  color: var(--text-faint); cursor: pointer;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); flex-shrink: 0; padding: 0;
}
.dp-act:hover { background: var(--surface-border); color: var(--text-bright); }
.dp-act.del:hover { color: var(--red); }
.dp-act.lock[title="Unlock"] { color: var(--red); }
.dp-act.lock[title="Unlock"]:hover { color: var(--red); }
.dp-act svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.dp-empty { padding: 20px 14px; text-align: center; font-size: .97rem; color: var(--text-faint); }

/* Compare entries in object list */
.dp-cm-val {
  font-family: var(--font-ui); font-size: .82rem;
  color: var(--text-faint); margin-left: auto; white-space: nowrap;
}
.dp-cm-expr-name {
  font-style: italic; max-width: 100px; overflow: hidden; text-overflow: ellipsis;
}
.dp-cm-scale-row {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 14px 6px; font-family: var(--font-ui);
}
.dp-cm-scale-label {
  font-size: .82rem; color: var(--text-dim); margin-right: 2px;
}
.dp-cm-scale-opt {
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  padding: 2px 7px; border: none; background: none;
  color: var(--text-dim); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--ease);
}
.dp-cm-scale-opt:hover { background: var(--surface-raised); color: var(--text); }
.dp-cm-scale-opt.active { background: var(--blue-dim); color: var(--blue); }

