* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111; color: #ddd; font-family: -apple-system, system-ui, sans-serif; }

#app { display: flex; height: 100vh; }

#sidebar {
  width: 300px;
  min-width: 300px;
  overflow-y: auto;
  background: #1a1a1a;
  border-right: 1px solid #333;
  padding: 10px;
}

#patientHeader {
  font-size: 13px;
  color: #999;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #333;
}
#patientHeader b { color: #eee; }

.study {
  margin-bottom: 6px;
}
.study-header {
  cursor: pointer;
  padding: 6px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  display: flex;
  justify-content: space-between;
}
.study-header:hover { color: #fff; }

.series-list { padding-left: 8px; }
.series-item {
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.series-item:hover { background: #262626; color: #fff; }
.series-item.active { background: #2d4a63; color: #fff; }
.series-item .count { color: #777; font-size: 11px; white-space: nowrap; }

#viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#topbar {
  padding: 8px 14px;
  font-size: 13px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
}
#seriesLabel { color: #eee; font-weight: 600; }
#instanceLabel { color: #999; }

#canvasWrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

#canvas {
  image-rendering: pixelated;
  cursor: grab;
  max-width: 100%;
  max-height: 100%;
}

#hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #666;
  pointer-events: none;
  white-space: nowrap;
}

#bottombar {
  padding: 8px 14px;
  background: #1a1a1a;
  border-top: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
#bottombar button {
  background: #2a2a2a;
  color: #ddd;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12.5px;
}
#bottombar button:hover { background: #3a3a3a; }
#wlLabel { color: #999; margin-left: auto; }
